Global Mapper v24.1

Working with OpenStreetMap files

Frank O
Frank O Global Mapper UserTrusted User
edited October 2012 in Downloading Imagery
Recently I visited the following site:

http://garmin.openstreetmap.nl/

I selected a set of adjacent files, specified "Generic Routable" format, and submitted my request. The site generated an installer which I downloaded and ran on my PC. This created a directory "c:\garmin\maps\OSM generic routable\" containing several .img files as well as an .mdx and .tdb file. When I launch Garmin's MapSource, I can now select this dataset as my background map.

I would like to bring this data into Global Mapper to work with it further. In Global Mapper 13 under "Open Data File", I browsed to the directory above and chose one of the .img files. This produced the following message:
The overlay type could not be determined from the filename you selected. Please select the type of overlay you wish to view.

I then selected "OpenStreetMap (OSM)" from the menu, which resulted in the following:
Error parsing OpenStreetMap file 63241336.img. Some data may be missing.

Any ideas on what I would need to do to open this data in Global Mapper? If I go to Global Mapper's "Download Online Imagery" option and select "MapQuest OpenStreetMap Worldwide Street Maps," the map data is different from what I received at the site noted above -- and, for my purposes, is less preferable.

Comments

  • global_mapper
    global_mapper Administrator
    edited October 2012
    Those maps are formatted in the proprietary Garmin .img format, which is not supported in Global Mapper (or pretty much anything except Garmin software). The data has been created for sending directly to a Garmin unit. If you want to edit this data you would need to pull the raw XML OSM data from openstreetmap.org and then export a Polish MP format file from it using File->Export Vector Data, then use cGPSMapper and some other tools to create your own Garmin .img files from it, but it is quite an involved process. It might be easier to edit the data directly on openstreetmap.org and let them do whatever process they already have in place for updating the Garmin-formatted maps.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Frank O
    Frank O Global Mapper User Trusted User
    edited October 2012
    Thanks, Mike, I will look into those alternatives.

    On a somewhat related note: I've created a map in Global Mapper, done Export Vector Map as a Polish MP file, and run cGPSMapper on it to create an .img file. Is there a way to transfer this file so that it can be opened in Garmin's MapSource program on the PC? I tried just creating a directory under c:\garmin\maps and placing the file there, but MapSource doesn't recognize it; I gather some sort of install steps are required?
  • global_mapper
    global_mapper Administrator
    edited October 2012
    It is a bit of a complex process, but if you checkout http://home.roadrunner.com/~creek/garmin.htm (skip past step 4 since you have already created your .img file) you can see how to add it to MapSource.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Frank O
    Frank O Global Mapper User Trusted User
    edited October 2012
    Thanks much. In the meantime I ran across a program called GMapTool that, in combination with cGPSMapper, installed my map in MapSource. There are a few peculiarities about how the final product turned out, though, so I will also check out the procedure you mentioned.
  • Frank O
    Frank O Global Mapper User Trusted User
    edited October 2012
    By the way, I noticed various errors occurring while trying to export the vector map I'd created in Global Mapper and convert it so that it could be opened in Garmin's MapSource.

    During the vector export step in Global Mapper, an error came up, "One or more features were exported with an unknown MP type code which may cause errors when building the map with cGPSMapper. To fix this add a MP_TYPE attribute to the default attribute list for the unknown types. The list of unknown types has been copied to the clipboard. LINE TYPES: Unknown Line Type."

    I went ahead anyway and ran the .mp file through cGPSMapper. Here, two errors occurred. First, as it ran I got innumerable alerts, "Warning W024: Type of element should not be 0." Would this be related to the warning during the Global Mapper export?

    Then, as cGPSMapper was wrapping up, during the size optimization stage, I got an error, "Too big RGN table structure - please contact with gps@cgpsmapper.com. Aborting program due to errors." I found that if I cropped the map down to a relatively small area, cGPSMapper would complete without the RGN table structure size error, but this would leave the final product so small that the end product wasn't too useful. If there are any other ways around this cGPSMapper error (and/or if there is any connection between it and the line type warnings), I'd be very interested to hear.
  • global_mapper
    global_mapper Administrator
    edited October 2012
    Yes, the W024 warning is a direct result of the previous warning. It just means you have some unclassified lines and there is no such thing in Garmin maps. If you reclassify them (or turn them off if you don't need them) then the warning should go away.

    I'm not sure on the other error, how large of a map are you creating? There are some limitations on how big the Garmin .img files can be per map (I know because I worked at Garmin for 6 years and had a big hand in designing the map format), so you might need to use the Gridding tab when exporting your Polish MP files to split up the operation into smaller map tiles that you create a collection of .img files for.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Frank O
    Frank O Global Mapper User Trusted User
    edited October 2012
    Great, thanks for the suggestions, I'll work on those. Regarding the unclassified lines, the map basically consists of a vector line drawing of the California coastline, and a large number of depth contours generated from eight or nine files of bathymetric data for different parts of the Los Angeles coast. Because the contours are spaced fairly closely (10 feet), it resulted in a fairly large file (~155-MB .mp file). There's nothing there besides the coastline drawing and the depth contours, so I gather the line classification issue must have had to do with the latter. I'll have to look at how to add an attribute.

    As for the overall size of the map, as noted it resulted in a ~155-MB .mp file covering a geographic area about 120 x 75 km. I'll see about using the gridding tab to break it up into tiles. If it has a large enough SD card, can a Garmin unit usually deal with all of these as if they were a single map?
  • global_mapper
    global_mapper Administrator
    edited October 2012
    I'm guessing that the shoreline is marked as unclassified. Try using the Search->Search by Attributes option to sort features by type and see what is there. Or you could right-click on the layer in the Control Center and select the split based on some attribute and split based on the type. Then you will get separate layers for each type and you can easily edit them to change them or turn them off. For example you could edit the unknowns and make them of the shoreline type if it is indeed the shoreline that is the unknowns. There are also built-in bathymetric contour line types that will export to a MP with no problems.

    The size limitation is really just in cGPSMapper dealing with a large file. You can then pack lots of individual .img files onto your Garmin. In fact MapSource will throw them all into one large .img with lots of maps inside it.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Frank O
    Frank O Global Mapper User Trusted User
    edited October 2012
    Thanks, that's a big help. By turning off and on various overlays I determined that it was indeed the coastline shapefile that was causing the error. After I defined all of it and assigned it to type shoreline, the error went away.

    I'll have to experiment with tiles of various sizes to see what will work for cGPSMapper.