public class NearbyStopFinder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NearbyStopFinder.StopAtDistance
Represents a stop that is comparable to other stops on the basis of its distance from some point.
|
Modifier and Type | Field and Description |
---|---|
boolean |
useStreets |
Constructor and Description |
---|
NearbyStopFinder(Graph graph,
double radiusMeters)
Construct a NearbyStopFinder for the given graph and search radius, choosing whether to search via the street
network or straight line distance based on the presence of OSM street data in the graph.
|
NearbyStopFinder(Graph graph,
double radiusMeters,
boolean useStreets)
Construct a NearbyStopFinder for the given graph and search radius.
|
Modifier and Type | Method and Description |
---|---|
List<NearbyStopFinder.StopAtDistance> |
findNearbyStops(Vertex vertex)
Return all stops within a certain radius of the given vertex, using network distance along streets.
|
Set<NearbyStopFinder.StopAtDistance> |
findNearbyStopsConsideringPatterns(Vertex vertex)
Find all unique nearby stops that are the closest stop on some trip pattern.
|
List<NearbyStopFinder.StopAtDistance> |
findNearbyStopsEuclidean(Vertex originVertex)
Return all stops within a certain radius of the given vertex, using straight-line distance independent of streets.
|
List<NearbyStopFinder.StopAtDistance> |
findNearbyStopsViaStreets(Vertex originVertex)
Return all stops within a certain radius of the given vertex, using network distance along streets.
|
static NearbyStopFinder.StopAtDistance |
stopAtDistanceForState(State state)
Given a State at a TransitStop, bundle the TransitStop together with information about how far away it is
and the geometry of the path leading up to the given State.
|
public NearbyStopFinder(Graph graph, double radiusMeters)
public NearbyStopFinder(Graph graph, double radiusMeters, boolean useStreets)
useStreets
- if true, search via the street network instead of using straight-line distance.public Set<NearbyStopFinder.StopAtDistance> findNearbyStopsConsideringPatterns(Vertex vertex)
public List<NearbyStopFinder.StopAtDistance> findNearbyStops(Vertex vertex)
public List<NearbyStopFinder.StopAtDistance> findNearbyStopsViaStreets(Vertex originVertex)
public List<NearbyStopFinder.StopAtDistance> findNearbyStopsEuclidean(Vertex originVertex)
public static NearbyStopFinder.StopAtDistance stopAtDistanceForState(State state)
Copyright © 2019. All rights reserved.