logo separator

[mkgmap-dev] Use of is_in in style

From Gerd Petermann gpetermann_muenchen at hotmail.com on Mon Dec 9 15:31:58 GMT 2019

Hi Jan,

attached source could replace ResidentialHook. It implements new option --x-is-in-landuse so that one can use e.g.
--x-is-in-landuse=residential,cemetery,industrial
Without any option it works like the old ResidentialHook.

For each given value, mkgmap checks if an element is inside a landuse with that value, if so, it adds the corresponding tag like
mkgmap:residential or mkgmap:industrial
This is all done before the style rules are executed, so all calculations are done for all elements. With a bit more work I can also add other polygon tags like natural=* or place=* but it would probably slow down mkgmap and require a lot more heap.
A binary compiled with this is source is here:
http://files.mkgmap.org.uk/download/458/mkgmap.jar
Please try if it works for you.

I'd prefer to have a general style function like is_in which could be used with is_in(landuse=cemetery)  or is_in(natural=wood) but I have no idea how to implement the syntax parser etc.

Gerd




________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Montag, 9. Dezember 2019 14:18
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Use of is_in in style

Hi Jan,

the result of the is_in discussion was the ResidentialHook which computes the special tag mkgmap:residential.
It would be possible to duplicate the code to calculate also a tag for landuse=cemetary.
Not sure if that makes sense?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von jan_m23 at gmx.net <jan_m23 at gmx.net>
Gesendet: Montag, 9. Dezember 2019 13:15
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: [mkgmap-dev] Use of is_in in style

Can mkgmap use is_in to filter out objects inside specific (multi)polygons?

In my case I´d like to unify ways inside cemeteries/grave-yards, e.g.
> highway=* & is_in:landuse=cemetery {set highway=path}

Check-styles isn´t complaining of the syntax, but the rule has no effect.

Similar has been discussed here, but without particular answer:
http://gis.19327.n8.nabble.com/is-in-filter-td5890564.html#a5890836

Thanks
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LanduseHook.java
Type: application/octet-stream
Size: 5127 bytes
Desc: LanduseHook.java
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20191209/a3ae17ca/attachment.obj>


More information about the mkgmap-dev mailing list