[PATCH v1] Rework of the location-autofill parameter

Hi, attached patch reorganizes the location-autofill parameter as discussed before on this list. * The location-autofill parameter has no longer the option bounds so only the options nearest and is_in. * If location-autofill is not set mkgmap does not try to find an alternative location (so no city/region/country alternative) * In case the city name of a POI or road is unknown the city name is left empty (which means an empty string ""). For me this worked well but Steve pointed out some doubts that it works. So please test carefully (a good region for this to test is africa using precompiled bounds but no location-autofill) * The bounds and the location-autofill parameter have no longer a default value * It is now possible to set the bounds parameter but index not. The help files need to be updated. I will do that before committing. But please test first :-) WanMil

Hi, so for replacing location-autofill=bounds,is_in,nearest index bounds=src\bounds.zip I need location-autofill=is_in,nearest index bounds=src\bounds.zip ? Henning Am 10.09.2012 17:25, schrieb WanMil:
Hi,
attached patch reorganizes the location-autofill parameter as discussed before on this list.
* The location-autofill parameter has no longer the option bounds so only the options nearest and is_in. * If location-autofill is not set mkgmap does not try to find an alternative location (so no city/region/country alternative) * In case the city name of a POI or road is unknown the city name is left empty (which means an empty string ""). For me this worked well but Steve pointed out some doubts that it works. So please test carefully (a good region for this to test is africa using precompiled bounds but no location-autofill) * The bounds and the location-autofill parameter have no longer a default value * It is now possible to set the bounds parameter but index not.
The help files need to be updated. I will do that before committing. But please test first :-)
WanMil

Correct
Hi, so for replacing
location-autofill=bounds,is_in,nearest index bounds=src\bounds.zip
I need
location-autofill=is_in,nearest index bounds=src\bounds.zip
?
Henning
Am 10.09.2012 17:25, schrieb WanMil:
Hi,
attached patch reorganizes the location-autofill parameter as discussed before on this list.
* The location-autofill parameter has no longer the option bounds so only the options nearest and is_in. * If location-autofill is not set mkgmap does not try to find an alternative location (so no city/region/country alternative) * In case the city name of a POI or road is unknown the city name is left empty (which means an empty string ""). For me this worked well but Steve pointed out some doubts that it works. So please test carefully (a good region for this to test is africa using precompiled bounds but no location-autofill) * The bounds and the location-autofill parameter have no longer a default value * It is now possible to set the bounds parameter but index not.
The help files need to be updated. I will do that before committing. But please test first :-)
WanMil
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

HI On 10/09/12 16:25, WanMil wrote:
* In case the city name of a POI or road is unknown the city name is left empty (which means an empty string ""). For me this worked well but Steve pointed out some doubts that it works. So please test carefully (a
Took me a while to find it but see this thread: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2012q1/013897.html On a certain GPS model, empty city names caused a problem. So its not that it never works, but may cause problems in some situations. I also have a vague memory of another problem with blank names for POIs (that may have been limited to place names) but I wasn't able to find it. I was also wondering about blank entries in lists when searching may be confusing. ..Steve

HI
On 10/09/12 16:25, WanMil wrote:
* In case the city name of a POI or road is unknown the city name is left empty (which means an empty string ""). For me this worked well but Steve pointed out some doubts that it works. So please test carefully (a
Took me a while to find it but see this thread: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2012q1/013897.html
On a certain GPS model, empty city names caused a problem. So its not that it never works, but may cause problems in some situations.
I also have a vague memory of another problem with blank names for POIs (that may have been limited to place names) but I wasn't able to find it.
I was also wondering about blank entries in lists when searching may be confusing.
..Steve
Ok, the patch contains a constant in MapBuilder.java which defines the name of cities without a name. Shall I make it configurable (--default-city aka --default-country and --default-region?) WanMil

On 10/09/12 20:12, WanMil wrote:
name of cities without a name. Shall I make it configurable (--default-city aka --default-country and --default-region?)
I don't think there is any need to make it configurable, it either works or it doesn't. If not then use a single space, I am pretty sure that will be OK. ..Steve

Isn't it better to use "N.N." (or something like this) instead of a single blank " " ? "N.N." makes clear that something is missing - a single blank " " probably doesn't. Regards Klaus -- View this message in context: http://gis.19327.n5.nabble.com/PATCH-v1-Rework-of-the-location-autofill-para... Sent from the Mkgmap Development mailing list archive at Nabble.com.

The patch uses an empty string "" and Mapsource seems to understand that there is no city information (it shows one comma less for streets without city e.g. Avenue de la République, District de Bamako, MLI instead of Avenue de la République,, District de Bamako, MLI). I don't mind what is used as empty city name and want to leave it to the opinion of this list what shall be used. So please post your opinion what you like most. WanMil
Isn't it better to use "N.N." (or something like this) instead of a single blank " " ? "N.N." makes clear that something is missing - a single blank " " probably doesn't.
Regards Klaus

I also have a vague memory of another problem with blank names for POIs (that may have been limited to place names) but I wasn't able to find it.
Found it just after posting, as you do. I believe I was thinking of this: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2012q2/014471.html However, there was no proven connection to blank names in that case, so probably not relevant. ..Steve

I also have a vague memory of another problem with blank names for POIs (that may have been limited to place names) but I wasn't able to find it.
Found it just after posting, as you do. I believe I was thinking of this: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2012q2/014471.html However, there was no proven connection to blank names in that case, so probably not relevant.
..Steve
Shall I commit the patch? There was no veto on the list so it should be ok to use the empty string "" for the name of unknown cities...(?!?) WanMil

Hi
Shall I commit the patch? There was no veto on the list so it should be ok to use the empty string "" for the name of unknown cities...(?!?)
Yes you should, it can always be changed if there is a problem. ..Steve

2012/9/10 Steve Ratcliffe <steve@parabola.me.uk>
HI
On 10/09/12 16:25, WanMil wrote:
* In case the city name of a POI or road is unknown the city name is left empty (which means an empty string ""). For me this worked well but Steve pointed out some doubts that it works. So please test carefully (a
Took me a while to find it but see this thread: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2012q1/013897.html
On a certain GPS model, empty city names caused a problem. So its not that it never works, but may cause problems in some situations.
I also have a vague memory of another problem with blank names for POIs (that may have been limited to place names) but I wasn't able to find it.
Hi, Yes, it was me who reported such issue with an Edge 705: empty places makes it freeze for 30 seconds at each click you scroll in a place/nearest city list. The thread starts there: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2012q1/013897.html This was solved using 1) “--bounds=bounds --index --location-autofill=bounds,is_in,nearest --add-pois-to-areas --name-tag-list=name,place_name” (this will fill the blanks but you’ll get place duplicates) or better: 2) Use "--bounds=bounds --index --location-autofill=bounds,is_in,nearest --add-pois-to-areas" and in the style file, change the points file by adding “ & name=*” to each “place=XXX” entry I am now trying the new mkgmap-r2336 to see if the problem will reoccur with the new autofill code. I now use "--location-autofill=is_in,nearest". However, I cannot create the bounds files anymore. I was using: java -jar mkgmap-r2336/mkgmap.jar --createboundsfile=great_britain-boundaries.osm.pbf This does not generate the bounds anymore. Am I missing something? Thanks, Eric I am trying the latest mkgmap to see if the problem reoccurs.

However, I cannot create the bounds files anymore. I was using: java -jar mkgmap-r2336/mkgmap.jar --createboundsfile=great_britain-boundaries.osm.pbf This does not generate the bounds anymore. Am I missing something?
You *must* specify the bounds parameter. Since r2335 it has no default. WanMil

2012/9/20 WanMil <wmgcnfg@web.de>:
You *must* specify the bounds parameter. Since r2335 it has no default.
You mean the output folder then? Maybe it would be good to have an error message if --createboundsfile is used but --bounds is omitted? Thanks, Eric

2012/9/20 WanMil <wmgcnfg@web.de>:
You *must* specify the bounds parameter. Since r2335 it has no default.
You mean the output folder then? Maybe it would be good to have an error message if --createboundsfile is used but --bounds is omitted?
Thanks, Eric
Of course! I have just comitted that. WanMil

Hi, Coming back to the blank cities issue with Edge 705: the problem was never fixed because it was not a mkgmap problem per se, but more a map problem. This happened when using --add-pois-to-area. The problem is with the OSM map: some places have both a “city/village” unnamed polygon plus a poi for the village with the name. Using --add-pois-to-area leads to creating both POIs, one of them being blank. This could be fixed with several solutions: 1) Map should be corrected (remove POI node village and name the polygon). This is fastidious but would be the best one. However this is not practicable if you need to generate the map of a country. 2) Do not use --add-pois-to-areas (but you will miss POIs in areas) 3) Use “--add-pois-to-areas --name-tag-list=name,place_name” (this will fill the name of the POI to the unnamed polygon but in the cities list you’ll get place duplicates) 4) Use “--add-pois-to-areas", but NOT "--name-tag-list=name,place_name” and use a style which will fix the issue: in the points file by adding “ & name=*” to each “place=XXX” entry. Perfect solution. Regarding the new mkgmap code, these are the test results: 0) First, I generated the bounds file myself, using: $ java -jar mkgmap-r2328/mkgmap.jar --bounds=bounds --createboundsfile=great_britain-boundaries.osm.pbf The file great_britain-boundaries.osm.pbf was itself generated with osmosis from the great_britain.osm.pbf file from Geofabrik. Then I created the gmapsupp files in 3 ways, and tested for the presence of blank lines on my Edge 705: 1) Do NOT use --add-pois-to-area, default style $ java -Xmx3000M -jar mkgmap-r2336/mkgmap.jar --route --remove-short-arcs --latin1 --bounds=bounds --location-autofill=is_in,nearest --adjust-turn-headings --link-pois-to-ways --ignore-turn-restrictions --ignore-maxspeeds --check-roundabouts --make-all-cycleways --index --gmapsupp --report-undefined-nodes -c template.args --> no blank lines 2) Use --add-pois-to-area, default style $ java -Xmx3000M -jar mkgmap-r2336/mkgmap.jar --route --remove-short-arcs --latin1 --bounds=bounds --location-autofill=is_in,nearest --adjust-turn-headings --link-pois-to-ways --ignore-turn-restrictions --ignore-maxspeeds --check-roundabouts --make-all-cycleways --add-pois-to-areas --index --gmapsupp --report-undefined-nodes -c template.args --> blank lines, freeze when searching nearest cities 3) Use --add-pois-to-area, CFMaster style from http://www.cferrero.net/maps/downloads/CF_GPS.zip where “ & name=*” appended to each “place=XXX” entry in the points file. $ java -Xmx3000M -jar mkgmap-r2336/mkgmap.jar --route --remove-short-arcs --latin1 --bounds=bounds --location-autofill=is_in,nearest --adjust-turn-headings --link-pois-to-ways --ignore-turn-restrictions --ignore-maxspeeds --check-roundabouts --make-all-cycleways --add-pois-to-areas --index --gmapsupp --style-file=style_CF --family-id=1500 --report-undefined-nodes -c template.args CFMaster_FID_1500.TYP --> no blank lines (thanks to the "& name=*" added in the points file) So it seems that the new code does not introduce blank cities (at least where I live). But with --add-pois-to-area, the problem and its solutions are exactly the same than before. Thus, may I suggest we change the default style file (by adding the "& name=*" entry as described above) if this does not lead to other issues (works for me)? Eric

Hi Eric, thanks for your detailed investigations. Can you give an example of such a place duplicate so that I can play a bit with it? Thanks! WanMil
Hi,
Coming back to the blank cities issue with Edge 705: the problem was never fixed because it was not a mkgmap problem per se, but more a map problem. This happened when using --add-pois-to-area. The problem is with the OSM map: some places have both a “city/village” unnamed polygon plus a poi for the village with the name. Using --add-pois-to-area leads to creating both POIs, one of them being blank. This could be fixed with several solutions: 1) Map should be corrected (remove POI node village and name the polygon). This is fastidious but would be the best one. However this is not practicable if you need to generate the map of a country. 2) Do not use --add-pois-to-areas (but you will miss POIs in areas) 3) Use “--add-pois-to-areas --name-tag-list=name,place_name” (this will fill the name of the POI to the unnamed polygon but in the cities list you’ll get place duplicates) 4) Use “--add-pois-to-areas", but NOT "--name-tag-list=name,place_name” and use a style which will fix the issue: in the points file by adding “ & name=*” to each “place=XXX” entry. Perfect solution.
Regarding the new mkgmap code, these are the test results:
0) First, I generated the bounds file myself, using:
$ java -jar mkgmap-r2328/mkgmap.jar --bounds=bounds --createboundsfile=great_britain-boundaries.osm.pbf
The file great_britain-boundaries.osm.pbf was itself generated with osmosis from the great_britain.osm.pbf file from Geofabrik.
Then I created the gmapsupp files in 3 ways, and tested for the presence of blank lines on my Edge 705:
1) Do NOT use --add-pois-to-area, default style
$ java -Xmx3000M -jar mkgmap-r2336/mkgmap.jar --route --remove-short-arcs --latin1 --bounds=bounds --location-autofill=is_in,nearest --adjust-turn-headings --link-pois-to-ways --ignore-turn-restrictions --ignore-maxspeeds --check-roundabouts --make-all-cycleways --index --gmapsupp --report-undefined-nodes -c template.args
--> no blank lines
2) Use --add-pois-to-area, default style
$ java -Xmx3000M -jar mkgmap-r2336/mkgmap.jar --route --remove-short-arcs --latin1 --bounds=bounds --location-autofill=is_in,nearest --adjust-turn-headings --link-pois-to-ways --ignore-turn-restrictions --ignore-maxspeeds --check-roundabouts --make-all-cycleways --add-pois-to-areas --index --gmapsupp --report-undefined-nodes -c template.args
--> blank lines, freeze when searching nearest cities
3) Use --add-pois-to-area, CFMaster style from http://www.cferrero.net/maps/downloads/CF_GPS.zip where “ & name=*” appended to each “place=XXX” entry in the points file.
$ java -Xmx3000M -jar mkgmap-r2336/mkgmap.jar --route --remove-short-arcs --latin1 --bounds=bounds --location-autofill=is_in,nearest --adjust-turn-headings --link-pois-to-ways --ignore-turn-restrictions --ignore-maxspeeds --check-roundabouts --make-all-cycleways --add-pois-to-areas --index --gmapsupp --style-file=style_CF --family-id=1500 --report-undefined-nodes -c template.args CFMaster_FID_1500.TYP
--> no blank lines (thanks to the "& name=*" added in the points file)
So it seems that the new code does not introduce blank cities (at least where I live). But with --add-pois-to-area, the problem and its solutions are exactly the same than before.
Thus, may I suggest we change the default style file (by adding the "& name=*" entry as described above) if this does not lead to other issues (works for me)?
Eric

2012/9/20 WanMil <wmgcnfg@web.de>:
Hi Eric,
thanks for your detailed investigations. Can you give an example of such a place duplicate so that I can play a bit with it?
Thanks! WanMil
Hi, This is near South Oxford, UK. There are a few places in a radius of 10 km around, but I will need to check for their names. Eric
participants (5)
-
aighes
-
Eric Fernandez
-
Steve Ratcliffe
-
toc-rox
-
WanMil