public class ElevationModule extends Object implements GraphBuilderModule
GraphBuilderModule
plugin that applies elevation data to street data that has already
been loaded into a (@link Graph}, creating elevation profiles for each Street encountered
in the Graph. Depending on the ElevationGridCoverageFactory
specified
this could be auto-downloaded and cached National Elevation Dataset (NED) raster data or
a GeoTIFF file. The elevation profiles are stored as PackedCoordinateSequence
objects,
where each (x,y) pair represents one sample, with the x-coord representing the distance along
the edge measured from the start, and the y-coord representing the sampled elevation at that
point (both in meters).Constructor and Description |
---|
ElevationModule() |
ElevationModule(ElevationGridCoverageFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
buildGraph(Graph graph,
HashMap<Class<?>,Object> extra)
Process whatever inputs were supplied to this module and add the resulting elements to the given graph.
|
void |
checkInputs()
Check that all inputs to the graphbuilder are valid; throw an exception if not.
|
com.vividsolutions.jts.geom.Coordinate |
getPointAlongEdge(com.vividsolutions.jts.geom.Coordinate[] coords,
double length,
double t)
Returns a coordinate along a path located at a specific point indicated by the percentage of
distance covered from start to end.
|
List<String> |
getPrerequisites() |
List<String> |
provides() |
void |
setDistanceBetweenSamplesM(double distance) |
void |
setGridCoverageFactory(ElevationGridCoverageFactory factory) |
public ElevationModule()
public ElevationModule(ElevationGridCoverageFactory factory)
public void setGridCoverageFactory(ElevationGridCoverageFactory factory)
public void setDistanceBetweenSamplesM(double distance)
public void buildGraph(Graph graph, HashMap<Class<?>,Object> extra)
GraphBuilderModule
buildGraph
in interface GraphBuilderModule
public com.vividsolutions.jts.geom.Coordinate getPointAlongEdge(com.vividsolutions.jts.geom.Coordinate[] coords, double length, double t)
coords
- the list of (x,y) coordinates that form the pathlength
- the total length of the patht
- the percentage (ranges from 0 to 1)public void checkInputs()
GraphBuilderModule
checkInputs
in interface GraphBuilderModule
Copyright © 2018. All rights reserved.