Bug: Address search and opposite cycleway

Hi, I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way. Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960) With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17". I think for address search, the "(Cylceway)" streets should be ignored. Thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Hi Thorsten,
Hi,
I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way.
Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960)
With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17".
I think for address search, the "(Cylceway)" streets should be ignored.
it's up to you to ignore the cycleway: matching of nodes/polygons with house numbers are performed by evaluating the mkgmap:street tag of the road. So you can exclude all cycleways by removing or not setting the mkgmap:street tag on them.
Thorsten
WanMil

Hi, On Sun, Mar 09, WanMil wrote:
Hi Thorsten,
Hi,
I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way.
Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960)
With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17".
I think for address search, the "(Cylceway)" streets should be ignored.
it's up to you to ignore the cycleway: matching of nodes/polygons with house numbers are performed by evaluating the mkgmap:street tag of the road. So you can exclude all cycleways by removing or not setting the mkgmap:street tag on them.
Hm, how does this work then? My understanding was, that you take the addr:street tag and compare them with the road name. But "Sandwall (Cycleway)" is for me not identical to "Sandwall" as written in addr:street? Else how can I detect, that a way is the original one ("Sandwall") and not the cloned one for the opposite cycleway ("Sandwall (Cycleway)")? Thanks, thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Hi,
On Sun, Mar 09, WanMil wrote:
Hi Thorsten,
Hi,
I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way.
Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960)
With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17".
I think for address search, the "(Cylceway)" streets should be ignored.
it's up to you to ignore the cycleway: matching of nodes/polygons with house numbers are performed by evaluating the mkgmap:street tag of the road. So you can exclude all cycleways by removing or not setting the mkgmap:street tag on them.
Hm, how does this work then? My understanding was, that you take the addr:street tag and compare them with the road name. But "Sandwall (Cycleway)" is for me not identical to "Sandwall" as written in addr:street?
The road name is taken from the tag mkgmap:street in contrary to mkgmap:label:1 used to assign the first displayed label and used for address search.
Else how can I detect, that a way is the original one ("Sandwall") and not the cloned one for the opposite cycleway ("Sandwall (Cycleway)")?
I don't know (would have to look it up in the source code) but I guess it is tagged with highway=cycleway? Maybe someone else can give a quick answer?
Thanks, thorsten
WanMil

Hi, these are the tags that makeCycleWay is adding: String name = way.getTag("name"); if(name != null) name += " (cycleway)"; else name = "cycleway"; cycleWay.addTag("name", name); cycleWay.addTag("access", "no"); cycleWay.addTag("bicycle", "yes"); cycleWay.addTag("foot", "no"); cycleWay.addTag("mkgmap:synthesised", "yes"); Gerd WanMil wrote
Hi,
On Sun, Mar 09, WanMil wrote:
Hi Thorsten,
Hi,
I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way.
Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960)
With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17".
I think for address search, the "(Cylceway)" streets should be ignored.
it's up to you to ignore the cycleway: matching of nodes/polygons with house numbers are performed by evaluating the mkgmap:street tag of the road. So you can exclude all cycleways by removing or not setting the mkgmap:street tag on them.
Hm, how does this work then? My understanding was, that you take the addr:street tag and compare them with the road name. But "Sandwall (Cycleway)" is for me not identical to "Sandwall" as written in addr:street?
The road name is taken from the tag mkgmap:street in contrary to mkgmap:label:1 used to assign the first displayed label and used for address search.
Else how can I detect, that a way is the original one ("Sandwall") and not the cloned one for the opposite cycleway ("Sandwall (Cycleway)")?
I don't know (would have to look it up in the source code) but I guess it is tagged with highway=cycleway? Maybe someone else can give a quick answer?
Thanks, thorsten
WanMil _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Bug-Address-search-and-opposite-cycleway-tp57... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On Sun, Mar 09, WanMil wrote:
Hi,
On Sun, Mar 09, WanMil wrote:
Hi Thorsten,
Hi,
I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way.
Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960)
With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17".
I think for address search, the "(Cylceway)" streets should be ignored.
it's up to you to ignore the cycleway: matching of nodes/polygons with house numbers are performed by evaluating the mkgmap:street tag of the road. So you can exclude all cycleways by removing or not setting the mkgmap:street tag on them.
Hm, how does this work then? My understanding was, that you take the addr:street tag and compare them with the road name. But "Sandwall (Cycleway)" is for me not identical to "Sandwall" as written in addr:street?
The road name is taken from the tag mkgmap:street in contrary to mkgmap:label:1 used to assign the first displayed label and used for address search.
The following rule fixed it for me: highway=* & name=* & (name='cycleway' | name ~ '.*(cycleway).*') {delete mkgmap:street} but I still think there is a bug in mkgmap. name='Sandwall (cycleway)' mkgmap:street='Sandwall (cycleway)' addr:street='Sandwall' addr:street does neither match name nor mkgmap:street, so why is "Sandwall (cycleway)" choosen for address search and not "Sandwall" itself? Thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Sun, Mar 09, WanMil wrote:
Hi,
On Sun, Mar 09, WanMil wrote:
Hi Thorsten,
Hi,
I was wondering why I couldn't find sometimes addresses even if they where entered correct in OSM. By pure luck I found now the reason, it looks like if a way has the tag "cycleway=opposite", the address information is put on the wrong way.
Look at Sandwall 17 or 19 in Wyk auf Foehr (http://www.openstreetmap.org/#map=17/54.68666/8.56960)
With my own and with the default mkgmap style, you will not find the address with "Sandwall 17", but with "Sandwall (Cycleway) 17".
I think for address search, the "(Cylceway)" streets should be ignored.
it's up to you to ignore the cycleway: matching of nodes/polygons with house numbers are performed by evaluating the mkgmap:street tag of the road. So you can exclude all cycleways by removing or not setting the mkgmap:street tag on them.
Hm, how does this work then? My understanding was, that you take the addr:street tag and compare them with the road name. But "Sandwall (Cycleway)" is for me not identical to "Sandwall" as written in addr:street?
The road name is taken from the tag mkgmap:street in contrary to mkgmap:label:1 used to assign the first displayed label and used for address search.
The following rule fixed it for me: highway=* & name=* & (name='cycleway' | name ~ '.*(cycleway).*') {delete mkgmap:street}
but I still think there is a bug in mkgmap.
name='Sandwall (cycleway)' mkgmap:street='Sandwall (cycleway)' addr:street='Sandwall'
addr:street does neither match name nor mkgmap:street, so why is "Sandwall (cycleway)" choosen for address search and not "Sandwall" itself?
mkgmap:street is only used for house number matching while compiling the maps. Address search is a different thing. AFAIK address search on the Garmin units searches for all labels assigned to the roads. So if the name tag is assigned to the first label and the other labels are not set you can only search for "Sandwall (cycleway)". Once again it's up to you to assign the other labels so that they are also used by address search: mkgmap:street=* { addlabel "${mkgmap:street}" } addr:street=* { addlabel "${addr:street}" } ... WanMil
Thorsten

On Mon, Mar 10, WanMil wrote:
mkgmap:street is only used for house number matching while compiling the maps.
That's clear, and that's why I don't understand why mkgmap matches addr:street="Sandwall" with mkgmap:street="Sandwall (cycleway)" and not mkgmap:street="Sandwall" when creating the address index. Or more precise: I have several POIs with addr:street="Sandwall" addr:housenumber="XY". and I have two streets: A: mkgmap:street="Sandwall" B: mkgmap:street="Sandwall (cycleway)" where B is created by mkgmap because of "cycleway=opposite". mkgmap is using B to match the POIs and adds "Sandwall (cycleway) XY" to the address index. But I would expcet that "Sandwall XY" is added to the address index. The whole problem is: why is mkgmap choosing a mkgmap:street entry which does not match? I have a way called "Sandwall", this name is added to mkgmap:street. I have several POIs with addr:street "Sandwall" and a housenumber. Searching for "Sandwall XY" will not lead to any search result, only "Sandwall (cycleway) XY" will.
Address search is a different thing. AFAIK address search on the Garmin units searches for all labels assigned to the roads. So if the name tag is assigned to the first label and the other labels are not set you can only search for "Sandwall (cycleway)".
This would make sense if there is only a road with "Sandwall (cycleway)". But I have a road "Sandwall".
Once again it's up to you to assign the other labels so that they are also used by address search: mkgmap:street=* { addlabel "${mkgmap:street}" } addr:street=* { addlabel "${addr:street}" } ...
Sorry, but I don't understand how this rules should fix anything: mkgmap:street is already identical to "name", so now I set it a second time to another mkgmap:label:N, too. Ok. Means I have for way A: mkgmap:label:1="Sandwall" mkgmap:label:2="Sandwall" And for way B: mkgmap:label:1="Sandwall (cycleway)" mkgmap:label:2="Sandwall (cycleway)" I don't see how this should solve the problem. And for what should the addr:street assignement be good? If the street will be processed, I don't have a addr:street tag. That's always empty. Thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Hi WanMil, On Mon, Mar 10, WanMil wrote:
mkgmap:street is only used for house number matching while compiling the maps.
I found the bug: stripStreetName() in HousenumberGenerator.java removes the "(cylceway)" for comparing the streets. That's of course wrong, because now "Sandwall (cycleway)" matches "Sandwall", but this are two different streets. I don't know why you are removing text in brackets here, but I think that's not correct. If somebody wants to do that for his map, he can do this in his style. But it is impossible to workaround this bug in the style. Thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Hi WanMil,
On Mon, Mar 10, WanMil wrote:
mkgmap:street is only used for house number matching while compiling the maps.
I found the bug:
stripStreetName() in HousenumberGenerator.java removes the "(cylceway)" for comparing the streets. That's of course wrong, because now "Sandwall (cycleway)" matches "Sandwall", but this are two different streets.
I don't know why you are removing text in brackets here, but I think that's not correct. If somebody wants to do that for his map, he can do this in his style. But it is impossible to workaround this bug in the style.
Thorsten
Hi Thorsten, good catch! Stripping the text within brackets is a relict from the time when mkgmap automatically assigned name="${name} (${ref})" and the mkgmap:street tag did not exist. That was before merging the mergeroads branch. I will have a look on it tomorrow. WanMil

Hi WanMil,
On Mon, Mar 10, WanMil wrote:
mkgmap:street is only used for house number matching while compiling the maps.
I found the bug:
stripStreetName() in HousenumberGenerator.java removes the "(cylceway)" for comparing the streets. That's of course wrong, because now "Sandwall (cycleway)" matches "Sandwall", but this are two different streets.
I don't know why you are removing text in brackets here, but I think that's not correct. If somebody wants to do that for his map, he can do this in his style. But it is impossible to workaround this bug in the style.
Thorsten
Hi Thorsten,
good catch! Stripping the text within brackets is a relict from the time when mkgmap automatically assigned name="${name} (${ref})" and the mkgmap:street tag did not exist. That was before merging the mergeroads branch.
I will have a look on it tomorrow.
WanMil
Hi Thorsten, I have completely removed stripStreetName() so the street names (mkgmap:street on roads and addr:street on house numbers) are now taken as they are. I wonder if the makeCycleWay should add a "(cycleway)" to the name of cycleways? Maybe that should also be done by the style? WanMil
participants (3)
-
GerdP
-
Thorsten Kukuk
-
WanMil