OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2018-12-18 18:07:59

muralito
Member
Registered: 2012-09-04
Posts: 1,683

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>
....
    <node id='-16384' timestamp='2000-11-24 0:2:7' visible='true' lat='-33.99200000' lon='-55.74600000'>
      <tag k='point' v='p16384' />
    </node>
</osm>

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?

Online

#2 2018-12-18 18:37:18

GerdP
Member
Registered: 2015-12-18
Posts: 677

Re: Create a map.img for reverse ingeneering

mkgmap has a code for that.
Try

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

edit: fix copy+paste error

Last edited by GerdP (2018-12-18 18:38:17)

Offline

#3 2018-12-18 21:09:54

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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)

Last edited by muralito (2018-12-18 21:20:29)

Online

#4 2018-12-18 21:49:11

GerdP
Member
Registered: 2015-12-18
Posts: 677

Re: Create a map.img for reverse ingeneering

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

Offline

#5 2018-12-18 22:54:30

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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.

Online

#6 2018-12-19 07:33:57

GerdP
Member
Registered: 2015-12-18
Posts: 677

Re: Create a map.img for reverse ingeneering

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.

Offline

#7 2018-12-20 02:08:59

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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?

Online

#8 2018-12-20 06:52:19

GerdP
Member
Registered: 2015-12-18
Posts: 677

Re: Create a map.img for reverse ingeneering

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?

Offline

#9 2018-12-20 11:55:18

popej
Member
Registered: 2008-09-20
Posts: 494
Website

Re: Create a map.img for reverse ingeneering

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.


popej

Offline

#10 2018-12-20 15:15:08

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

popej wrote:

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.

Online

#11 2018-12-20 15:16:25

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

GerdP wrote:

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?

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

Online

#12 2018-12-21 04:36:06

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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

Online

#13 2018-12-21 06:58:46

GerdP
Member
Registered: 2015-12-18
Posts: 677

Re: Create a map.img for reverse ingeneering

I hope you did not install Basecamp 4.7, see https://forum.openstreetmap.org/viewtopic.php?id=62468

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

Offline

#14 2018-12-22 22:43:14

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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.

Online

#15 2018-12-23 12:47:45

popej
Member
Registered: 2008-09-20
Posts: 494
Website

Re: Create a map.img for reverse ingeneering

muralito wrote:

I couldnt find Mapsource installer

Mapsource update should work, if you have BaseCamp installed.
https://www8.garmin.com/support/downloa … jsp?id=209

See this info too:
https://wiki.openstreetmap.org/wiki/OSM … /POI_Types

Last edited by popej (2018-12-23 12:50:05)


popej

Offline

#16 2018-12-23 16:34:31

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

popej wrote:
muralito wrote:

I couldnt find Mapsource installer

Mapsource update should work, if you have BaseCamp installed.
https://www8.garmin.com/support/downloa … jsp?id=209

See this info too:
https://wiki.openstreetmap.org/wiki/OSM … /POI_Types

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.

Last edited by muralito (2018-12-23 16:35:29)

Online

#17 2018-12-23 17:23:48

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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".

Online

#18 2018-12-23 17:54:30

muralito
Member
Registered: 2012-09-04
Posts: 1,683

Re: Create a map.img for reverse ingeneering

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

Online

Board footer

Powered by FluxBB