Re: [mkgmap-dev] if-then-else in style and style options

2017-03-07 Thread Gerd Petermann
Hi Andrzej,

thanks, so I'll try to document the new syntax next.

Gerd

Von: mkgmap-dev  im Auftrag von Andrzej 
Popowski 
Gesendet: Dienstag, 7. März 2017 17:40:16
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] if-then-else in style and style options

Hi Gerd,

I have run some tests with current code and spotted no problems. I have
tested both, if-then-else statement and style-option.

--
Best regards,
Andrzej
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] Can you help one more time with compile error mkgmap-r3834

2017-03-07 Thread greg crago
Thank you very much. Good thing I'm not driving!

On Tue, Mar 7, 2017 at 10:55 AM, Gerd Petermann <
gpetermann_muenc...@hotmail.com> wrote:

> Use !=  for not equal (instead of =!)
>
>
> 
> Von: mkgmap-dev  im Auftrag von
> greg crago 
> Gesendet: Dienstag, 7. März 2017 19:39:08
> An: Development list for mkgmap
> Betreff: [mkgmap-dev] Can you help one more time with compile error
>  mkgmap-r3834
>
> Code in POINTS:
>
> (line 313) power=generator & generator:source=wind &
> generator:method=wind_turbine [0x6419 resolution 22 continue]
> (line 314) power=generator & generator:method=!wind_turbine [0x6016
> resolution 22] # special point if Method NOT Wind Turbine
>
> Getting this compile error, It looks go to me:
>
> Found one style in \MKGMAP\BaseCamp-style\openmapchest
> Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
> ($generator:method) and NOT (!wind_turbine)
> could not open style openmapchest
> finished check-styles
> Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
> ($generator:method) and NOT (!wind_turbine)
> Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
> ($generator:method) and NOT (!wind_turbine)
> Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
> ($generator:method) and NOT (!wind_turbine)
> Could not open style
> Number of ExitExceptions: 1
> Time finished: Tue Mar 07 09:48:12 GMT-08:00 2017
> Total time taken: 1717ms
> Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
> ($generator:method) and NOT (!wind_turbine)
>
> Sorry, not seeing error
> Greg
>
> ___
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] Can you help one more time with compile error mkgmap-r3834

2017-03-07 Thread Gerd Petermann
Use !=  for not equal (instead of =!)



Von: mkgmap-dev  im Auftrag von greg 
crago 
Gesendet: Dienstag, 7. März 2017 19:39:08
An: Development list for mkgmap
Betreff: [mkgmap-dev] Can you help one more time with compile error 
mkgmap-r3834

Code in POINTS:

(line 313) power=generator & generator:source=wind & 
generator:method=wind_turbine [0x6419 resolution 22 continue]
(line 314) power=generator & generator:method=!wind_turbine [0x6016 resolution 
22] # special point if Method NOT Wind Turbine

Getting this compile error, It looks go to me:

Found one style in \MKGMAP\BaseCamp-style\openmapchest
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION 
($generator:method) and NOT (!wind_turbine)
could not open style openmapchest
finished check-styles
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION 
($generator:method) and NOT (!wind_turbine)
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION 
($generator:method) and NOT (!wind_turbine)
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION 
($generator:method) and NOT (!wind_turbine)
Could not open style
Number of ExitExceptions: 1
Time finished: Tue Mar 07 09:48:12 GMT-08:00 2017
Total time taken: 1717ms
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION 
($generator:method) and NOT (!wind_turbine)

Sorry, not seeing error
Greg

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Can you help one more time with compile error mkgmap-r3834

2017-03-07 Thread greg crago
Code in POINTS:

(line 313) power=generator & generator:source=wind &
generator:method=wind_turbine [0x6419 resolution 22 continue]
(line 314) power=generator & generator:method=!wind_turbine [0x6016
resolution 22] # special point if Method NOT Wind Turbine

Getting this compile error, It looks go to me:

Found one style in \MKGMAP\BaseCamp-style\openmapchest
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
($generator:method) and NOT (!wind_turbine)
could not open style openmapchest
finished check-styles
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
($generator:method) and NOT (!wind_turbine)
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
($generator:method) and NOT (!wind_turbine)
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
($generator:method) and NOT (!wind_turbine)
Could not open style
Number of ExitExceptions: 1
Time finished: Tue Mar 07 09:48:12 GMT-08:00 2017
Total time taken: 1717ms
Error in style: Error: (points:314): Invalid arguments to EQUALS: FUNCTION
($generator:method) and NOT (!wind_turbine)

Sorry, not seeing error
Greg
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] [Patch v1] nwe special tag mkgmap:residential

2017-03-07 Thread Gerd Petermann
Hi Ticker,

hmm, the messages are produced because I abuse the Boundary classes for the 
ResidentialHook.
It should say landuse=residential instead of admin_level=11. I'll see if I can 
fix that.
Anyway, the data in that area is probably wrong as landuse areas should not 
overlap.

Gerd

Von: mkgmap-dev  im Auftrag von Ticker 
Berkin 
Gesendet: Dienstag, 7. März 2017 18:10:49
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag mkgmap:residential

Hi Gerd

For an unrelated reason, I was just comparing logs of a run with trunk
(r-3834) with my version which contains up to r-3831 and mix of some of
your patches and my changes and, for trunk, for I get 140 or so lines
like:

WARN: uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryQuadTree
 74220042.osm.pbf: incorrect data:
http://www.openstreetmap.org/?mlat=51.795731=1.157684=17=
258759285 intersection of boundaries with same admin_level (11)
w258759285 w75394535

WARN: uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryQuadTree
 74220042.osm.pbf: incorrect data:
http://www.openstreetmap.org/?mlat=51.849289=1.089020=17=
199897090 intersection of boundaries with same admin_level (11)
w199897090 w60808537

Command was:
java -ea -Dlog.config=../mkgmap_log.props -jar
../mkgmap.trunk/mkgmap.jar --generate-sea=multipolygon --input
-file=74220042.osm.pbf

Not a problem for me, but can provide more info if required

Regards
Ticker

On Sun, 2017-03-05 at 16:59 +, Gerd Petermann wrote:
> I'd also like to know if it you have an idea how to improve the
> usability in case that it doesn't work ;-)
>
> Gerd
>
> 
> Von: mkgmap-dev  im Auftrag
> von nwillink 
> Gesendet: Sonntag, 5. März 2017 12:53:04
> An: mkgmap-dev@lists.mkgmap.org.uk
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
>
> Hi Gerd
>
> Thanks for the suggestion - will let you know when successful
>
>
> r
>
>
> Nick
>
> On 05/03/2017 11:43, Gerd Petermann [via GIS] wrote:
> Hi Nick,
>
> maybe you can check mkgmap:admin_level9..11 to decide if an element
> is in a village?
>
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 11:46:56
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
>
> Ok Gerd
>
> I didn't realise that , no wonder I'm having problems
>
> Thanks for looking into that.
>
> On 05/03/2017 10:44, Gerd Petermann [via GIS] wrote:
> Nick, sorry, I don't get it.
>
> With the patch the value in the new tag mkgmap:residential is
> evaluated before any style rule is used.
> I see no way for you to pass the information from a node or way with
> place=village to another element with building=*
>
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 11:32:14
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
>
> Gerd, that is a good point
>
> It was just a thought that since points are parsed first one could
> perhaps  set a  flag  when place=village is true
>
> then
>
> mkgmap:residiential=* & village=true . --> show buildings
>
>
> So I was not thinking of mkgmap specifically
>
> On 05/03/2017 10:08, Gerd Petermann [via GIS] wrote:
> Please explain what you meant with
> "Perhaps with some coding you could make exceptions for buildings in
> villages/hamlets..."
>
> Would that be code in mkgmap or in your style?
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 11:03:56
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
>
> Ok Thanks
>
> On 05/03/2017 09:34, Gerd Petermann [via GIS] wrote:
> Hi Nick,
>
> hmm, not sure what you want to point out.
> The tag mkgmap:residential may be set to other values than "yes",
> e.g.
> ways located in
> https://www.openstreetmap.org/way/454954092
> should have mkgmap:residential=Bahnhofsviertel
>
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 10:27:03
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
>
> Thanks Gerd
>
> Works a treat although in my style I had to use
>
> building=* & mkgmap:residential=yes {delete building}
>
> in both polygons and lines (outlines).
>
> Your efforts provide an addiitional  bonus in that you may just want
> to show
> just the faint outlines of buildings.
>
> Perhaps with some coding you could make exceptions for buildings in
> 

[mkgmap-dev] fixme rules

2017-03-07 Thread Andrzej Popowski

Hi,

there are some rules in include/name, designed to remove "fixme" value 
from tags. Unfortunately they are executed too late for many cases, for 
example for highway "name" and "ref".


I propose to add a file include/fixme to default style and include it at 
the beginning of points, lines and polygon files. This file could 
contain fixme rules and other rules, that are useful for all objects. I 
have found these functions useful:

- fixme rules
- setting mkgmap:country tag,
- correction for multipolygon without area=yes
- forcing finalize stage for address

I have attached proposed patch to this mail. It duplicate some rules 
from other includes, which could be removed there, but I haven't done it 
yet.


--
Best regards,
Andrzej
Index: resources/styles/default/inc/fixme
===
--- resources/styles/default/inc/fixme  (nonexistent)
+++ resources/styles/default/inc/fixme  (working copy)
@@ -0,0 +1,13 @@
+# set the country code for country dependent rules
+mkgmap:country!=* & mkgmap:admin_level2=* { set 
mkgmap:country='${mkgmap:admin_level2}' }
+mkgmap:country!=* & addr:country=* { set 
mkgmap:country='${addr:country|country-ISO:}' }
+mkgmap:country!=* & is_in:country=* { set 
mkgmap:country='${is_in:country|country-ISO:}' }
+
+# delete FIXME values (they should be better used in maintenance maps)
+ref ~ '(?i)fix[ _]?+me'{ delete ref; } 
+name ~ '(?i)fix[ _]?+me'   { delete name; }
+
+# correct multipolygons without area=yes
+mkgmap:mp_created=true { add area=yes }
+
+addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
Index: resources/styles/default/lines
===
--- resources/styles/default/lines  (revision 3834)
+++ resources/styles/default/lines  (working copy)
@@ -8,7 +8,7 @@
 # and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
 # for more information.
 
-addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
+include 'inc/fixme';
 
 aeroway=runway & highway!=* & is_closed()=false {name '${ref}'} [0x27 
resolution 20]
 (aeroway=taxiway | aeroway=taxilane) & highway!=* & is_closed()=false {name 
'${ref}'} [0x27 resolution 24]
Index: resources/styles/default/points
===
--- resources/styles/default/points (revision 3834)
+++ resources/styles/default/points (working copy)
@@ -8,7 +8,8 @@
 # and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
 # for more information.
 
-addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
+include 'inc/fixme';
+
 barrier=* & bicycle=*{ set mkgmap:bicycle='${bicycle|subst:private=>no}' }
 barrier=* & foot=*   { set mkgmap:foot='${foot|subst:private=>no}' }   
   
 barrier=* & hgv=*{ set mkgmap:truck='${hgv|subst:private=>no}' }   
   
Index: resources/styles/default/polygons
===
--- resources/styles/default/polygons   (revision 3834)
+++ resources/styles/default/polygons   (working copy)
@@ -8,7 +8,7 @@
 # and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
 # for more information.
 
-addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
+include 'inc/fixme';
 
 leisure=* & sport=* & name=* { set name='${name} (${sport})' }
 leisure=* & sport=* & name!=* { add name='${sport}' }
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] [Patch v1] nwe special tag mkgmap:residential

2017-03-07 Thread Ticker Berkin
Hi Gerd

For an unrelated reason, I was just comparing logs of a run with trunk
(r-3834) with my version which contains up to r-3831 and mix of some of
your patches and my changes and, for trunk, for I get 140 or so lines
like:

WARN: uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryQuadTree 
 74220042.osm.pbf: incorrect data: 
http://www.openstreetmap.org/?mlat=51.795731=1.157684=17=
258759285 intersection of boundaries with same admin_level (11)
w258759285 w75394535

WARN: uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryQuadTree 
 74220042.osm.pbf: incorrect data: 
http://www.openstreetmap.org/?mlat=51.849289=1.089020=17=
199897090 intersection of boundaries with same admin_level (11)
w199897090 w60808537

Command was:
java -ea -Dlog.config=../mkgmap_log.props -jar
../mkgmap.trunk/mkgmap.jar --generate-sea=multipolygon --input
-file=74220042.osm.pbf

Not a problem for me, but can provide more info if required

Regards
Ticker

On Sun, 2017-03-05 at 16:59 +, Gerd Petermann wrote:
> I'd also like to know if it you have an idea how to improve the
> usability in case that it doesn't work ;-)
> 
> Gerd
> 
> 
> Von: mkgmap-dev  im Auftrag
> von nwillink 
> Gesendet: Sonntag, 5. März 2017 12:53:04
> An: mkgmap-dev@lists.mkgmap.org.uk
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
> 
> Hi Gerd
> 
> Thanks for the suggestion - will let you know when successful
> 
> 
> r
> 
> 
> Nick
> 
> On 05/03/2017 11:43, Gerd Petermann [via GIS] wrote:
> Hi Nick,
> 
> maybe you can check mkgmap:admin_level9..11 to decide if an element
> is in a village?
> 
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 11:46:56
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
> 
> Ok Gerd
> 
> I didn't realise that , no wonder I'm having problems
> 
> Thanks for looking into that.
> 
> On 05/03/2017 10:44, Gerd Petermann [via GIS] wrote:
> Nick, sorry, I don't get it.
> 
> With the patch the value in the new tag mkgmap:residential is
> evaluated before any style rule is used.
> I see no way for you to pass the information from a node or way with
> place=village to another element with building=*
> 
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 11:32:14
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
> 
> Gerd, that is a good point
> 
> It was just a thought that since points are parsed first one could
> perhaps  set a  flag  when place=village is true
> 
> then
> 
> mkgmap:residiential=* & village=true . --> show buildings
> 
> 
> So I was not thinking of mkgmap specifically
> 
> On 05/03/2017 10:08, Gerd Petermann [via GIS] wrote:
> Please explain what you meant with
> "Perhaps with some coding you could make exceptions for buildings in
> villages/hamlets..."
> 
> Would that be code in mkgmap or in your style?
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 11:03:56
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
> 
> Ok Thanks
> 
> On 05/03/2017 09:34, Gerd Petermann [via GIS] wrote:
> Hi Nick,
> 
> hmm, not sure what you want to point out.
> The tag mkgmap:residential may be set to other values than "yes",
> e.g.
> ways located in
> https://www.openstreetmap.org/way/454954092
> should have mkgmap:residential=Bahnhofsviertel
> 
> Gerd
> 
> Von: mkgmap-dev <[hidden
> email]> im Auftrag
> von nwillink <[hidden
> email]>
> Gesendet: Sonntag, 5. März 2017 10:27:03
> An: [hidden email]
> Betreff: Re: [mkgmap-dev] [Patch v1] nwe special tag
> mkgmap:residential
> 
> Thanks Gerd
> 
> Works a treat although in my style I had to use
> 
> building=* & mkgmap:residential=yes {delete building}
> 
> in both polygons and lines (outlines).
> 
> Your efforts provide an addiitional  bonus in that you may just want
> to show
> just the faint outlines of buildings.
> 
> Perhaps with some coding you could make exceptions for buildings in
> villages/hamlets...
> 
> Nick
> 
> 
> 
> 
> 
> --
> View this message in context: http://gis.19327.n8.nabble.com/Patch-v1
> -nwe-special-tag-mkgmap-residential-tp5892342p5892424.html
> Sent from the Mkgmap Development mailing list archive at Nabble.com.
> ___
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> ___
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> 
> 

Re: [mkgmap-dev] if-then-else in style and style options

2017-03-07 Thread Andrzej Popowski

Hi Gerd,

I have run some tests with current code and spotted no problems. I have 
tested both, if-then-else statement and style-option.


--
Best regards,
Andrzej
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] compile error "Stack size is 2" with mkgmap-r3834

2017-03-07 Thread greg crago
Thanks. Looked but could not see

On Tue, Mar 7, 2017 at 7:01 AM, greg crago  wrote:

> Using this line in my POINTS file:
>
> power=generator & generator:source=wind & generator:method=wind_turbine
> [0x6419 resolution 22] continue
> power=generator [0x6016 resolution 22] # special point if Method NOT Wind
> Turbine
>
> I get this compile result:
>
> Found one style in \MKGMAP\BaseCamp-style\openmapchest
> Error in style: Error: (points:315): Stack size is 2
> could not open style openmapchest
> finished check-styles
> Error in style: Error: (points:315): Stack size is 2
> Error in style: Error: (points:315): Stack size is 2
> Error in style: Error: (points:315): Stack size is 2
> Could not open style
> Number of ExitExceptions: 1Error in style: Error: (points:315): Stack size
> is 2
>
> Can I use multiple "&"?
>
> Greg
>
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] compile error "Stack size is 2" with mkgmap-r3834

2017-03-07 Thread Gerd Petermann
Hi Greg,

first line is wrong, you have to place the word continue before the closing 
brackets "]"

Gerd

Von: mkgmap-dev  im Auftrag von greg 
crago 
Gesendet: Dienstag, 7. März 2017 16:01:05
An: Development list for mkgmap
Betreff: [mkgmap-dev] compile error "Stack size is 2" with mkgmap-r3834

Using this line in my POINTS file:

power=generator & generator:source=wind & generator:method=wind_turbine [0x6419 
resolution 22] continue
power=generator [0x6016 resolution 22] # special point if Method NOT Wind 
Turbine

I get this compile result:

Found one style in \MKGMAP\BaseCamp-style\openmapchest
Error in style: Error: (points:315): Stack size is 2
could not open style openmapchest
finished check-styles
Error in style: Error: (points:315): Stack size is 2
Error in style: Error: (points:315): Stack size is 2
Error in style: Error: (points:315): Stack size is 2
Could not open style
Number of ExitExceptions: 1Error in style: Error: (points:315): Stack size is 2

Can I use multiple "&"?

Greg
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] compile error "Stack size is 2" with mkgmap-r3834

2017-03-07 Thread greg crago
Using this line in my POINTS file:

power=generator & generator:source=wind & generator:method=wind_turbine
[0x6419 resolution 22] continue
power=generator [0x6016 resolution 22] # special point if Method NOT Wind
Turbine

I get this compile result:

Found one style in \MKGMAP\BaseCamp-style\openmapchest
Error in style: Error: (points:315): Stack size is 2
could not open style openmapchest
finished check-styles
Error in style: Error: (points:315): Stack size is 2
Error in style: Error: (points:315): Stack size is 2
Error in style: Error: (points:315): Stack size is 2
Could not open style
Number of ExitExceptions: 1Error in style: Error: (points:315): Stack size
is 2

Can I use multiple "&"?

Greg
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] if-then-else in style and style options

2017-03-07 Thread Gerd Petermann
Hi Dave,

the coding is done unless one finds errors. Only documentation is missing.
I hoped to get some feedback that it really improves readabilty (as it cannot 
improve performance for now).

Gerd


Von: mkgmap-dev  im Auftrag von Dave 
Swarthout 
Gesendet: Dienstag, 7. März 2017 15:40:40
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] if-then-else in style and style options

I'm sorry Gerd, I want to experiment with the new statements but I just don't 
have the time to play at the moment. Please commit the changes if you haven't 
already, and I'll get the new version and experiment when I can.

Dave

On Tue, Mar 7, 2017 at 9:09 PM, Gerd Petermann 
> wrote:
Any feedback on this?

If nobody is interested in using if-then-else in style I'd be happy to use only 
the style-option_v3.patch
for trunk.

Gerd

Von: mkgmap-dev 
>
 im Auftrag von Gerd Petermann 
>
Gesendet: Mittwoch, 1. März 2017 15:54:02
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: [mkgmap-dev] if-then-else  in style and style options

Hi all,

I've applied the style-option_v3.patch to the branch, for details see  log 
message:
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=3827

I've also tried to fix the known problems with the interpretation of if then 
statements,
so I hope it works now:
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=%2F;

Just to make this clear: The if statements are translated to "normal" rules, so 
you cannot do anything
with if-then which would not work without, you should also not (yet) exprect 
run time improvements.
The advantage is that you don't have to repeat phrases.

A complex sample that shows a possible usage.
# Roundabouts
if (junction=roundabout) then
if (mkgmap:option:single-roundabout=true) then
(highway=trunk | highway=trunk_link) [0x0c road_class=4 
road_speed=2 resolution 18]
(highway=primary | highway=primary_link) [0x0c road_class=3 
road_speed=2 resolution 19]
(highway=secondary | highway=secondary_link) [0x0c road_class=2 
road_speed=2 resolution 20]
(highway=tertiary | highway=tertiary_link) [0x0c road_class=1 
road_speed=1 resolution 21]
else
(highway=trunk | highway=trunk_link) [0x0c road_class=4 
road_speed=2 resolution 24 continue]
(highway=trunk | highway=trunk_link) [0x10801 resolution 18]

(highway=primary | highway=primary_link) [0x0c road_class=3 
road_speed=2 resolution 24 continue]
(highway=primary | highway=primary_link) [0x10802 resolution 19]

(highway=secondary | highway=secondary_link) [0x0c road_class=2 
road_speed=2 resolution 24 continue]
(highway=secondary | highway=secondary_link) [0x10803 
resolution 20]

(highway=tertiary | highway=tertiary_link) [0x0c road_class=1 
road_speed=1 resolution 24 continue]
(highway=tertiary | highway=tertiary_link) [0x10804 resolution 
21]
end
# minor roundabouts need no overlay
(highway=unclassified | highway=minor ) [0x0c road_class=1 road_speed=1 
resolution 21]
highway=* [0x0c road_class=0 road_speed=1 resolution 22]
end

If the corresponding block in the default style lines file is replaced with 
these rules, you can
use option --style-option=single-roundabout to enable the rules which don't add 
0x180x lines as overlays for roundabouts.

It might be possible to completely remove rules which would never be triggered 
but that is quite complex, so I leave that for later.

Gerd
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] if-then-else in style and style options

2017-03-07 Thread Dave Swarthout
I'm sorry Gerd, I want to experiment with the new statements but I just
don't have the time to play at the moment. Please commit the changes if you
haven't already, and I'll get the new version and experiment when I can.

Dave

On Tue, Mar 7, 2017 at 9:09 PM, Gerd Petermann <
gpetermann_muenc...@hotmail.com> wrote:

> Any feedback on this?
>
> If nobody is interested in using if-then-else in style I'd be happy to use
> only the style-option_v3.patch
> for trunk.
>
> Gerd
> 
> Von: mkgmap-dev  im Auftrag von
> Gerd Petermann 
> Gesendet: Mittwoch, 1. März 2017 15:54:02
> An: mkgmap-dev@lists.mkgmap.org.uk
> Betreff: [mkgmap-dev] if-then-else  in style and style options
>
> Hi all,
>
> I've applied the style-option_v3.patch to the branch, for details see  log
> message:
> http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=3827
>
> I've also tried to fix the known problems with the interpretation of if
> then statements,
> so I hope it works now:
> http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=%2F;
>
> Just to make this clear: The if statements are translated to "normal"
> rules, so you cannot do anything
> with if-then which would not work without, you should also not (yet)
> exprect run time improvements.
> The advantage is that you don't have to repeat phrases.
>
> A complex sample that shows a possible usage.
> # Roundabouts
> if (junction=roundabout) then
> if (mkgmap:option:single-roundabout=true) then
> (highway=trunk | highway=trunk_link) [0x0c road_class=4
> road_speed=2 resolution 18]
> (highway=primary | highway=primary_link) [0x0c
> road_class=3 road_speed=2 resolution 19]
> (highway=secondary | highway=secondary_link) [0x0c
> road_class=2 road_speed=2 resolution 20]
> (highway=tertiary | highway=tertiary_link) [0x0c
> road_class=1 road_speed=1 resolution 21]
> else
> (highway=trunk | highway=trunk_link) [0x0c road_class=4
> road_speed=2 resolution 24 continue]
> (highway=trunk | highway=trunk_link) [0x10801 resolution
> 18]
>
> (highway=primary | highway=primary_link) [0x0c
> road_class=3 road_speed=2 resolution 24 continue]
> (highway=primary | highway=primary_link) [0x10802
> resolution 19]
>
> (highway=secondary | highway=secondary_link) [0x0c
> road_class=2 road_speed=2 resolution 24 continue]
> (highway=secondary | highway=secondary_link) [0x10803
> resolution 20]
>
> (highway=tertiary | highway=tertiary_link) [0x0c
> road_class=1 road_speed=1 resolution 24 continue]
> (highway=tertiary | highway=tertiary_link) [0x10804
> resolution 21]
> end
> # minor roundabouts need no overlay
> (highway=unclassified | highway=minor ) [0x0c road_class=1
> road_speed=1 resolution 21]
> highway=* [0x0c road_class=0 road_speed=1 resolution 22]
> end
>
> If the corresponding block in the default style lines file is replaced
> with these rules, you can
> use option --style-option=single-roundabout to enable the rules which
> don't add 0x180x lines as overlays for roundabouts.
>
> It might be possible to completely remove rules which would never be
> triggered but that is quite complex, so I leave that for later.
>
> Gerd
> ___
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> ___
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>



-- 
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

[mkgmap-dev] Commit r3834: Refactoring (no effect on img output expected)

2017-03-07 Thread svn commit
Version mkgmap-r3834 was committed by gerd on Tue, 07 Mar 2017

Refactoring (no effect on img output expected)
- Add new class NameFinder to handle the name-tag-list option instead of 
various very similar routines
- add and use new method Element.getCopyOfTags() instead of iterators
- simplify code to detect Boundary

http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=3834
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] if-then-else in style and style options

2017-03-07 Thread Gerd Petermann
Any feedback on this?

If nobody is interested in using if-then-else in style I'd be happy to use only 
the style-option_v3.patch
for trunk.

Gerd

Von: mkgmap-dev  im Auftrag von Gerd 
Petermann 
Gesendet: Mittwoch, 1. März 2017 15:54:02
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: [mkgmap-dev] if-then-else  in style and style options

Hi all,

I've applied the style-option_v3.patch to the branch, for details see  log 
message:
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=3827

I've also tried to fix the known problems with the interpretation of if then 
statements,
so I hope it works now:
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=%2F;

Just to make this clear: The if statements are translated to "normal" rules, so 
you cannot do anything
with if-then which would not work without, you should also not (yet) exprect 
run time improvements.
The advantage is that you don't have to repeat phrases.

A complex sample that shows a possible usage.
# Roundabouts
if (junction=roundabout) then
if (mkgmap:option:single-roundabout=true) then
(highway=trunk | highway=trunk_link) [0x0c road_class=4 
road_speed=2 resolution 18]
(highway=primary | highway=primary_link) [0x0c road_class=3 
road_speed=2 resolution 19]
(highway=secondary | highway=secondary_link) [0x0c road_class=2 
road_speed=2 resolution 20]
(highway=tertiary | highway=tertiary_link) [0x0c road_class=1 
road_speed=1 resolution 21]
else
(highway=trunk | highway=trunk_link) [0x0c road_class=4 
road_speed=2 resolution 24 continue]
(highway=trunk | highway=trunk_link) [0x10801 resolution 18]

(highway=primary | highway=primary_link) [0x0c road_class=3 
road_speed=2 resolution 24 continue]
(highway=primary | highway=primary_link) [0x10802 resolution 19]

(highway=secondary | highway=secondary_link) [0x0c road_class=2 
road_speed=2 resolution 24 continue]
(highway=secondary | highway=secondary_link) [0x10803 
resolution 20]

(highway=tertiary | highway=tertiary_link) [0x0c road_class=1 
road_speed=1 resolution 24 continue]
(highway=tertiary | highway=tertiary_link) [0x10804 resolution 
21]
end
# minor roundabouts need no overlay
(highway=unclassified | highway=minor ) [0x0c road_class=1 road_speed=1 
resolution 21]
highway=* [0x0c road_class=0 road_speed=1 resolution 22]
end

If the corresponding block in the default style lines file is replaced with 
these rules, you can
use option --style-option=single-roundabout to enable the rules which don't add 
0x180x lines as overlays for roundabouts.

It might be possible to completely remove rules which would never be triggered 
but that is quite complex, so I leave that for later.

Gerd
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Commit r3833: remove useless code

2017-03-07 Thread svn commit
Version mkgmap-r3833 was committed by gerd on Tue, 07 Mar 2017

remove useless code 

No need to store isIso flag because input data is filtered to make sure that 
ISO 
name is found.



http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=3833
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev