logo separator

[mkgmap-dev] inc/address and --housenumbers

From GerdP gpetermann_muenchen at hotmail.com on Wed Apr 15 04:16:19 BST 2015

Hi all,

the default style uses the include inc/address in the finalize rules 
for points and lines. That means that OSM elements which are
not added to the map do not have corresponding tags like
mkgmap:city. 
The problem: For the --housenumber option we want to 
analyse all elements with addr:housenumber, we don't care
if the house is displayed as a polygon or as a point or not at all.

With the current default style most houses (= elements with
addr:housenumber) 
do NOT have a tag like mkgmap:city or mkgmap:country.

Now, this isn't a big problem in most cases because mkgmap has to attach
the address information to a road, and the road is added to the map
and therefor is passed through the inc/address rules.

I faced two situations where this is not sufficient:
1) A road can connect two or more cities. The current code
doesn't care about that. In the LocationHook we set the tags
like mkgmap:admin_level8 only once for the road (typically for a
point near the middle of the road), we don't recognize
the case that different points on the roads are in different cities.
A possible solution would be to call the LocationHook for each 
point on the road and split the road into parts before style processing.

2) A road may be the border or very close to the border of a city.
Houses on the left side are in city A, houses on the other side are
in city B. I think in this case we should add the road twice to the map
so that address search works. The problem: With the default
style most houses do not have the mkgmap:city tag because no
map object is created for them.
I think a quick and clear solution would be to add a tag 
mkgmap:execute_finalize_rules=1
to each element with addr:housenumber to tell
mkgmap that even if no map element is created the finalize
rules should be executed.

I'll implement that in the housenumber2 branch. Please let me
know when you see a better solution.

Gerd



--
View this message in context: http://gis.19327.n5.nabble.com/inc-address-and-housenumbers-tp5840656.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list