logo separator

[mkgmap-dev] Support place polygons in preprocessed bounds

From "Maxim Düster" maxc at gmx.de on Tue Jan 27 13:03:30 GMT 2015

Hello Gerd,
 
thank you for your reply. Regarding your surprising: you mean that the *.bnd files from the patched version can be used by the non-patched one? Hmm... shouldn't it behave like this? :) I have been thinking, it would just write additional boundaries with their attributes into the bnd files, but as the trunk version cannot use it, they are just ignored and don't disturb it. Anyway, for me it seems to work: after pre-compiling boundaries with the additional rule for osmfilter, I have access to the variables mkgmap:place and mkgmap:place_name which are set to meaningful values.
You pointed out an interesting thing: it didn't come to my mind, place polygons could overlap. But actually, two city/town/hamlet/... polygons should not intersect as an object cannot belong to two localities. Or am I wrong? Probably I was too idealistic :)
Update: In my region I found a place=town and a place=village that intersect, but it must be an error in the data.
Anyway, I will think once more about this all and will have a look at the utilities you mentioned.
 
Max
 
---------------------------------------------
>From Gerd Petermann gpetermann_muenchen at hotmail.com on Mon Jan 26 14:03:52 GMT 2015
 
Hi Maxim,

thanks for the patch. I was a bit surprised to notice that the
output produced by the patched version is still usable by the
trunk version.
I did not see any change to handle e.g. overlapping
place polygons.
Do you plan to change the utility programs
like BoundaryFile2Gpx, BoundaryCoverageUtil, and BoundaryDiff
so that one can verify the results?

Gerd
---------------------------------------------
From: maxc at gmx.de[http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev]
To: mkgmap-dev at lists.mkgmap.org.uk[http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev[http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev]]
Date: Mon, 26 Jan 2015 11:21:07 +0100
Subject: [mkgmap-dev] Support place polygons in preprocessed bounds

Hello everybody!

I've attached a patch that supports processing of place polygons in precompiled bounds and using of this information in the style file. See my earlier message: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2015q1/022619.html[http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2015q1/022619.html].[http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2015q1/022619.html[http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2015q1/022619.html].]

You can use it like following (as example):

# Russia
mkgmap:country=RUS & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' }
mkgmap:country=RUS & mkgmap:city!=* & (mkgmap:place=city | mkgmap:place=town) { set mkgmap:city='${mkgmap:place_name}' }
mkgmap:country=RUS & mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' }

To get this working, you have to create your own set of precompiled bounds with additional rule "type=multipolygon and place= and name=" for osmfilter and a run of BoundaryPreprocessor to set the variables mkgmap:place (attribute 'place' from the multipolygon) and mkgmap:place_name (attribute 'name' from the multipolygon).

Cheers!

Max


More information about the mkgmap-dev mailing list