Adirondack Forum  
Rules Membership Donations and Online Store Adkhighpeaks Foundation ADKhighpeaks Forums ADKhighpeaks Wiki Disclaimer

Go Back   Adirondack Forum > Outdoors Related Discussion > GPS Navigation, Maps, and Orienteering
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread Tools Search this Thread Display Modes
Old 02-17-2019, 11:09 AM   #1
Join Date: Jul 2014
Posts: 33
Project: Nat Geo ADK Trails Illustrated to MBTILE & KMZ

I have my own copy of National Geographic's 2007 "Adirondack Park" Trails Illustrated, and I've always been frustrated by how clunky the program is, and how useless it is when you're not sitting in front of your desktop. Better mechanisms now exist to package up the data from the now defunct software, which can no longer be purchased or viewed electronically.

So, I took it upon myself to export it to MBTILE and KMZ for use on mobile phones (e.g. LocusMaps on Android & MapPlus on Apple) and GIS programs (e.g. Google Earth, QGIS, and GlobalMapper).

Major credit goes to Tom Trebisky for reverse engineering the proprietary binary format NatGeo uses on disc (.TPQ files). You can find his software (written in C) on his website here. His software is an open source viewer (similar to the proprietary program) that can also run on Linux & Mac desktops, in addition to Windows. His software also allowed single exports of images at a time.

First I wrote some software in Python to parse the approximately 225 TPQ files from the disk, and export all the JPEGs. Each TPQ file contains 16 images that make up a 4x4 grid.

With the JPEGs extracted, I then used bash scripting and "Image Magick" software to stitch the images together across rows, and then down columns. Putting all 16 images together results in a maplet that's 1144 pixels wide, and 1572 pixels high, that covers a 0.125 x 0.125 lat/long area. Then, for each latitude of data, I stitched the maplets together left to right. At the widest point, the rows were as many as 17 maplets across, or nearly 20,000 pixels. The result was 15 images that when laid out north to south completed the entire map.

I then wrote a KML file to setup the 15 image overlays in Google Earth using their appropriate locations. At this point, I realized that Google Earth has a texture map limit based on your video card performance, so I couldn't view the widest images. In Google Earth, you can view this limit by going to Help => About Google Earth => Maximum Texture Size. I had to use Image Magick to split the widest images in half, and edited the KML file accordingly to remap them. From Google Earth, I then saved the KMZ file, packaging all the images into one 98MB file.

Then using Global Mapper, I loaded the resultant KMZ file and exported the Raster imagery to a 460MB MBTILE file. The zoom levels range from 10 (entire ADK park) down to 15 (zoomed in all the way).

All told, I spent about 8 hours on this project spread out over the past several weeks. I learned a lot with this project, including that I never want to do it again :-) Fortunately, most Nat GEO Topo disks utilize USGS topo imagery, which is now available by simpler means.

Last edited by ndoggac; 02-17-2019 at 05:32 PM..
ndoggac is offline   Reply With Quote
Old 02-17-2019, 11:28 AM   #2
DSettahr's Avatar
Join Date: May 2007
Posts: 4,565
This is pretty cool, and it looks like you put a lot of hard work and effort into making it happen... but I would question whether it is legal to share the files publicly. They are copyrighted, propriety information after all.
DSettahr is offline   Reply With Quote
Old 02-17-2019, 11:36 AM   #3
Join Date: Jul 2014
Posts: 33
What files?
ndoggac is offline   Reply With Quote
Old 02-17-2019, 02:07 PM   #4
Out of Shape
DuctTape's Avatar
Join Date: Jul 2006
Location: Rochester, NY
Posts: 1,757
I have the old TOPO! software for the Adks. I still use it regularly. I have always been frustrated that I must use the print option to save map images. Sounds like it was a major undertaking even with Tom's software to cull the image files from the TOPO! program.
"There's a whisper on the night-wind, there's a star agleam to guide us, And the Wild is calling, calling . . . let us go." -from "The Call of the Wild" by Robert Service

My trail journal: DuctTape's Journal
DuctTape is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 06:13 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

DISCLAIMER: Use of these forums, and information found herein, is at your own risk. Use of this site by members and non-members alike is only granted by the administration provided the terms and conditions found in the FULL DISCLAIMER have been read. Continued use of this site implies that you have read, understood and agree to the terms and conditions of this site. Any questions can be directed to the Administrator of this site.