Skip to content
Permalink
Browse files

map-writer: ensure that implicit relations can be written (with id ta…

…g) for v5 maps (#1111)
  • Loading branch information...
Gustl22 authored and devemux86 committed Mar 14, 2019
1 parent 923409a commit d97eed0d10348a9d8de50fdb1078a1c834f027eb
Showing with 11 additions and 0 deletions.
  1. +11 −0 mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/OSMTagMapping.java
@@ -680,5 +680,16 @@ public boolean execute(short tag, int amount) {
*/
public void setTagValues(boolean tagValues) {
this.tagValues = tagValues;

/* Ensure that implicit relations can be written (with id tag) */
if (this.tagValues) {
OSMTag tag = this.stringToWayTag.get(OSMTag.tagKey("id", "%f"));
if (tag == null) {
tag = new OSMTag(this.wayID, "id", "%f", Byte.MAX_VALUE, false, false, false);
if (addWayTag(tag, null)) {
this.wayID++;
}
}
}
}
}

0 comments on commit d97eed0

Please sign in to comment.
You can’t perform that action at this time.