logo separator

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

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Fri Nov 23 10:28:05 GMT 2018

Hi

I like the solution to have the same behaviour as a polygon that comes
from a closed way: the joined way is passed to a concatenation of the
lines and polygons rules. It has the tags of the relation and
mkgmap:mp_created=true but mkgmap:stylefilter=poly{line/gon} is not
added.

The option that was removed in Rev 1694 was:
--process-boundary-relations
	When reading OSM files, boundary relations are processed. By
default
        they are not processed because most of the boundary relations
are
        incomplete due to splitting of OSM files. When processing these
        incomplete multipolygons additional artificial boundary lines
are
        created on the tile bounds.

and the logic added is commented:
// Go through all original outer ways, create a copy, tag them
// with the mp tags and mark them only to be used for polyline
processing
// This enables the style file to decide if the polygon information or
// the simple line information should be used.
      
Assuming there isn't a problem now when parts of a multipolygon are
outside the tile, I don't see any problem with the suggested solution.

Is there any other difficulty with bounds processing, ie does
bounds.zip feed in to mp processing and act as a replacement for
relations where type=boundary or is it simply used for filling in
location details? 

In the mean time I'm happy to use 
  (is_closed() | mkgmap:mp_created=true)
in 'lines' and convoluted logic in 'polygons' where I need to prevent a
shape being generated because I only wanted a line.

As a slight aside, I think that 'lines' should never {add area=yes}
just because it is dealing with a polygon. It can be tested, with an
assumption of yes or no, depending on the context, to chose a line or a
polygon.

Regards
Ticker 


On Fri, 2018-11-23 at 01:12 -0600, Gerd Petermann wrote:
> Hi,
> 
> first I'd like to say it works as intended, see 
> http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=1694
> 
> Unfortunately WanMil is no longer active here, so I have no way to
> ask him
> why 
> he deicded to use copies of the original ways instead of the joined
> way.
> Anyway,
> for ways with mkgmap:mp_created=true one should not use is_closed(),
> the
> important information is in 
> mkgmap:stylefilter.
> I think the current implementation is not good because it creates
> lots of
> objects instead of a few, maybe only one. Each one is processed in
> the style
> and later the mergel-ine algo tries to put them together again.
> 
> Gerd
> 
> popej wrote
> > Hi Gerd,
> > 
> >  > are in fact copies of the original way members of the MP and
> > those are
> >  > typically not closed
> > 
> > I see 3 possible solutions:
> > 1. Convert multipolygon ways to a proper, continuous outline.
> > 2. Return is_closed() as true, when mkgmap:mp_created is true.
> > 3. Add info to documentation, that lines with
> > mkgmap:mp_created=true are 
> > part of a closed outline, but not necessary result in
> > is_closed()=true.
> > 
> > I would suggest solution 3.
> > 
> > I assume that is_closed() means, that object could be a polygon,
> > while 
> > mkgmap:mp_created=true or area=yes describe a more complex object,
> > but 
> > essentially a kind of polygon too.
> 
> 
> 
> 
> 
> --
> Sent from: 
> http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
> _______________________________________________
> 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