logo separator

[mkgmap-dev] closed ways and multi-polygon relations

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Thu Nov 22 16:03:51 GMT 2018

Hi Gerd

I'd hoped and expected that all polygons were fed into the 'lines'
style processing in a similar manner, regardless of their origin as
either a closed OSM way or generated by multiPolygonRelation. This
would allow simple testing using just 'is_closed()=true' to effect
lines around polygons if required.

Instead I find that, for a few examples I've looked at in detail, for
each outer way in a relation a way is passed into 'lines'. They all
have identical tags (from the relation) and is_closed()=false. It is
difficult to determine if these correspond directly to the ways in the

In the generated map, the line around the area might be in multiple
segments, so some logic appears to have merged some of the ways but not
others. In my example is seems as if merging has been prevented when
the original ways have conflicting tags (maybe just the name=)

Given that it isn't possible to differentiate the multiple outer ways
when passed in from multiPolygon, why doesn't it just pass in the
joined way that will be passed to the 'polygons' processing.

Also, assuming that later processing is joining some of these parts,
what stops it joining them all.

I can give you details of my example if required, but just having:

mkgmap:mp_created=true & is_closed()=false {echotags 'mpNotClosed'}

in 'lines' then looking for consecutive identical 'Way generated
from...' output and checking that there is only 1 output polygon will
yield a lot.

Another difference between closed ways and multi-polygons is that with
a closed way the object is passed through the rules of 'lines'
concatenated with 'polygons' and all the facilties of stopping after a
match/continue/with_actions work in a nice way, whereas with a multi
-polygon, even if it matches in 'lines', it is passed through
'polygons' as well; so extra conditions will is needed in 'polygons' to
determine if matched in 'lines'  


More information about the mkgmap-dev mailing list