Commit: r3289: Style filter arguments can now be quoted.

Version mkgmap-r3289 was committed by steve on Tue, 03 Jun 2014 Style filter arguments can now be quoted. For backward compatibility you don't have to quote arguments that contain spaces or symbols but its a good idea to do so from now on. The documentation has been updated to follow this guideline. You can now use a pipe symbol in a regular expression which there was no way of doing before. Eg: ${name|subst:"(Dr|Doctor|Dokter) ~>Doktor "}

Am Dienstag, 3. Juni 2014, 13:20:14 schrieb svn commit:
Version mkgmap-r3289 was committed by steve on Tue, 03 Jun 2014
Style filter arguments can now be quoted.
For backward compatibility you don't have to quote arguments that contain spaces or symbols but its a good idea to do so from now on. The documentation has been updated to follow this guideline.
You can now use a pipe symbol in a regular expression which there was no way of doing before.
Eg: ${name|subst:"(Dr|Doctor|Dokter) ~>Doktor "} _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Got this error with r3290, Maybe it is something wrong in my style after this commit, but i can't find it. Any hints? Bernd II: Now building bikemap Time started: Tue Jun 03 17:21:13 CEST 2014 java.lang.IllegalStateException: No match found at java.util.regex.Matcher.group(Matcher.java:485) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.addFilter(ValueBuilder.java:195) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.addTagValue(ValueBuilder.java:179) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.compile(ValueBuilder.java:140) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.<init>(ValueBuilder.java:52) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.<init>(ValueBuilder.java:47) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuildedAction.add(ValueBuildedAction.java:30) at uk.me.parabola.mkgmap.osmstyle.actions.AddTagAction.<init>(AddTagAction.java:47) at uk.me.parabola.mkgmap.osmstyle.actions.ActionReader.readTagValue(ActionReader.java:169) at uk.me.parabola.mkgmap.osmstyle.actions.ActionReader.readActions(ActionReader.java:60) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader.java:117) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.checkCommand(RuleFileReader.java:192) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader.java:109) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.load(RuleFileReader.java:86) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readRules(StyleImpl.java:302) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:160) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readStyle(StyleImpl.java:554) at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.init(RelationStyleHook.java:38) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.pluginChain(OsmMapDataSource.java:185) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMapDataSource.java:153) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:43) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:253) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:249) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

Hi Bernd, the problem is your include phone. It contains a few lines like this: cs:phone=* & mkgmap:country=IRL {set cs:phone='${cs:phone|subst:^00~>+|subst:[- ()]~>|subst:^0~>+353|subst:^+3530~>+353}'} If you change them so that the action block doesn't span two lines it seems to work. I don't know if this should be fixed in the code. Gerd Bernd Weigelt wrote
Am Dienstag, 3. Juni 2014, 13:20:14 schrieb svn commit:
Version mkgmap-r3289 was committed by steve on Tue, 03 Jun 2014
Style filter arguments can now be quoted.
For backward compatibility you don't have to quote arguments that contain spaces or symbols but its a good idea to do so from now on. The documentation has been updated to follow this guideline.
You can now use a pipe symbol in a regular expression which there was no way of doing before.
Eg: ${name|subst:"(Dr|Doctor|Dokter) ~>Doktor "} _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
Got this error with r3290, Maybe it is something wrong in my style after this commit, but i can't find it.
Any hints?
Bernd
II: Now building bikemap Time started: Tue Jun 03 17:21:13 CEST 2014 java.lang.IllegalStateException: No match found at java.util.regex.Matcher.group(Matcher.java:485) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.addFilter(ValueBuilder.java:195) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.addTagValue(ValueBuilder.java:179) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.compile(ValueBuilder.java:140) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder. <init> (ValueBuilder.java:52) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder. <init> (ValueBuilder.java:47) at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuildedAction.add(ValueBuildedAction.java:30) at uk.me.parabola.mkgmap.osmstyle.actions.AddTagAction. <init> (AddTagAction.java:47) at uk.me.parabola.mkgmap.osmstyle.actions.ActionReader.readTagValue(ActionReader.java:169) at uk.me.parabola.mkgmap.osmstyle.actions.ActionReader.readActions(ActionReader.java:60) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader.java:117) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.checkCommand(RuleFileReader.java:192) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader.java:109) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.load(RuleFileReader.java:86) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readRules(StyleImpl.java:302) at uk.me.parabola.mkgmap.osmstyle.StyleImpl. <init> (StyleImpl.java:160) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readStyle(StyleImpl.java:554) at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.init(RelationStyleHook.java:38) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.pluginChain(OsmMapDataSource.java:185) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMapDataSource.java:153) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:43) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:253) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:249) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Am Dienstag, 3. Juni 2014, 10:10:41 schrieb GerdP:
f you change them so that the action block doesn't span two lines it seems to work. I don't know if this should be fixed in the code.
Thank you Gerd i've changed inc/phone and now it works again ;-) cs:phone=* & mkgmap:country=IRL { set cs:phone='${cs:phone| subst:^00~>+| subst:[-()]~>| subst:^0~>+353| subst:^+3530~>+353}' } Bernd

Hi
Got this error with r3290, Maybe it is something wrong in my style after this commit, but i can't find it.
As Gerd says, it is because the change didn't allow filter expressions to be split onto more than one line. I've just committed a simple change to allow the original expression to work again. ..Steve

Hi Steve, I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem. Gerd Steve Ratcliffe wrote
Hi
Got this error with r3290, Maybe it is something wrong in my style after this commit, but i can't find it.
As Gerd says, it is because the change didn't allow filter expressions to be split onto more than one line. I've just committed a simple change to allow the original expression to work again.
..Steve _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Gerd
I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there can not be a match. And if there are, it is a programming error and not a user error. I realised it wouldn't work across new lines when I wrote it, but bother to investigate. ..Steve

Hi Steve, okay, I hope you are right, I did not even try to understand the pattern ;-) Gerd
Date: Wed, 4 Jun 2014 13:37:48 +0100 From: steve@parabola.me.uk To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now be quoted.
Hi Gerd
I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there can not be a match. And if there are, it is a programming error and not a user error. I realised it wouldn't work across new lines when I wrote it, but bother to investigate.
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

i have installed the latest version of mkgmap but now find that , asia.osm.pbf , will not split up as some of the files are empty and no pologyon tags is there a reason for this ? Stephen On Thu, Jun 5, 2014 at 1:38 AM, Gerd Petermann < gpetermann_muenchen@hotmail.com> wrote:
Hi Steve,
okay, I hope you are right, I did not even try to understand the pattern ;-)
Gerd
Date: Wed, 4 Jun 2014 13:37:48 +0100 From: steve@parabola.me.uk To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now be quoted.
Hi Gerd
I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there can not be a match. And if there are, it is a programming error and not a user error. I realised it wouldn't work across new lines when I wrote it, but bother to investigate.
..Steve _______________________________________________ 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

Hi Stephen, sounds like a problem in splitter. What splitter version are you using? See also http://gis.19327.n5.nabble.com/test-data-for-splitter-tp5807602.html Gerd steve sgalowski wrote
i have installed the latest version of mkgmap but now find that , asia.osm.pbf , will not split up as some of the files are empty and no pologyon tags
is there a reason for this ?
Stephen
On Thu, Jun 5, 2014 at 1:38 AM, Gerd Petermann <
gpetermann_muenchen@
wrote:
Hi Steve,
okay, I hope you are right, I did not even try to understand the pattern ;-)
Gerd
Date: Wed, 4 Jun 2014 13:37:48 +0100 From:
steve@.me
To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now be quoted.
Hi Gerd
I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there can not be a match. And if there are, it is a programming error and not a user error. I realised it wouldn't work across new lines when I wrote it, but bother to investigate.
..Steve _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com.

splitter version r409 mkgmap 3291 works ok , on australia.osm.bz from http://download.geofabrik.de/ stephen On Thu, Jun 5, 2014 at 5:41 PM, GerdP <gpetermann_muenchen@hotmail.com> wrote:
Hi Stephen,
sounds like a problem in splitter. What splitter version are you using? See also http://gis.19327.n5.nabble.com/test-data-for-splitter-tp5807602.html
Gerd
steve sgalowski wrote
i have installed the latest version of mkgmap but now find that , asia.osm.pbf , will not split up as some of the files are empty and no pologyon tags
is there a reason for this ?
Stephen
On Thu, Jun 5, 2014 at 1:38 AM, Gerd Petermann <
gpetermann_muenchen@
wrote:
Hi Steve,
okay, I hope you are right, I did not even try to understand the pattern ;-)
Gerd
Date: Wed, 4 Jun 2014 13:37:48 +0100 From:
steve@.me
To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now be quoted.
Hi Gerd
I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there can not be a match. And if there are, it is a programming error and not a user error. I realised it wouldn't work across new lines when I wrote it, but bother to investigate.
..Steve _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Steve, please send splitter.log and densities-out.txt for the asia split. Gerd steve sgalowski wrote
splitter version r409 mkgmap 3291
works ok , on australia.osm.bz from http://download.geofabrik.de/
stephen
On Thu, Jun 5, 2014 at 5:41 PM, GerdP <
gpetermann_muenchen@
> wrote:
Hi Stephen,
sounds like a problem in splitter. What splitter version are you using? See also http://gis.19327.n5.nabble.com/test-data-for-splitter-tp5807602.html
Gerd
steve sgalowski wrote
i have installed the latest version of mkgmap but now find that , asia.osm.pbf , will not split up as some of the files are empty and no pologyon tags
is there a reason for this ?
Stephen
On Thu, Jun 5, 2014 at 1:38 AM, Gerd Petermann <
gpetermann_muenchen@
wrote:
Hi Steve,
okay, I hope you are right, I did not even try to understand the pattern ;-)
Gerd
Date: Wed, 4 Jun 2014 13:37:48 +0100 From:
steve@.me
To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now be quoted.
Hi Gerd
I think the code in ValueBuilder should verify if matcher.matches(); returns true and otherwise print some error message so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there can not be a match. And if there are, it is a programming error and not a user error. I realised it wouldn't work across new lines when I wrote it, but bother to investigate.
..Steve _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Stephen, I got a densities-out.txt from you, but I don't know your parameters for splitter. Please upload the stdout of splitter here: http://files.mkgmap.org.uk/ and send the link . Gerd Date: Thu, 5 Jun 2014 17:45:39 +1000 From: steve.sgalowski@gmail.com To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now be quoted. splitter version r409mkgmap 3291 works ok , on australia.osm.bz from http://download.geofabrik.de/ stephen On Thu, Jun 5, 2014 at 5:41 PM, GerdP <gpetermann_muenchen@hotmail.com> wrote: Hi Stephen, sounds like a problem in splitter. What splitter version are you using? See also http://gis.19327.n5.nabble.com/test-data-for-splitter-tp5807602.html Gerd steve sgalowski wrote
i have installed the latest version of mkgmap
but now find that , asia.osm.pbf , will not split up as some of the files
are empty and no pologyon tags
is there a reason for this ?
Stephen
On Thu, Jun 5, 2014 at 1:38 AM, Gerd Petermann <
gpetermann_muenchen@
wrote:
Hi Steve,
okay, I hope you are right, I did not even try to understand the pattern
;-)
Gerd
Date: Wed, 4 Jun 2014 13:37:48 +0100
From:
steve@.me
To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] Commit: r3289: Style filter arguments can now
be quoted.
Hi Gerd
I think the code in ValueBuilder should verify if
matcher.matches();
returns true and otherwise print some error message
so that one can find the line that causes a problem.
Yes, but I think there are now no conditions under which there
can not be a match. And if there are, it is a programming error
and not a user error. I realised it wouldn't work across new lines
when I wrote it, but bother to investigate.
..Steve
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Commit-r3289-Style-filter-arguments-can-now-b... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ 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

On 04/06/14 16:38, Gerd Petermann wrote:
okay, I hope you are right, I did not even try to understand the pattern ;-)
That's the problem with regular expressions :) Well, there is one more problem, it does not cover the case where the argument is completely empty. So I'll fix that now. I saw a difference in the files produced by the two versions. ..Steve

Am Dienstag, 3. Juni 2014, 20:53:50 schrieb Steve Ratcliffe:
As Gerd says, it is because the change didn't allow filter expressions to be split onto more than one line. I've just committed a simple change to allow the original expression to work again.
Thank you, Steve it was a c&p error some month ago and i think, it's better, when i fix my style, too. Bernd
participants (6)
-
Bernd Weigelt
-
Gerd Petermann
-
GerdP
-
Steve Ratcliffe
-
Steve Sgalowski
-
svn commit