GroundTruth For Dummies
This page contains basic instructions on how to use GroundTruth mapmaking tool.
- 1 Quick Installation Instructions
- 2 Downloading OSM Data
- 3 Generating Maps
- 4 Results
- 5 Uploading Maps To The GPS Unit
- 6 Generating Maps With Relief Contours
- 7 See also
Quick Installation Instructions
- You need to have Microsoft .NET 3.5 or later (available here) installed on your computer in order to run GroundTruth.
- Download the latest version of GroundTruth...
- Unzip the package somewhere on your disk.
- Download the latest free version of cgpsmapper from http://www.cgpsmapper.com (download the "exe only" zip file).
- Unzip the cgpsmapper ZIP file to the same directory where you unzipped GroundTruth files.
- If you want to be able to upload maps directly to the GPS unit, also download free SendMap tool from the same site.
- Unzip the SendMap ZIP file to the same directory where you unzipped GroundTruth files.
UPDATE: GroundTruth version 126.96.36.199 (and above) seems to be working on Linux (I haven't done extensive testing, but it works on my OpenSUSE virtual machine). You need to have Mono installed (instead of .NET, of course). Also, you have to use -nonwin command line option. --Breki 17:40, 29 January 2009 (UTC)
It also seems to work on my Kubuntu 8.10. Don't forget to make GroundTruth.sh and cgpsmapper-static executable! Thomas 23:37, 15 February 2009 (UTC)
cgpsmapper didn't run under Mac OS (yet). If you find a way contact me, please. --railrun 19:29, 13 March 2009 (UTC)
Downloading OSM Data
- Visit OSM Web map (http://www.openstreetmap.org/)
- Move to the area of your choice so that the area you want to cover fills the whole map view. Please do not select a too big an area because it could result in a large quantity of data being downloaded from the OSM server - this could take a long time. There are other ways to cover large areas, please visit GroundTruth Manual for more info.
- Click on the "Permalink" on the bottom right corner of the map.
- The browser should now display an URL like http://www.openstreetmap.org/?lat=46.4953&lon=15.5392&zoom=12&layers=B000FTF.
- Copy this URL to the clipboard.
- Open a command line window and go to the GroundTruth's directory.
- Execute the following command: (replace url from clipboard with the URL from your clipboard
groundtruth getdata --bu "url from clipboard"
- This will download the OSM vector data for your area. Here's an example of GroundTruth's output for my area:
groundtruth getdata -bu="http://www.openstreetmap.org/?lat=46.4951&lon=15.5395&zoom=12&layers=B000FTF" GroundTruth v188.8.131.52 by Igor Brejc Generates Garmin maps from OpenStreetMap data Visit http://wiki.openstreetmap.org/wiki/GroundTruth for more info Finished downloading data (5.7 MB) Saved to file output.osm
Now you have the OSM data you need to generate the Garmin map from.
|Exporting OSM data directly from the browser|
- Execute the following command:
- This is the output for my map area:
GroundTruth v184.108.40.206 by Igor Brejc Generates Garmin maps from OpenStreetMap data Visit http://wiki.openstreetmap.org/wiki/GroundTruth for more info Generate map polish files Fetching rendering rules from 'Rules\DefaultRules.txt'... Fetching standard Garmin types dictionary from 'Rules\DefaultRules.txt'... Fetching character conversion table from 'Rules\DefaultRules.txt'... Scanning OSM data... Loading OSM file 'output.osm'... Hardware levels used: 7 Polyline types used: 14 Polygon types used: 6 Generating polish map file... --------------------- Map content statistics (by rendering rules): Rule 'Marsh': 1 features generated Rule 'Forest': 155 features generated Rule 'Farm': 147 features generated Rule 'Fell': 48 features generated Rule 'Residential': 20 features generated Rule 'Water': 9 features generated Rule 'PathMinor': 37 features generated Rule 'PathMajor': 415 features generated Rule 'TrackMajor': 171 features generated Rule 'TrackMinor': 192 features generated Rule 'Trailblazed': 167 features generated Rule 'RoadHighZoom': 466 features generated Rule 'RoadMiddleZoom': 466 features generated Rule 'RoadLowZoom': 54 features generated Rule 'Railway': 0 features generated Rule 'CableCar': 1 features generated Rule 'AerialwaysMinor': 12 features generated Rule 'River': 1 features generated Rule 'Stream': 100 features generated Rule 'Ditch': 5 features generated Rule 'NationalBorder': 0 features generated Rule 'NationalPark': 1 features generated Rule 'City': 1 features generated Rule 'Town': 1 features generated Rule 'Village': 25 features generated Rule 'Locality': 0 features generated Rule 'PlaceOfWorship': 5 features generated Rule 'Peak': 8 features generated Rule 'ParkingNode': 25 features generated Rule 'GuestHouse': 5 features generated Rule 'TodoContinue': 187 features generated Rule 'TodoJunction': 140 features generated --------------------- Generate polish TYP file Generate TYP file Generate map IMG files Generate preview polish file Generate preview map and TDB files Generate map list file for SendMap Copy product files to the output directory Generate MapSource registry file
|Want to create a hiking map?|
The map files will be stored in the Maps subdirectory. This is the list of the generated files:
|1.img||preview map (used by MapSource)|
|1.reg||Windows registry file for registering your maps to MapSource|
|1.tdb||MapSource index file|
|1.typ||TYP file containing custom map styles (used both by the GPS unit and MapSource)|
|12345678.img||the actual Garmin map of your area|
|filelist_1.txt||a list of files (can be used to upload the map to the unit using SendMap)|
Uploading Maps To The GPS Unit
You can upload generated maps in several ways, here I'll describe the two commonest approaches.
Directly From The Command Line
This can be done by adding the -upload option when generating maps:
groundtruth makemap -upload
- This will delete all previous maps you had on your unit (except those which are hard-coded with the unit)!
- You need to have SendMap executable in the same directory as GroundTruth in order for the above command to work.
Importing Into MapSource
You can import the generated maps into MapSource by executing the registry file (see more in GroundTruth_Manual#Installing_In_MapSource) which was one of the files generated by GroundTruth. After that you can upload maps using the MapSource uploading feature.
The advantage of this approach is that you can upload several different (unrelated) map products at once.
Generating Maps With Relief Contours
GroundTruth can generate contour maps using SRTM elevation data (see examples on the right). The process consists of two steps:
- Generating contours from the elevation data
- Generating Garmin maps with contours
Generating Contours From The Elevation Data
Similarly to steps in #Downloading OSM Data, the easiest way is to find the OSM map URL for the area you want to generate contours for. Then execute the following command: (replace url from clipboard with the URL from your clipboard
groundtruth contours --bu="url from clipboard"
This will generate the contour data for your area. Here's an example of GroundTruth's output for my area:
groundtruth contours --bu="http://www.openstreetmap.org/?lat=46.4951&lon=15.5395&zoom=12&layers=B000FTF"
The contours data will be saved to "output.ibf" file. Now go to the next step...
Generating Garmin Maps With Contours
- Execute the following command:
groundtruth makemap -ibf=output.ibf
This will generate contours for the area you specified. Depending on the size of the area, this can take from few seconds to eternity ;). After the maps have been generated, read the #Results subsection above on how to use these maps.
Generating OSM Files With Contours
After generating contours, they can be converted to OSM files (this is what Srtm2Osm used to do, but now it has been superseded):
This will use the generated output.ibf and create several Contours*.OSM files in the Output directory.