Skip to content

Commit

Permalink
osm tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kpwebb committed Mar 27, 2020
1 parent 66cb14c commit b543d88
Show file tree
Hide file tree
Showing 5 changed files with 3,046 additions and 1,884 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'io.sharedstreets'
version '0.3.1'
version '0.3.2'


buildscript {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ public WaySectionMetadata( WaySection section, boolean storeWaySegmentNames) {
this.tagValues = new String[section.fields.keySet().size()];

int i = 0;
for(String key : section.fields.keySet()) {
for (String key : section.fields.keySet()) {
this.tagNames[i] = key;
this.tagValues[i] = section.fields.get(key);
i++;
}

}
}
}

Expand Down Expand Up @@ -96,6 +96,13 @@ public byte[] toBinary() throws IOException {
waySection.addNodeIds(nodeId);
}

for(int i = 0 ; i < waySectionMetadata.tagNames.length; i++) {
SharedStreetsProto.OsmTag.Builder tag = SharedStreetsProto.OsmTag.newBuilder();
tag.setKey(waySectionMetadata.tagNames[i]);
tag.setValue(waySectionMetadata.tagValues[i]);
waySection.addTags(tag);
}

osmMetadata.addWaySections(waySection);
}

Expand Down
Loading

0 comments on commit b543d88

Please sign in to comment.