-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6486 from HSLdevcom/keep-interior-rings
Improve street routing within concave parts of area holes
- Loading branch information
Showing
11 changed files
with
353 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...t/java/org/opentripplanner/graph_builder/module/osm/moduletests/_support/NodeBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.opentripplanner.graph_builder.module.osm.moduletests._support; | ||
|
||
import org.opentripplanner.framework.geometry.WgsCoordinate; | ||
import org.opentripplanner.osm.model.OsmNode; | ||
|
||
public class NodeBuilder { | ||
|
||
public static OsmNode node(long id, WgsCoordinate wgsCoordinate) { | ||
var node = new OsmNode(wgsCoordinate.latitude(), wgsCoordinate.longitude()); | ||
node.setId(id); | ||
return node; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...va/org/opentripplanner/graph_builder/module/osm/moduletests/_support/RelationBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.opentripplanner.graph_builder.module.osm.moduletests._support; | ||
|
||
import org.opentripplanner.osm.model.OsmMemberType; | ||
import org.opentripplanner.osm.model.OsmRelation; | ||
import org.opentripplanner.osm.model.OsmRelationMember; | ||
|
||
public class RelationBuilder { | ||
|
||
private final OsmRelation relation = new OsmRelation(); | ||
|
||
public static RelationBuilder ofMultiPolygon() { | ||
var builder = new RelationBuilder(); | ||
builder.relation.addTag("type", "multipolygon"); | ||
builder.relation.addTag("highway", "pedestrian"); | ||
return builder; | ||
} | ||
|
||
public RelationBuilder withWayMember(long id, String role) { | ||
var member = new OsmRelationMember(); | ||
member.setRole(role); | ||
member.setType(OsmMemberType.WAY); | ||
member.setRef(id); | ||
relation.addMember(member); | ||
return this; | ||
} | ||
|
||
public OsmRelation build() { | ||
return relation; | ||
} | ||
} |
Oops, something went wrong.