Posts

GPS Test KML to CSV

Image
As part of surveying my local cemetery, I am using an Android app called GPS Test by Chartcross. I start with list a list of graves in my cemetery I need to get GPS coordinates for. I then gather those by taking samples with the app and changing the names of the points to the GraveID from my report. I export the KML file from the app and transfer it to my PC.  (I used Google Drive as my go-between, but any method will do, such as Bluetooth transfer.) I modified the code slightly from my previous post,  MyMaps to Spreadsheet, KML to CSV and back (rvnllc.com) .   import sys import xml.etree.ElementTree as ET # KML namespace ns = {"": "http://www.opengis.net/kml/2.2",       "gpstestkml":"http://www.chartcross.co.uk/XML/GPXDATA/1/0"} # Where is "coordinates" in each Placemark? wherecoords = 'Point/coordinates' # Where is "TimeStamp" in each Placemark? wherets = 'TimeStamp/when' # Where is accuracy in each Placemark

From iframe to Joomla article with Sourcerer

Image
From iframe to Joomla article with Sourcerer This post is a shameless plug for an especially useful plug-in from Regular Labs called Sourcerer .   I'll demonstrate some of the base functionality with the free version of Sourcerer.   If you can run a piece of PHP code on your website and within an iframe, it is possible to run your code natively in a Joomla CMS article with Sourcerer with very few changes.   I will share a couple caveats I learned along the way. Step 1: Get your PHP code to run natively on your website in the CMS Before you can get your code to work on your CMS in an iframe, it needs to work as a standalone webpage. Here is a screenshot of my Flickr listing that filters by "smith" in the photo titles and descriptions. It's a basic fill-in-the-blank query form.  A string of text is typed into a text input form.  The submit button triggers a GET request to the same web page.  While building a page, a GET call is made to a Flickr API and a t

MyMaps to Spreadsheet, KML to CSV and back

Image
I'm sharing a couple Python scripts that I used to update my Google MyMaps map for a website that I manage. Know your data On the  website I manage for the Friends of Silverbrook Cemetery, I created a Map of Sections page with an iframe of a Google MyMaps page. Each of these colored sections is a map layer of polygons. The major sections are Old Grounds, City Addition, Bond Addition, New Addition, Garden of Memory and Garden of Eternal Peace.   Each of those polygons was hand drawn in MyMaps. In addition to the polygon, I have pins in a separate layer called "Points of Interest".   Those pins have a slightly different data structure than the polygons.   For now I'm just going to focus on the polygons. As an example, I'm going to take that large yellow triangle in section New-63 and distort it.   First, I need to export the New layer of the map to a KML file.   I select "Export to KML/KMZ". I just need the KML file.  A KMZ is a zip archive o

HTML MAP tag, lessons learned

Image
This year the Friends of Silverbrook Cemetery is hosting a virtual tour instead of the regular annual walking around tour for the cemetery.  The tour guide is Mollie Watson from the Niles History Center .  I recreated what Mollie did in Google Slides on the website.  This included copying images, cutting and pasting text, while trying to keep the flow of the presentation. One slide that I found challenging was the hyperlinked map.  When you click on a star marker, you go to a page related to that part of the cemetery.  Here is the JPG file from the Virtual Tour Map page. The most important step I found was to size your image properly. The original image was 1112x906 pixels.  I uploaded the image into a Joomla media folder and used the JCE editor to resize the file until it looked good. The new size of the image was 653x529, which is about half. I opened the image in Paint.  I clicked the Resize option under Home->Image.  I selected pixels and typed in 653 and 529.  Then I saved it

vim my way

Image
The editor known as "vim" in Linux has many features in common with vi, the editor I learned in 1992. I was drafted to convert a slew of Vax programs to Solaris in over a few weeks.  I'd never used Unix. I had a VT-220 terminal that I used on a MicroVax and telnet'd over to the Sun.  The Yellow key was great for the EDT editor.  It was useless on the Sun.   The project manager showed me how to use vi and I started on the project right away. In 1998 I taught a class with at least 30 consultants pretty much the same way it was taught to me. Now it's your turn! On Windows I run Windows Subsystem for Linux (how I installed it could be a topic for another day). vi is linked to vim.   If you know vim on Linux, you can use vi on older Unix systems as well--Solaris, AIX, HPUX, etc.   Out of habit, I'll still type "vi" to start the vim editor.   If you are on a Linux desktop, pop up an xterm window to get to a shell. vim is oriented to the touch typist.  

Welcome to the Tech Corner

I've had a wonderful career in the tech world.  I'm still learning. I got my first software job in 1985 as a computational assistant to my electromagnetic professor Dr. Cravens at the Space Physics Research Laboratory at the University of Michigan.  At the time, I was a struggling student in every subject, except for my FORTRAN class, in which I got an A in (yay!).  I got to use a real VT-100 terminal on a PDP-11/23 and then migrated our code to an 11/750. It was exciting that I didn't have to use punch cards.  The work involved analyzing and modeling energy transfers in the upper atmosphere of Jupiter and interactions of the solar wind with comets.  I learned enough of the physics to be useful.  I'm not a classroom learner.  Sometimes we used the PDP as a terminal to a Cray computer and modeling software at the National Center for Atmospheric Research.   There's a whole story why I left for Oklahoma and worked for the military.  I'll bore you with that some ot