public class ElevationUtils extends Object
Constructor and Description |
---|
ElevationUtils() |
Modifier and Type | Method and Description |
---|---|
static PackedCoordinateSequence |
getPartialElevationProfile(PackedCoordinateSequence elevationProfile,
double start,
double end) |
static SlopeCosts |
getSlopeCosts(com.vividsolutions.jts.geom.CoordinateSequence elev,
boolean slopeLimit) |
static double |
getWalkCostsForSlope(double verticalDistance,
double maxSlope)
The cost for walking in hilly/mountain terrain dependent on slope using an empirical function by
WG Rees (Comp & Geosc, 2004), that overhauls the Naismith rule for mountaineering.
For a slope of 0 = 0 degree a cost is returned that approximates a speed of 1.333 m/sec = 4.8km/h TODO: Not sure if it makes sense to use maxSlope as input and instead better use a lower estimate / average value. |
static Double |
parseEleTag(String ele)
checks for units (m/ft) in an OSM ele tag value, and returns the value in meters
|
static double |
slopeSpeedCoefficient(double slope,
double altitude) |
public static SlopeCosts getSlopeCosts(com.vividsolutions.jts.geom.CoordinateSequence elev, boolean slopeLimit)
elev
- The elevation profile, where each (x, y) is (distance along edge, elevation)slopeLimit
- Whether the slope should be limited to 0.35, which is the max slope for
streets that take cars.public static double slopeSpeedCoefficient(double slope, double altitude)
public static double getWalkCostsForSlope(double verticalDistance, double maxSlope)
verticalDistance
- the vertical distance of the line segmentmaxSlope
- the slope of the segmentpublic static PackedCoordinateSequence getPartialElevationProfile(PackedCoordinateSequence elevationProfile, double start, double end)
Copyright © 2018. All rights reserved.