@Path(value="/routers/{routerId}/isochroneOld") public class SIsochrone extends RoutingResource
Modifier and Type | Field and Description |
---|---|
double |
angleLimitForUShapeDetection |
double |
concaveHullAlpha
Parameter for concave hull computation, i.e.
|
double |
distanceToleranceForUShapeDetection |
boolean |
doSpeedTest |
double |
maxUserSpeed
To calculate the length of sub-edges and eventually to detect u-shaped roads, in m/sec (will be set later dependent on mode)
|
double |
offRoadWalkspeed
Walkspeed between user indicated position and road 3000 m/h = 0.83333 m/sec
|
static String |
RESULT_TYPE_EDGES |
static String |
RESULT_TYPE_POINTS |
static String |
RESULT_TYPE_SHED |
long |
shedCalcMethodSwitchTimeInSec
To decide between edge-based or point-based calculation of sheds, i.e.
|
arriveBy, bannedAgencies, bannedRoutes, bannedStops, bannedStopsHard, bannedTrips, batch, bikeBoardCost, bikeSpeed, bikeSwitchCost, bikeSwitchTime, clampInitialWait, date, disableRemainingWeightHeuristic, fromPlace, ignoreRealtimeUpdates, intermediatePlaces, maxPreTransitTime, maxTransfers, maxWalkDistance, minTransferTime, modes, nonpreferredTransferPenalty, numItineraries, optimize, otherThanPreferredRoutesPenalty, otpServer, preferredAgencies, preferredRoutes, reverseOptimizeOnTheFly, routerId, showIntermediateStops, startTransitStopId, startTransitTripId, time, toPlace, transferPenalty, triangleSafetyFactor, triangleSlopeFactor, triangleTimeFactor, unpreferredAgencies, unpreferredRoutes, waitAtBeginningFactor, waitReluctance, walkBoardCost, walkReluctance, walkSpeed, wheelchair
Constructor and Description |
---|
SIsochrone() |
Modifier and Type | Method and Description |
---|---|
double |
getFirstToLastSegmentAngle(com.vividsolutions.jts.geom.Geometry geometry)
Computes the angle from the first point to the last point of a LineString or MultiLineString.
|
String |
getIsochrone(double walkmins,
String output)
Calculates walksheds for a given location, based on time given to walk and the walk speed.
|
buildRequest
public static final String RESULT_TYPE_POINTS
public static final String RESULT_TYPE_SHED
public static final String RESULT_TYPE_EDGES
public double offRoadWalkspeed
public long shedCalcMethodSwitchTimeInSec
public double angleLimitForUShapeDetection
public double distanceToleranceForUShapeDetection
public double maxUserSpeed
public double concaveHullAlpha
public boolean doSpeedTest
@GET @Produces(value="application/json") public String getIsochrone(@QueryParam(value="walkTime") @DefaultValue(value="15") double walkmins, @QueryParam(value="output") @DefaultValue(value="POINTS") String output) throws Exception
The ConcaveHull parameter is set to 0.005 degrees. The offroad walkspeed is assumed to be 0.83333 m/sec (= 3km/h) until a road is hit.
Note that the set of EDGES/roads returned as well as POINTS returned may contain duplicates. If POINTS are requested, then not the end-points are returned at which the max time is reached, but instead all the graph nodes/crossings that are within the time limits.
In case there is no road near by within the given time, then a circle for the walktime limit is created and returned for the SHED parameter. Otherwise the edge with the direction towards the closest road. Note that the circle is calculated in Euclidian 2D coordinates, and distortions towards an ellipse will appear if it is transformed/projected to the user location.
An example request may look like this: localhost:8080/otp-rest-servlet/ws/iso?layers=traveltime&styles=mask&batch=true&fromPlace=51.040193121307176 %2C-114.04471635818481&toPlace =51.09098935%2C-113.95179705&time=2012-06-06T08%3A00%3A00&mode=WALK&maxWalkDistance=10000&walkSpeed=1.38&walkTime=10.7&output=EDGES Though the first parameters (i) layer, (ii) styles and (iii) batch could be discarded.
walkmins
- Maximum number of minutes to walk.output
- Can be set to "POINTS", "SHED" or "EDGES" to return different types of GeoJSON
geometry. SHED returns a ConcaveHull or ConvexHull of the edges/roads. POINTS returns
all graph nodes that are within the time limit.Exception
public double getFirstToLastSegmentAngle(com.vividsolutions.jts.geom.Geometry geometry)
geometry
- a LineString or a MultiLineStringCopyright © 2018. All rights reserved.