Error in my style with Version mkgmap-r4136

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in my style with Version mkgmap-r4136

lasemax
Who can help me.
Since Version mkgmap-r4136 i get a error with my style.
Error in style: Error: (points:179): Invalid rule expression:
$mkgmap:admin_level2!=DEU & $name:en=$name:de

The error is in Line 179 and this is the code before and after error:
176: # Naming
177: mkgmap:admin_level2=DEU & name:de=* { set name='${name:de}' }
178: mkgmap:admin_level2!=DEU & name:en=* { set name='${name:en}
(${name:de})' }
179: mkgmap:admin_level2!=DEU & name:en=$name:de { set name='${name:en}' }
180: mkgmap:admin_level2!=DEU & name:de=* & name:en!=* & name!=$name:de {
set name='${name} ${name:de})' }


With my last Version mkgmap-r4125 is all ok and this code works.




--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error in my style with Version mkgmap-r4136

Gerd Petermann
Hi lasemax,

this seems to be an error in mkgmap. It doesn't print this message when you change the line 179 to
name:en=$name:de  & mkgmap:admin_level2!=DEU { set name='${name:en}' }

I think it should handle both rules in the same way, but it doesn't.

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von lasemax <[hidden email]>
Gesendet: Donnerstag, 22. März 2018 09:32:36
An: [hidden email]
Betreff: [mkgmap-dev] Error in my style with Version mkgmap-r4136

Who can help me.
Since Version mkgmap-r4136 i get a error with my style.
Error in style: Error: (points:179): Invalid rule expression:
$mkgmap:admin_level2!=DEU & $name:en=$name:de

The error is in Line 179 and this is the code before and after error:
176: # Naming
177: mkgmap:admin_level2=DEU & name:de=* { set name='${name:de}' }
178: mkgmap:admin_level2!=DEU & name:en=* { set name='${name:en}
(${name:de})' }
179: mkgmap:admin_level2!=DEU & name:en=$name:de { set name='${name:en}' }
180: mkgmap:admin_level2!=DEU & name:de=* & name:en!=* & name!=$name:de {
set name='${name} ${name:de})' }


With my last Version mkgmap-r4125 is all ok and this code works.




--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Error in my style with Version mkgmap-r4136

Steve Ratcliffe
In reply to this post by lasemax
Hi

> Who can help me.
> Since Version mkgmap-r4136 i get a error with my style.
> Error in style: Error: (points:179): Invalid rule expression:
> $mkgmap:admin_level2!=DEU & $name:en=$name:de

This is a bug in mkgmap.  The attached patch fixes it.

Thanks for reporting this problem.

Steve

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

expr-func.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error in my style with Version mkgmap-r4136

Gerd Petermann
Hi Steve,

looks good for me, although you may simplify the code in isIndexable():
a) The expression ((ValueOp) op.getFirst()).isIndexable() appears three times
b) the term (op.getSecond().isType(VALUE) || op.getSecond().isType(FUNCTION) appears two times and I wonder why it is needed.
Do you have an example? The unit tests don't fail when I remove it.

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von Steve Ratcliffe <[hidden email]>
Gesendet: Donnerstag, 22. März 2018 12:26:05
An: [hidden email]
Betreff: Re: [mkgmap-dev] Error in my style with Version mkgmap-r4136

Hi

> Who can help me.
> Since Version mkgmap-r4136 i get a error with my style.
> Error in style: Error: (points:179): Invalid rule expression:
> $mkgmap:admin_level2!=DEU & $name:en=$name:de

This is a bug in mkgmap.  The attached patch fixes it.

Thanks for reporting this problem.

Steve
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error in my style with Version mkgmap-r4136

lasemax
In reply to this post by Gerd Petermann
Hi Gerd,
change the code help me and it works.

Thx
lasemax



--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error in my style with Version mkgmap-r4136

Steve Ratcliffe
In reply to this post by Gerd Petermann

Hi Gerd

> looks good for me, although you may simplify the code in isIndexable():
> a) The expression ((ValueOp) op.getFirst()).isIndexable() appears three times
> b) the term (op.getSecond().isType(VALUE) || op.getSecond().isType(FUNCTION) appears two times and I wonder why it is needed.
> Do you have an example? The unit tests don't fail when I remove it.

OK a lot of that is not needed any more.

The attached patch returns isIndexable() to its simplest form and
all the other code is changed to fit.

Steve



_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

expr-func2.patch (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error in my style with Version mkgmap-r4136

Gerd Petermann
Hi Steve,

yes, that looks much clearer.

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von Steve Ratcliffe <[hidden email]>
Gesendet: Mittwoch, 28. März 2018 18:53:22
An: [hidden email]
Betreff: Re: [mkgmap-dev] Error in my style with Version mkgmap-r4136


Hi Gerd

> looks good for me, although you may simplify the code in isIndexable():
> a) The expression ((ValueOp) op.getFirst()).isIndexable() appears three times
> b) the term (op.getSecond().isType(VALUE) || op.getSecond().isType(FUNCTION) appears two times and I wonder why it is needed.
> Do you have an example? The unit tests don't fail when I remove it.

OK a lot of that is not needed any more.

The attached patch returns isIndexable() to its simplest form and
all the other code is changed to fit.

Steve


_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev