Create a map.img for reverse ingeneering

I’m trying to create a map with only 16384 points, each one with one Garmin type, to try to see how each type is interpreted by my nuvi.
With this documentation the idea is to test a better use of the nuvi for browse poi categories.

My point.osm has the 16384 nodes, each

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='osm_generate'>
<bounds minlat='51.37248675' minlon='0.043945669' maxlat='51.50432376' maxlon='0.263674' origin='OSM_Generate' />
    <node id='-1' timestamp='2000-11-24 0:0:0' visible='true' lat='-34.50000000' lon='-56.00000000'>
      <tag k='point' v='p0001' />
    <node id='-16384' timestamp='2000-11-24 0:2:7' visible='true' lat='-33.99200000' lon='-55.74600000'>
      <tag k='point' v='p16384' />

and the mkgmap style for points.

point=p0001 {name '0X0001'} [0X0001 resolution 20]
point=p16384 {name '0X4000'} [0X4000 resolution 20]

The generated maps shows nothing in the nuvi.
¿any idea?

mkgmap has a code for that.

java -jar mkgmap.jar  test-map:all-elements

edit: fix copy+paste error

Thanks for the tip. I haven’t read the full mkgmap doc in years.

Anyway, the test map shows all categories empty in my nuvi (no restaurants, no fuel, no shops, etc), and my expected result is that every category is populated at least by one element.
The generated map 63240001.img has md5sum 5b49e61b4932f2f2afff37625d74022d.
Is this correct?

Edit: The option is described in the wiki but not in the mkgmap options page (and the wiki says its oudated and refers to the options)

The md5sum will change with each execution because the *.img has a timestamp. I am not sure what the Etrex can do with the map,
you can check the content with e.g. GpsmapEdit or Basecamp or Mapsource.

Did you use option --index ?

java -jar mkgmap.jar  --index --gmapsupp test-map:all-elements

OK. I wasn’t generating the gmapsupp.img.

Now with your last command line ti was generated, but still no luck with the nuvi, the nuvi still shows all categories as empty.

Hmm, maybe the reason is that such a map doesn’t have much useful information in the index. For example, the country will be something like COUNTRYABC. On my Oregon 600 I do find the entries when I searching for POI, but maybe the Nüvi uses a different way to get the data.

I made a map with the 256 points of type 0x2A (Food). Still no luck.

What could be a way to try a more real map? maybe a extract with the country and then merge the 256 food pois to the osm file, and pass that to mkgmap?

Just to make sure: You do see a normal map created with mkgmap and you can find the POIs on your Nüvi, you just have problems with this special test map?

Do you set location in your nuvi at test map area? I’m not sure about nuvi, but it is possible for GPS to ignore data from maps, that don’t cover current position. See what categories does Mapsource show.

No, I didn’t set any special location. just use the GPS position.
I will try to add POIs closer to me, but with other maps (made with mkgmap or official ones), the nuvi shows POIs at least 200 or 300 km away from the center of the search.

Will try in Mapsource and post my findings.

Yes, no problem with other mkgmaps, just with this test map.

I couldnt find Mapsource installer, but tested in Basecamp.The POI list and searches are empty.

The weird thing it that when i select the test map, Basecamp takes me near to London, and what seems the coverage area (a cyan rectangle) is a small part of England. Remember that the 256 points in my osm test file cordinates are aprox. 35°S -55°W

I hope you did not install Basecamp 4.7, see

You are right, initially Basecamp shows only a few POI when I open the search dialog.
When I search for "Food and drink | all categories " it lists only 3 POI, but when I press the refresh button it shows many more.
I think this test map was not created to test the search function, it was created to visualize the default icons, so maybe it doesn’t help in your case.

If you don’t set the two environment variables BASE_LAT and BASE_LONG the map is near hear coded values
52.8984026 / 8.4317582
For your posiition you would need these commands on a Windows system:

set BASE_LAT=-35.0
set BASE_LONG=-55.0
java -jar mkgmap.jar  --index --gmapsupp test-map:all-elements

I changed set for export and command line worked in linux.
The nuvi now shows some data when searching for categories.

Category “Restaurants” shows only 2 items, one Unnamed and 0X2e13, but other categories seems to have data in each subcategories.
I will made a spreadsheet and post here.

Mapsource update should work, if you have BaseCamp installed.

See this info too:

Thanks for the Mapsource link.

I have read the wiki about POI types several times since some years, but I’m trying to improve the coverage of elements in the map (first targeting nuvi because are the devices i have).

Sometime ago I did a comparison of elements between several maps, OSM based, free non OSM, and official Garmin ones.
The OSM based maps were and are much better in road infrastructure and routing (the other maps are years behind), but the OSM maps have fewer items shown in the categories search, some caused by objects not mapped, and some by mkgmap rules that assign them as generic type, or does not assign to any type.

For example, in mkgmap default rules all place of worship are assigned type 0x2c0b, when some cases could be assigned to church, synagogue, mosque, …
Although map compilers could improve the rules in their toolchain settings theirselfs, i think it could be better if we can help produce better maps having the map producers just improve or adjust less elements, without having to worry for all the elements. Maybe this is not possible to do at the same time, and a customized default should be published for each brand of devices.

Another example, in default rules, bank and atm are assigned type 0x2f06, generic for “Banks & ATMs: Bank or ATM”, when bank could be assigned to 0x2f1e “Banks & ATMs: Bank”, and atm to 0x2f1d “Banks & ATMs: Atm”.

There are no default rules for 0x2c16 “Stadiums & Tracks: Sports Complex” and 0x2c13 “Stadiums & Tracks: Race Track”