logo separator

[mkgmap-dev] tag value within regular expression

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Wed Jan 26 09:42:48 GMT 2022

Hi Mike

It needs to be something like:

highway=* & name=* {set temp='${name|not-contained:" :rn"'}
# the separator char                                ^
# now temp will be set to name or null and can be tested:
highway=* & temp=* {echotags "name not in route"}

Think I've got this right.

I'll adjust the style manual layout sometime

Ticker

On 26/01/2022 01:10, Mike Baggaley wrote:
> I tried the following:
> 
> highway=* & name=* & ${name|not-contained: :rn}!=* {echotags "Highway with name of route"; delete name}
> 
> but I get "Error in style : error : (lines:191): Value '$not-contained:' is not part of an expression".
> 
> Is this a bug or am I doing something wrong?
> 
> Cheers,
> Mike
> 
> -----Original Message-----
> From: Mike Baggaley [mailto:mike at tvage.co.uk]
> Sent: 25 January 2022 20:14
> To: 'Development list for mkgmap' <mkgmap-dev at lists.mkgmap.org.uk>
> Subject: RE: [mkgmap-dev] tag value within regular expression
> 
> Hi Ticker,
> 
> I had wondered about using not-contained (although I would prefer to do a case insensitive match, hence my preference for a regular expression).
> I was confused by the example in the manual, as it doesn't contain the tag value or name, but have now realised that the example has been truncated.
> 
> Regards,
> Mike
> 
> -----Original Message-----
> From: Ticker Berkin [mailto:rwb-mkgmap at jagit.co.uk]
> Sent: 25 January 2022 15:03
> To: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
> Subject: Re: [mkgmap-dev] tag value within regular expression
> 
> Hi Mike
> 
> Would the tag filter not-contained (4.4.1) do the job?
> 
> Ticker
> 
> On Tue, 2022-01-25 at 13:51 +0000, Mike Baggaley wrote:
>> Hi,
>>
>> Section 4.2.3 of the style manual shows how to compare the values of
>> two
>> tags, but does not indicate whether it is possible to use tag values
>> within
>> a regular expression. Is this possible? If the name of a highway is
>> contained within the tag I use to contain the route name, I would
>> like to
>> delete the name tag. Currently I do this if the route name is the
>> same as
>> the highway name, but the route name can contain more than one name.
>>
>> Cheers,
>> Mike
>>
>>
>>
>> _______________________________________________
>> mkgmap-dev mailing list
>> mkgmap-dev at lists.mkgmap.org.uk
>> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> 
> 
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list