Skip to content

Conversation

@kpwebb
Copy link
Member

@kpwebb kpwebb commented Mar 27, 2020

This pull request adds support for SharedStreets Ref System pull request 27 which adds a complete OSM tag set to SharedStreets metadata tiles.

Copy link

@hbruch hbruch left a 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);
Copy link

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?

Comment on lines +128 to +154

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);
Copy link

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.

Comment on lines +94 to +96
if(line.hasOption("roadClass")){
roadClass = Integer.parseInt(line.getOptionValue("roadClass"));
}
Copy link

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")
Copy link

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");
Copy link

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?

Comment on lines 49 to 59

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++;
}

Copy link

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'
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants