logo separator

[mkgmap-dev] area_size() function to be used in points file

From Joris Bo jorisbo at hotmail.com on Thu Apr 19 06:20:44 BST 2018

Hi Gerd,

Yes, the only change in between was the mkmap.jar file.
In both situations it looks like its processing the points file first, then the lines and then de polygons. I don't; know if that's the common order.

In your post form 30-9 you wrote that you use a dirty trick which causes possible extra memory consumption. Probably for that reason it never ended up in the main branch?

Gr Joris


Your post from 30-9-2017 says
=================================================================================================
[mkgmap-dev] mkgmap:area2poi in combination with area_size()
>From Gerd Petermann GPetermann_muenchen at hotmail.com on Sat Sep 30 06:10:01 BST 2017
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
=================================================================================================



-----Oorspronkelijk bericht-----
Van: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> Namens Gerd Petermann
Verzonden: woensdag 18 april 2018 23:13
Aan: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Onderwerp: Re: [mkgmap-dev] area_size() function to be used in points file

Hi Joris,

the patch was for the use in the lines file, and I think I've committed it unchanged:
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4159

I have no idea why the generated POI for way 29044917  has different attributes, the patch was for way members of multipolygon relations. I don't even understand how the POI can have the mkgmap:cache_area_size tag.
The tag is added by the code that handles multipolygons and by the style function area_size, which only works with ways.
My current understanding is that the POI is generated before the evaluation of the style, so I don't see a way that the tag is assigned by mkgmap. I assume that you used the same input files and options for the above results?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Joris Bo <jorisbo at hotmail.com>
Gesendet: Mittwoch, 18. April 2018 22:39:40
An: Development list for mkgmap
Betreff: [mkgmap-dev] area_size() function to be used in points file

Hello Gerd

A while a go (30-9-2017) you made a patch to make the usage of  the area_size() function available in the points-file through the mkgmap:cache_area_size  value.
I used it to only display names and symbols on bigger area's to avoid cluttering.

In the latest releases up to 4165 you mentioned fixes with 'area_size()' being not  yet branched and some others  which are branched. I lost the overview a little bit.

I tested the special build of 30-9-2017 which does make the mkgmap:cache_area_size  value available in the points file. (Example 1) and compared it to the mkgmap build 4165 (Example 2) which does not.

Does this mean this feature is not branched or can I achieve a similar result else way?
Thanx in advance

Kind regards
Joris

mkgmap 30-9-2017 Example 1 (ok - mkgmap:cache_area_size available in poi)
-----------------------------------------------------------------------------------------------------------------------------------
Node generated from 29044917 [building=yes, jbprocessedpoints=true, leisure=sports_centre, mkgmap:admin_level2=NOR, mkgmap:admin_level4=Oslo, mkgmap:admin_level7=Oslo, mkgmap:admin_level9=Nordstrand, mkgmap:area2poi=true, mkgmap:cache_area_size=2658.2913818359375, mkgmap:country=NOR, name=Ekeberghallen] all

Way 29044917 [building=yes, jbprocessedlines=true, leisure=sports_centre, mkgmap:admin_level2=NOR, mkgmap:admin_level4=Oslo, mkgmap:admin_level7=Oslo, mkgmap:admin_level9=Nordstrand, mkgmap:cache_area_size=2658.2913818359375, name=Ekeberghallen] all

Way 29044917 [building=yes, jbprocessedlines=true, jbprocessedpolygons=true, leisure=sports_centre, mkgmap:admin_level2=NOR, mkgmap:admin_level4=Oslo, mkgmap:admin_level7=Oslo, mkgmap:admin_level9=Nordstrand, mkgmap:cache_area_size=2658.2913818359375, mkgmap:city=Nordstrand, mkgmap:country=NOR, mkgmap:region=Oslo, name=Ekeberghallen] all

mkgmap-4165 Example 2  ('not ok' - mkgmap:cache_area_size not available in poi anymore)
-----------------------------------------------------------------------------------------------------------------------------------
Node generated from 29044917 [building=yes, jbprocessedpoints=true, leisure=sports_centre, mkgmap:admin_level2=NOR, mkgmap:admin_level4=Oslo, mkgmap:admin_level7=Oslo, mkgmap:admin_level9=Nordstrand, mkgmap:area2poi=true, mkgmap:country=NOR, name=Ekeberghallen] all

Way 29044917 [building=yes, jbprocessedlines=true, leisure=sports_centre, mkgmap:admin_level2=NOR, mkgmap:admin_level4=Oslo, mkgmap:admin_level7=Oslo, mkgmap:admin_level9=Nordstrand, mkgmap:cache_area_size=2658.2913818359375, name=Ekeberghallen] all

Way 29044917 [building=yes, jbprocessedlines=true, jbprocessedpolygons=true, leisure=sports_centre, mkgmap:admin_level2=NOR, mkgmap:admin_level4=Oslo, mkgmap:admin_level7=Oslo, mkgmap:admin_level9=Nordstrand, mkgmap:cache_area_size=2658.2913818359375, mkgmap:city=Nordstrand, mkgmap:country=NOR, mkgmap:region=Oslo, name=Ekeberghallen] all

_______________________________________________
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