Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Osm tags #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 0.3.2 already is published though this PR has not been merged.



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