Hi Gerd,
thanks a lot!
I tried the binary with the new option and it works exactly as I want it.
To the .args-file I added
> x-is-in-landuse=residential,cemetery,industrial
and to the beginning of lines
> highway=* & mkgmap:cemetery=* {set highway=path}
Result is, as expected, the unified representation of lines inside the asked landuse.
Other landuse-tags seem to work as well, I also played with allotments successfully:
—x-is-in-landuse=residential,cemetery,allotments,industrial
So, even with this „rough“ approach only for landuse, it´s a huge step ahead. Hopefully the option will remain in later releases.
Unfortunately, me either am not able to dig into code to generalize the function.
Jan
Hi Jan,sorry, I compiled the binary before removing some debug code. Here is a clean one:http://files.mkgmap.org.uk/download/459/mkgmap.jarGerd________________________________________Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com>Gesendet: Montag, 9. Dezember 2019 16:31An: Development list for mkgmapBetreff: Re: [mkgmap-dev] Use of is_in in styleHi 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,industrialWithout 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 likemkgmap:residential or mkgmap:industrialThis 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.jarPlease 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@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com>Gesendet: Montag, 9. Dezember 2019 14:18An: Development list for mkgmapBetreff: Re: [mkgmap-dev] Use of is_in in styleHi 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@lists.mkgmap.org.uk> im Auftrag von jan_m23@gmx.net <jan_m23@gmx.net>Gesendet: Montag, 9. Dezember 2019 13:15An: mkgmap-dev@lists.mkgmap.org.ukBetreff: [mkgmap-dev] Use of is_in in styleCan 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#a5890836Thanks_______________________________________________mkgmap-dev mailing listmkgmap-dev@lists.mkgmap.org.ukhttp://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<LanduseHook.java>_______________________________________________mkgmap-dev mailing listmkgmap-dev@lists.mkgmap.org.ukhttp://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev