Continued from Part I, Part II is a walkthrough of converting a calibrated map or aerial image into an Android-app-friendly format.
There are a number of ways to get calibrated maps and aerial photos that MAPC2MAPC can convert to Android-app friendly format.
– GIS/mapping programs can usually export maps into “raster”/digital formats that MAPC2MAPC can use. These can also display GIS vector data like shapefiles, then convert it into a compatible rasterized format. This is useful since there currently aren’t any good Android apps that can directly display such vector data.
– Some US state and government agencies provide easy online access to calibrated scanned maps and aerial imagery. Data for the US is particularly easy to find:
- The USGS Seamless Server
- Updated topographic maps from the US Forest Service
- NOAA Nautical Charts (and a free program to convert them from BSB to TIFF format with worldfile)
- Geospatial Data Gateway
- Canada also has an excellent resource in the GeoGratis website.
- Other countries may not have comparable sites for downloading free data; do a Google search to see if you can find any websites that offer such data for your country.
For this walkthrough, I’m going to download an aerial photograph and topographic map for my neighborhood from the USGS Seamless Server Site. I won’t go through the exact details of the process (there’s a tutorial on using the Seamless Server available at that site). But I will point out that when you select a data type for downloading, the Seamless Server will conveniently tell you the projection and datum the data is in, which you’ll need for MAPC2MAPC. Here, both the aerial imagery and topographic map are in the UTM projection, Zone 12N; however, the aerial imagery is in the NAD83 datum, while the topo map is in the NAD27 datum:
If you miss it there, or can’t find it, the downloaded zip file will include a .prj text file that has this information, and which can be opened in any text editor:
The two files you will need for use with MAPC2MAPC are the image file (with the .tif file extension) and the “worldfile” with coordinate calibration data (.tfw file extension). In the MAPC2MAPC program, choose File => Open Calibration. In the lower-right corner will be a drop-down menu that lets you select the type of calibration file you’re using from the ones that MAPC2MAPC supports; here, I’ll choose “World files”, then select the .tfw file.
Because worldfiles do not contain map projection/datum info, MAPC2MAPC will prompt me for projection/datum info:
From the Seamless Server or PRJ file, I know that the image is in the UTM coordinate system, Zone 12; the numbers in this listing box represent the UTM zones. If it were in a different coordinate system, I could scroll in the box and see if it was available at the bottom; MAPC2MAPC currently supports about 22 additional coordinate systems along with UTM. If I didn’t find it, I’d have to recalibrate the map manually using one of MAPC2MAPC’s built-in utilities, or a separate program (see post I for more info on datums, projections and map calibration). The default datum for MAPC2MAPC is WGS84; if the map is in a different datum (NAD83 in this case), I click the “Not WGS84” button, and choose the correct datum from the next window:
If successful, you should get a screen that looks something like this:
Now the map image can easily be converted into the Android-app-friendly format. In this case, I’m converting it to TrekBuddy format, so File => Write map as Trekbuddy files converts the original calibrated map image into the TrekBuddy-compatible format.. You’ll find the generated map files in a subfolder located in the same directory as the original image file, with the same name as the image plus “_tiles” appended. The other Android-friendly format MAPC2MAPC supports is the “Mobile Atlas” format; you’ll find that export function in the File menu as well.
The mapset and tiles will be in the uncompressed TrekBuddy format, as MAPC2MAPC doesn’t currently support the compressed tared TrekBuddy format. However, there’s a free Java utility called jtbtar that can convert the uncompressed mapset into a smaller compressed one. Run jtbtar, select the folder with the map tiles, click on “Pack Map”:
And jtbtar will create a compressed .tar file and .tmi file containing the mapset data.
For this example, I didn’t actually notice any substantial space savings by going through this process. However, copying a large compressed file from your computer to your Android unit takes far less time than copying many individual tile files. The process of copying the data over to your Android unit is the next topic on this blog; there are several options, each with advantages and disadvantages.