public class StreetLayer extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
EdgeStore |
edgeStore |
TransitLayer |
linkedTransitLayer |
static int |
MIN_SUBGRAPH_SIZE
Minimum allowable size (in number of vertices) for a disconnected subgraph; subgraphs smaller than these will be removed.
|
IntHashGrid |
spatialIndex |
VertexStore |
vertexStore |
Constructor and Description |
---|
StreetLayer() |
Modifier and Type | Method and Description |
---|---|
void |
associateStops(TransitLayer transitLayer,
int radiusMeters)
For every stop in a TransitLayer, find or create a nearby vertex in the street layer and record the connection
between the two.
|
void |
buildEdgeLists() |
Split |
findSplit(double lat,
double lon,
double radiusMeters)
Non-destructively find a location on an existing street near the given point.
|
int |
getOrCreateVertexNear(double lat,
double lon,
double radiusMeters)
Create a street-layer vertex representing a transit stop.
|
int |
getVertexCount() |
void |
indexStreets() |
void |
loadFromOsm(com.conveyal.osmlib.OSM osm)
Load street layer from an OSM-lib OSM DB
|
void |
removeDisconnectedSubgraphs(int minSubgraphSize)
Find and remove all subgraphs with fewer than minSubgraphSize vertices.
|
void |
splitStreet(int fixedLon,
int fixedLat,
boolean transit,
boolean out)
Used to split streets for temporary endpoints and for transit stops.
|
void |
testRouting(boolean withDestinations,
TransitLayer transitLayer)
After JIT this appears to scale almost linearly with number of cores.
|
public static final int MIN_SUBGRAPH_SIZE
public transient IntHashGrid spatialIndex
public VertexStore vertexStore
public EdgeStore edgeStore
public TransitLayer linkedTransitLayer
public void loadFromOsm(com.conveyal.osmlib.OSM osm)
public void indexStreets()
public void testRouting(boolean withDestinations, TransitLayer transitLayer)
public void buildEdgeLists()
public int getOrCreateVertexNear(double lat, double lon, double radiusMeters)
public Split findSplit(double lat, double lon, double radiusMeters)
public void associateStops(TransitLayer transitLayer, int radiusMeters)
public void splitStreet(int fixedLon, int fixedLat, boolean transit, boolean out)
public int getVertexCount()
public void removeDisconnectedSubgraphs(int minSubgraphSize)
Copyright © 2015. All rights reserved.