EarthNC has a new Google Earth tool for taking points, paths, and polygons created in Google Earth, and either converting them to GPX or uploading them directly to a Garmin GPS (Windows only for the latter). Points are converted to points, paths to routes, and polygons to tracks. The downloadable KML file, full text instructions, and a demonstration video, are available at the website. They also have a simple online tool for converting KML files directly to GPX format by copying the KML file into the online text box and clicking a conversion button.
Archive for December, 2007 Page 2 of 2
Yet another photo geotagging application, TagMyJPGs (aka EXIF Geotagging), this one with some helpful EXIF editing capabilities, and a nice Google Maps interface for geotagging. If you’re running Internet Explorer, the website has a link that lets you install the software automatically; otherwise, download and unzip the program into its own directory, then run the EXIFGeotagging.exe application:
![]()
TagMyJPGs lets you view much of the EXIF data embedded in the photo, and you can add/edit EXIF tags like the name, description, photographer, keywords, etc.(but not basic photo info like exposure, aperture, etc.). Tags in white or yellow are usually editable, those in gray not. Click on the Geo-Tags tab, and you can manually enter the coordinates where the photo was taken:
![]()
Click on the Geo-Tag with Google Maps button, and a Google Maps interface will open up with a marker indicating the camera position:
![]()
Click and drag the marker on Google Maps until it corresponds to the position of the camera when the photo was taken. You can also click on the object being photographed, and TagMyJPGs will mark the distance between camera and object with a yellow line, and enter the distance and bearing into the boxes at the top. The website claims that it will also draw the camera’s field of view, but I haven’t seen that in the several cases I tried. If the photo was already geotagged, it will be displayed at its geocoded position. Click “Copy Geo-Tag in EXIF Data”, and you’ll return back to the main program with the camera and object locations entered into the appropriate boxes.
If you’re satisfied, press the “save image and store EXIF data” button to write the coordinates and other entered data into the photo’s EXIF header. If the “preceed (sic) image name with datestamp” box is checked, the program will create a new image file with the date as a prefix to the original filename. If it’s not checked, it will overwrite the original with the new version.
The biggest drawback is the inability to geotag photos with a GPS track, but the author indicates on the website that he’s planning to add that feature in the future.
I’ve been posting about various ways to extract and embed geographic metadata from GeoTiffs, image files that have coordinate information in them that can be used by GIS software to georeference the image, i.e. assigning a geographic location to each pixel. Here’s an example of how extracting geographic metadata (like a worldfile) from a GeoTiff might be useful.
USGS 1:24K topo maps are freely available on the Internet from a variety of locations, like LibreMap or the USGS Seamless Server. Maps of forested areas often include green shading to indicate the presence of tree vegetation, but this coloration has always struck me as inaccurate, superfluous, and interfering with reading more critical map features. The US Forest Service apparently feels the same way, as they have removed that green coloring from their updated versions of these topo maps. But if you have a digital topo map with this coloration, it’s possible to get rid of it without losing the geographic metadata.
I’ll start with the USGS 1:24K topo map of Kendrick Peak in Arizona, available here among other locations. This map has a large amount of green shading on it, which was arbitrary to begin with, and is now unfortunately out-of-date because of a serious fire a few years ago:
![]()
If I open this map in virtually any editor and save it, the geographic metadata will be lost. So the first step is to extract and save the full metadata using the libgeoGUI along with the libgeotiff utilities. Next, I’ll open it up in Photoshop Elements. Yes, Photoshop isn’t a “free geography tool”, but Photoshop Elements is a lot cheaper than the full version while still containing much of its functionality. If you look around on eBay or Google, you can often find a brand-new copy of an older version of Photoshop Elements very cheaply, $20-30. And it’s a useful tool to have for general image manipulation, including the purpose I’ll be describing here.
To keep the filesize down, USGS GeoTiff topo maps are often saved in “indexed color” mode, where there’s a limited palette of colors assigned to each byte of pixel information. If it is indexed, Photoshop will show “(Index)” at the top of the image window; if you go to Image => Mode, “Indexed Color” will be checked as well. As long as we’re in Image=>, I’ll select “Color Table”:

This shows the full palette of colors used in this topo map, only 13 in this case. If I double-click on the green, the color I want to get rid of, the color picker comes up:

This lets me modify that index color to whatever I want; in this case, setting R, G and B to 255 will turn everything colored green in the original to white. If I now save the newly-modified image as a TIF with a different name, the map area from above, with lots of green, will now look like this:
![]()
All the green has been transformed to white, while all the other colors were unaffected. One could have at the same time modified any of the other colors to white to make them disappear, or modified them to a different shade. If you create a modified color scheme you plan to use again, you can save that palette using the “Save” button in the Color Table window.
For images with standard RGB color instead of indexed color, you can use the “Replace Color” function (Enhance => Adjust Color => Replace Color) to perform a similar function.
Opening and saving the map image in Photoshop removes the geographic metadata, but as long as you don’t resize the image, you can use the metadata of the original image to convert this modified image into a GeoTiff. In libgeoGUI, specify the .gtf metadata file created in the first step as the input worldfile, specify the modified Tiff image with the green removed as the input Tiff, and enter a name for the output GeoTiff. Click the “Embed” button, and you now have a GeoTiff with the same geographic metadata as the original, but modified to remove the green. And this approach will work not just with color modifications; as long as you don’t resize the image, you can modify it any way you want, drawing lines and shapes, putting other images on top of it, etc., and then embed the metadata into the saved image when you’re done.
I posted earlier about a GUI for the libgeotiff utilities, called the GeoTIFF Tools GUI, that can extract georeferencing data and other metadata from GeoTiff files, and then re-embed the same information back into a Tiff file that has had that information stripped out of it, say by an image editing program. It’s a decent GUI marred by a few flaws:
1.You can’t use it to embed .tfw worldfile data into a TIF, even though the command line utility supports this function.
2. All the files need to be in a single folder.
3. There can’t be any spaces in the filename.
I’ve banged away for a few hours, and come up with an alternate GUI for the libgeotiff utilities, with the catchy name,”libgeoGUI.exe”. You can download the GUI along with the associated listgeo and geotifcp utilities at this link. Unzip the folder with the GUI and the associated files, and run the program libgeoGUI by double-clicking on it:
![]()
There are two sections to the program; in both sections, a button with “…” in it opens a file selection dialog window appropriate for that section. The top section takes a GeoTiff file, and extracts the georeferencing data and any other data into two files, each with the same filename as the GeoTiff, but without the .tif extension:
- A standard .tfw worldfile with only the coordinate data;
- A .gtf file that contains not just the coordinate data but any other metadata embedded in the Tiff header (e.g. map name, coordinate system, datum, etc.). The .gtf file is plain text, so you can examine it in any text editor; here’s a sample of one .gtf file for a USGS 1:24K topo map with a extensive amount of embedded metadata:
GeoTiff_Information:
Version: 1
Key_Revision: 0.2
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
419610.38 3901689.53 0
ModelPixelScaleTag (1,3):
2.4384 2.4384 0
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeProjected
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
ProjectedCSTypeGeoKey (Short,1): PCS_NAD27_UTM_zone_12N
PCSCitationGeoKey (Ascii,25): “UTM Zone 12 N with NAD27″
End_Of_Keys.
End_Of_Geotiff.
PCS = 26712 (name unknown)
Projection = 16012 ()
Projection Method: CT_TransverseMercator
ProjNatOriginLatGeoKey: 0.000000 ( 0d 0′ 0.00″N)
ProjNatOriginLongGeoKey: -111.000000 (111d 0′ 0.00″W)
ProjScaleAtNatOriginGeoKey: 0.999600
ProjFalseEastingGeoKey: 500000.000000 m
ProjFalseNorthingGeoKey: 0.000000 m
GCS: 4267/NAD27
Datum: 6267/North American Datum 1927
Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0′ 0.00″E)
Corner Coordinates:
Upper Left ( 419610.380, 3901689.528)
Lower Left ( 419610.380, 3885203.505)
Upper Right ( 432770.425, 3901689.528)
Lower Right ( 432770.425, 3885203.505)
Center ( 426190.403, 3893446.517)
Unlike the previous GUI, this one creates both .tfw and .gtf files automatically, rather than giving you the choice of one or the other.
Section 2. of the program handles the opposite function, taking a geo-metadata file and embedding it into the appropriate Tiff file. In the “GeoTiff metadata” box, you choose either a standard Tiff worldfile (.tfw or .tifw) or a .gtf file created in section 1 with the full set of metadata. If you have a choice, use the .gtf file, since it typically contains more information. For “Input Tiff”, select the Tiff image file that you want to embed the metadata into; for “Output GeoTiff”, enter a name for the product Tiff file with the embedded data. Click on “Embed”, and it will be done.
There’s not a lot of error-checking in the program, but if you don’t do something right, there’s no real possibility of problems – nothing will happen, that’s all. Use at your own risk; if you find any bugs, let me know.
