public class StreetVertexIndexService extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DISTANCE_ERROR |
static HashSet<Graph> |
graphsWithStreetVertexIndexServices |
static double |
MAX_DISTANCE_FROM_STREET_METERS |
Constructor and Description |
---|
StreetVertexIndexService(Graph graph)
Construct a new StreetVertexIndexService using the given graph.
|
Modifier and Type | Method and Description |
---|---|
static TemporaryStreetLocation |
createTemporaryStreetLocation(Graph graph,
String label,
I18NString name,
Iterable<StreetEdge> edges,
org.locationtech.jts.geom.Coordinate nearestPoint,
boolean endVertex)
Creates a TemporaryStreetLocation on the given street (set of PlainStreetEdges).
|
Collection<Edge> |
getEdgesForEnvelope(org.locationtech.jts.geom.Envelope envelope)
Return the edges whose geometry intersect with the specified envelope.
|
StreetVertex |
getIntersectionAt(org.locationtech.jts.geom.Coordinate coordinate) |
List<TransitStop> |
getNearbyTransitStops(org.locationtech.jts.geom.Coordinate coordinate,
double radius)
Get all transit stops within a given distance of a coordinate
|
Vertex |
getSampleVertexAt(org.locationtech.jts.geom.Coordinate coordinate,
boolean dest)
Get a vertex at a given coordinate, using the same logic as in Samples.
|
StreetSplitter |
getStreetSplitter()
Getter method for StreetSplitter
|
List<TransitStop> |
getTransitStopForEnvelope(org.locationtech.jts.geom.Envelope envelope) |
Vertex |
getVertexForLocation(GenericLocation loc,
RoutingRequest options,
boolean endVertex)
Finds the appropriate vertex for this location.
|
List<Vertex> |
getVerticesForEnvelope(org.locationtech.jts.geom.Envelope envelope)
Returns the vertices intersecting with the specified envelope.
|
String |
toString() |
public static final double DISTANCE_ERROR
public static final double MAX_DISTANCE_FROM_STREET_METERS
public StreetVertexIndexService(Graph graph)
graph
- public static TemporaryStreetLocation createTemporaryStreetLocation(Graph graph, String label, I18NString name, Iterable<StreetEdge> edges, org.locationtech.jts.geom.Coordinate nearestPoint, boolean endVertex)
graph
- label
- name
- edges
- A collection of nearby edges, which represent one street.nearestPoint
- public List<TransitStop> getNearbyTransitStops(org.locationtech.jts.geom.Coordinate coordinate, double radius)
public List<Vertex> getVerticesForEnvelope(org.locationtech.jts.geom.Envelope envelope)
envelope
- public Collection<Edge> getEdgesForEnvelope(org.locationtech.jts.geom.Envelope envelope)
envelope
- public List<TransitStop> getTransitStopForEnvelope(org.locationtech.jts.geom.Envelope envelope)
envelope
- public StreetVertex getIntersectionAt(org.locationtech.jts.geom.Coordinate coordinate)
coordinate
- Location to search intersection at. Look in a MAX_CORNER_DISTANCE_METERS radius.public Vertex getVertexForLocation(GenericLocation loc, RoutingRequest options, boolean endVertex)
loc
- options
- endVertex:
- whether this is a start vertex (if it's false) or end vertex (if it's true)public Vertex getSampleVertexAt(org.locationtech.jts.geom.Coordinate coordinate, boolean dest)
public StreetSplitter getStreetSplitter()
Copyright © 2020. All rights reserved.