
I have (ncn=yes | rcn=yes) { name '${rcnname | substring:1:14}'} [0x10018 resolution 22 continue with_actions] in my lines file, rcnname is 123456789123456789 for test purposes, I get the full string showing on the map in basecamp not the 1 - 14 substring am I doing something wrong ? -- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

i am unshure why , but gbbickerton , is always ending up in my spam , box from this list has this e-mail been tanted on black lists , does any one else have this problem on the list ? On Fri, Nov 28, 2014 at 6:32 AM, gbbickerton <gbbickerton@yahoo.com> wrote:
I have (ncn=yes | rcn=yes) { name '${rcnname | substring:1:14}'} [0x10018 resolution 22 continue with_actions] in my lines file, rcnname is 123456789123456789 for test purposes, I get the full string showing on the map in basecamp not the 1 - 14 substring am I doing something wrong ?
-- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603.html 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, you are right, I don't even find it as spam in my outlook.com mailbox. Gerd steve sgalowski wrote
i am unshure why , but gbbickerton , is always ending up in my spam , box from this list
has this e-mail been tanted on black lists , does any one else have this problem on the list ?
On Fri, Nov 28, 2014 at 6:32 AM, gbbickerton <
gbbickerton@
> wrote:
I have (ncn=yes | rcn=yes) { name '${rcnname | substring:1:14}'} [0x10018 resolution 22 continue with_actions] in my lines file, rcnname is 123456789123456789 for test purposes, I get the full string showing on the map in basecamp not the 1 - 14 substring am I doing something wrong ?
-- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603.html 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/Substring-returns-full-string-tp5825603p58256... Sent from the Mkgmap Development mailing list archive at Nabble.com.

I have not had this problem with my email before that I know of, however it does not solve my problem what I want is a way to shorten names to say the first two words as some are very long. I have also tried { name '${rcnname|part:"\s<2"}'} but I am not sure how to separate at spaces I have tried ' ' etc without success -- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603p58256... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi, try without the blanks: (ncn=yes | rcn=yes) { name '${rcnname|substring:1:14}'} [0x10018 resolution 22 continue with_actions] Gerd gbbickerton wrote
I have not had this problem with my email before that I know of, however it does not solve my problem what I want is a way to shorten names to say the first two words as some are very long. I have also tried { name '${rcnname|part:"\s<2"}'} but I am not sure how to separate at spaces I have tried ' ' etc without success
-- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603p58256... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Steve, I don't know where to fix that. In ValueBuilder.addFilter() we receive the string " substring:1:14" (with the leading blank) and that is not removed, so we don't match "substring". Gerd
Date: Fri, 28 Nov 2014 01:04:50 -0700 From: gpetermann_muenchen@hotmail.com To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Substring returns full string
Hi,
try without the blanks: (ncn=yes | rcn=yes) { name '${rcnname|substring:1:14}'} [0x10018 resolution 22 continue with_actions]
Gerd
gbbickerton wrote
I have not had this problem with my email before that I know of, however it does not solve my problem what I want is a way to shorten names to say the first two words as some are very long. I have also tried { name '${rcnname|part:"\s<2"}'} but I am not sure how to separate at spaces I have tried ' ' etc without success
-- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603p58256... 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

On 28/11/14 08:24, Gerd Petermann wrote:
I don't know where to fix that. In ValueBuilder <eclipse-javadoc:%E2%98%82=mkgmap/src%3Cuk.me.parabola.mkgmap.osmstyle.actions%7BValueBuilder.java%E2%98%83ValueBuilder>.addFilter() we receive the string " substring:1:14" (with the leading blank) and that is not removed, so we don't match "substring".
OK I will look into it. I'm a bit surprised - there is a test that has spaces around the '|' symbols. ..Steve

Hi Gerd
In ValueBuilder
we receive the string " substring:1:14" (with the leading blank) and that is not removed, so we don't match
OK, so this works if you quote the argument: '${rcnname | substring:"1:14"}' but not with the old syntax. The attached patch fixes this and I think it is safe against breaking existing styles. If it does break old styles, then it will have to be un-applied - in general the old syntax is ambiguous. I've added an error check for when an unknown filter is seen, which should make it obvious when something like this happens. ..Steve

Hi Steve, I tried it with a few popular styles and saw no error message, so I think it will not cause problems. Gerd Steve Ratcliffe wrote
Hi Gerd
In ValueBuilder
we receive the string " substring:1:14" (with the leading blank) and that is not removed, so we don't match
OK, so this works if you quote the argument: '${rcnname | substring:"1:14"}'
but not with the old syntax.
The attached patch fixes this and I think it is safe against breaking existing styles. If it does break old styles, then it will have to be un-applied - in general the old syntax is ambiguous.
I've added an error check for when an unknown filter is seen, which should make it obvious when something like this happens.
..Steve
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Spaces_around__|__fails_with_old_arg_syntax_.patch (2K) <http://gis.19327.n5.nabble.com/attachment/5825704/0/Spaces_around__%7C__fail...;
-- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603p58257... Sent from the Mkgmap Development mailing list archive at Nabble.com.

May i suggest that a test is made to check that the string is long enough before applying this filter otherwise an exception occurs .It would be unsafe to use this filter in any style without such a test. -- View this message in context: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603p58257... Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (5)
-
gbbickerton
-
Gerd Petermann
-
GerdP
-
Steve Ratcliffe
-
Steve Sgalowski