-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR seems to be already published as version 0.3.2, though I think some suggested changes should be considered.
filteredClasses.add(Way.ROAD_CLASS.ClassTrunk); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassMotorway.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassUnclassified); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a typo? Shouldn't Way.ROAD_CLASS.ClassMotorway be added?
|
||
if(roadClass.intValue() == Way.ROAD_CLASS.ClassUnclassified.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassUnclassified); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassTertiary.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassTertiary); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassSecondary.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassSecondary); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassPrimary.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassPrimary); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassTrunk.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassTrunk); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassMotorway.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassUnclassified); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassResidential.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassResidential); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassService.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassService); | ||
|
||
else if(roadClass.intValue() == Way.ROAD_CLASS.ClassOther.getValue()) | ||
filteredClasses.add(Way.ROAD_CLASS.ClassOther); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is repetitive and should be handled more compactly.
if(line.hasOption("roadClass")){ | ||
roadClass = Integer.parseInt(line.getOptionValue("roadClass")); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should really only one roadClass be processed or multiple? In #25, I assumed that multiple road classes should be processed?
options.addOption( OptionBuilder.withLongOpt( "roadClass" ) | ||
.withDescription( "road class (default 6)" ) | ||
.hasArg() | ||
.withArgName("Z-LEVEL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Z-LEVEL seems to be a copy paste error
|
||
assert fields != null; | ||
|
||
return fields.containsKey("bikable"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'm missing something, but where comes the bikable
field from?
|
||
this.tagNames = new String[section.fields.keySet().size()]; | ||
this.tagValues = new String[section.fields.keySet().size()]; | ||
|
||
int i = 0; | ||
for(String key : section.fields.keySet()) { | ||
this.tagNames[i] = key; | ||
this.tagValues[i] = section.fields.get(key); | ||
i++; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As adding osm tags will have a substantial consequence on size of the generated tiles, could you elaborate a bit on the reasons why these are added? Perhaps this should be optional? Or at least the keys be filterable?
@@ -1,5 +1,5 @@ | |||
group 'io.sharedstreets' | |||
version '0.3.1' | |||
version '0.3.2' |
There was a problem hiding this comment.
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.
This pull request adds support for SharedStreets Ref System pull request 27 which adds a complete OSM tag set to SharedStreets metadata tiles.