logo separator

[mkgmap-dev] handling of a key without a value

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Apr 10 07:27:38 BST 2020

Hi Joern,

looks like the node was creaed in a bad import.
I was sure that mkgmap drops all tags where the value is empty but this doesn't happen. The attached patch changes this.

Anyway, it is probably also possible to create an empty tag in the style rules, so I think we have to decide if ele=* should match when ele has an empty tag value.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von J J <joern.de at gmail.com>
Gesendet: Donnerstag, 9. April 2020 23:21
An: Development list for mkgmap
Betreff: [mkgmap-dev] handling of a key without a value

https://www.openstreetmap.org/node/7278416985
That node seems to crash my style while trying to execute the following command:
  ele=*  {echo 'ele=${ele}'; set ele_m='${ele|conv:"ft=>m"}'; echo 'ele_m=${ele}'; }
The echo command produces "ele=" in the transcript,
afterwards "java.lang.StringIndexOutOfBoundsException: String index out of range: -1" etc.
The node contains any empty values. "ele" is the only of them my style uses.
Observed in: mkgmap-r4478
-------------- next part --------------
A non-text attachment was scrubbed...
Name: empty-val.patch
Type: application/octet-stream
Size: 556 bytes
Desc: empty-val.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20200410/28938726/attachment-0001.obj>


More information about the mkgmap-dev mailing list