public class StreetVertexIndexServiceImpl extends Object implements StreetVertexIndexService
Modifier and Type | Field and Description |
---|---|
static double |
DISTANCE_ERROR |
static double |
MAX_DISTANCE_FROM_STREET_METERS |
Constructor and Description |
---|
StreetVertexIndexServiceImpl(Graph graph) |
StreetVertexIndexServiceImpl(Graph graph,
boolean hashGrid) |
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.
|
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 StreetVertexIndexServiceImpl(Graph graph)
public StreetVertexIndexServiceImpl(Graph graph, boolean hashGrid)
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)
getNearbyTransitStops
in interface StreetVertexIndexService
public List<Vertex> getVerticesForEnvelope(org.locationtech.jts.geom.Envelope envelope)
StreetVertexIndexService
getVerticesForEnvelope
in interface StreetVertexIndexService
public Collection<Edge> getEdgesForEnvelope(org.locationtech.jts.geom.Envelope envelope)
StreetVertexIndexService
getEdgesForEnvelope
in interface StreetVertexIndexService
public List<TransitStop> getTransitStopForEnvelope(org.locationtech.jts.geom.Envelope envelope)
getTransitStopForEnvelope
in interface StreetVertexIndexService
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)
StreetVertexIndexService
getVertexForLocation
in interface StreetVertexIndexService
public Vertex getSampleVertexAt(org.locationtech.jts.geom.Coordinate coordinate, boolean dest)
StreetVertexIndexService
getSampleVertexAt
in interface StreetVertexIndexService
Copyright © 2019. All rights reserved.