logo separator

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

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

Hi Gerd

What I was expecting was that multiPolygonRelation generates 1 closed
way per distinct outer polyon and this has just the tags of the
relation. This is passed to 'lines' and 'polygons' matching.

My example is relation/1371699 which uses 9 ways (a mix of existing
roads and ways just created for the purpose) as outers to define a
single polygon.

What I'm seeing, with these in 'lines':

name='Littleton' & place=village & is_closed()=true {echotags
'lineLitVilTrue'}
name='Littleton' & place=village & is_closed()=false {echotags
'lineLitVilFalse'}
name='Littleton' & place=village [0x12 resolution 22]

1/ is no output from lineLitVilTrue

2/ 9 identical ways from lineLitVilFalse; I've removed some admin tags:
Way generated from 1371699 [landuse=residential,
mkgmap:cache_area_size=99714.294, mkgmap:mp_created=true,
mkgmap:stylefilter=polyline, name=Littleton, place=village]
lineLitVilFalse
Way generated from 1371699 [landuse=residential,
mkgmap:cache_area_size=99714.294, mkgmap:mp_created=true,
mkgmap:stylefilter=polyline, name=Littleton, place=village]
lineLitVilFalse
etc

3/ using GPSMapEdit, the generated line looks to be in 4 segments, some
of the outers from the relation have been joined, but it looks like it
has avoided joining where the base way tags conflict.

With this in 'polygons':
name='Littleton' & place=village {echotags 'polyLitVil'}
 and, as in default style:
place=village [0x03 resolution 22]

I get:
JoinedWay generated from 94665254 [landuse=residential,
mkgmap:cache_area_size=99714.294, mkgmap:mp_created=true,
mkgmap:stylefilter=polygon, name=Littleton, place=village] polyLitVil

which is as expected, and it shows correctly on the map.

I'm pretty sure the relation and have just loaded the latest data from
geofabrik .

I get about 4500 messages running 1 map tile with this in 'lines':
mkgmap:mp_created=true & is_closed()=false {echotags 'mpNotClosed'}

Ticker

On Thu, 2018-11-22 at 16:18 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> I don't understand what you expect here. The ways with tag
> mkgmap:mp_created
> are the result of the joining process. Normally they are closed.
> Is the one way that is reported a part of a broken MP?
> Maybe you expect that the members of a MP rel do also have a special
> tag?
> That would be something that you have to do in the relations style
> file.
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
> Gesendet: Donnerstag, 22. November 2018 17:03
> An: mkgmap development
> Betreff: [mkgmap-dev] closed ways and multi-polygon relations
> 
> 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
> relation.
> 
> 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'
> 
> Regards
> Ticker
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list