Hi Joris,

I see no easy way to calculate the value on demand, but the function 
area_size() sets a tag mkgmap:cache_area_size when called for the first time.
The attached patch uses this feature for a rather dirty trick. It calls the 
functionn before the node for the POI is generated, therefore the new tag is 
also copied to the node.
So, you can use something like
mkgmap:area2poi=true & mkgmap:cache_area_size > 1000 {do something ...}

Disadvantage:
The area size is calculated for all polygons, and additional memory is needed 
to store the value as the tag is added to the polygon way and the POI.

BTW: The current code calculates and stores the value like this:
mkgmap:cache_area_size="45.771240234375"
I assume it would be good enough to store the rounded value as
mkgmap:cache_area_size="46"

A compiled binary can be found here:
http://files.mkgmap.org.uk/download/358/mkgmap.jar

Please let me know if this works for you.
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Joris 
Bo <[email protected]>
Gesendet: Freitag, 29. September 2017 19:22
An: [email protected]
Betreff: [mkgmap-dev] mkgmap:area2poi in combination with area_size()

Hello

Using the mkgmap:area2poi feature it’s easy to create a poi for a polygon but i 
would like to combine that with the area_size() function
Eg. Only show poi-icons on larger areas (forest, industrial areas, commercial 
areas etc.) and not if they are small of size
Is there a way to achieve this?

mkgmap:area2poi is added after processing the ‘relations’ file, and in this 
relations file, area_size() is not supported
Can this property be made available by default or be added somewhere before 
processing the points file?

Thx in advance
Gr Joris Bovens

Attachment: poi_aera.patch
Description: poi_aera.patch

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to