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,
com.vividsolutions.jts.geom.Coordinate nearestPoint,
boolean endVertex)
Creates a TemporaryStreetLocation on the given street (set of PlainStreetEdges).
|
CandidateEdgeBundle |
getClosestEdges(GenericLocation location,
TraversalRequirements reqs)
Get the closest edges to this location are traversable given these preferences.
|
CandidateEdgeBundle |
getClosestEdges(GenericLocation location,
TraversalRequirements reqs,
List<Edge> extraEdges,
Collection<Edge> preferredEdges,
boolean possibleTransitLinksOnly)
Get the closest edges to this location are traversable given these preferences.
|
com.vividsolutions.jts.geom.Coordinate |
getClosestPointOnStreet(com.vividsolutions.jts.geom.Coordinate c)
Finds the on-street coordinate closest to a given coordinate
|
Collection<Edge> |
getEdgesForEnvelope(com.vividsolutions.jts.geom.Envelope envelope)
Return the edges whose geometry intersect with the specified envelope.
|
StreetVertex |
getIntersectionAt(com.vividsolutions.jts.geom.Coordinate coordinate) |
List<TransitStop> |
getNearbyTransitStops(com.vividsolutions.jts.geom.Coordinate coordinate,
double radius)
Get all transit stops within a given distance of a coordinate
|
Vertex |
getSampleVertexAt(com.vividsolutions.jts.geom.Coordinate coordinate,
boolean dest)
Get a vertex at a given coordinate, using the same logic as in Samples.
|
List<TransitStop> |
getTransitStopForEnvelope(com.vividsolutions.jts.geom.Envelope envelope) |
Vertex |
getVertexForLocation(GenericLocation loc,
RoutingRequest options,
boolean endVertex)
Finds the appropriate vertex for this location.
|
List<Vertex> |
getVerticesForEnvelope(com.vividsolutions.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, com.vividsolutions.jts.geom.Coordinate nearestPoint, boolean endVertex)
graph
- label
- name
- edges
- A collection of nearby edges, which represent one street.nearestPoint
- public List<TransitStop> getNearbyTransitStops(com.vividsolutions.jts.geom.Coordinate coordinate, double radius)
getNearbyTransitStops
in interface StreetVertexIndexService
public List<Vertex> getVerticesForEnvelope(com.vividsolutions.jts.geom.Envelope envelope)
StreetVertexIndexService
getVerticesForEnvelope
in interface StreetVertexIndexService
public Collection<Edge> getEdgesForEnvelope(com.vividsolutions.jts.geom.Envelope envelope)
StreetVertexIndexService
getEdgesForEnvelope
in interface StreetVertexIndexService
public List<TransitStop> getTransitStopForEnvelope(com.vividsolutions.jts.geom.Envelope envelope)
getTransitStopForEnvelope
in interface StreetVertexIndexService
public CandidateEdgeBundle getClosestEdges(GenericLocation location, TraversalRequirements reqs, List<Edge> extraEdges, Collection<Edge> preferredEdges, boolean possibleTransitLinksOnly)
StreetVertexIndexService
getClosestEdges
in interface StreetVertexIndexService
extraEdges
- Additional edges to consider, may be nullpreferredEdges
- Edges which are preferred, may be nullpossibleTransitLinksOnly
- Only include possible transit links.public CandidateEdgeBundle getClosestEdges(GenericLocation location, TraversalRequirements reqs)
StreetVertexIndexService
getClosestEdges
in interface StreetVertexIndexService
public StreetVertex getIntersectionAt(com.vividsolutions.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 com.vividsolutions.jts.geom.Coordinate getClosestPointOnStreet(com.vividsolutions.jts.geom.Coordinate c)
StreetVertexIndexService
getClosestPointOnStreet
in interface StreetVertexIndexService
c
- The coordinate to be found on the street networkCoordinate
that's closest to the given input Coordinate
public Vertex getSampleVertexAt(com.vividsolutions.jts.geom.Coordinate coordinate, boolean dest)
StreetVertexIndexService
getSampleVertexAt
in interface StreetVertexIndexService
Copyright © 2015. All rights reserved.