@Path(value="/surfaces") @Produces(value="application/json") public class SurfaceResource extends RoutingResource
arriveBy, bannedAgencies, bannedRoutes, bannedStops, bannedStopsHard, bannedTrips, batch, bikeBoardCost, bikeSpeed, bikeSwitchCost, bikeSwitchTime, clampInitialWait, date, disableRemainingWeightHeuristic, flexFlagStopBufferSize, flexIgnoreDrtAdvanceBookMin, flexUseEligibilityServices, flexUseReservationServices, 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, whiteListedAgencies, whiteListedRoutes
Constructor and Description |
---|
SurfaceResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createSurface(int cutoffMinutes,
String routerId) |
javax.ws.rs.core.Response |
differenceTileGet(Integer surfaceId,
Integer compareToSurfaceId,
int x,
int y,
int z)
Renders a raster tile for showing the difference between two TimeSurfaces.
|
javax.ws.rs.core.Response |
getIndicator(Integer surfaceId,
String targetPointSetId,
String originPointSetId,
boolean detail)
Evaluate a surface at all the points in a PointSet.
|
javax.ws.rs.core.Response |
getIsochrone(Integer surfaceId,
int spacing,
int nMax)
Create vector isochrones for a surface.
|
static List<IsochroneData> |
getIsochronesAccumulative(TimeSurface surf,
int spacing,
int nMax)
Use Laurent's accumulative grid sampler.
|
javax.ws.rs.core.Response |
getRaster(Integer surfaceId,
Integer width,
Integer height,
Double resolution,
IsoTimeParameter time,
MIMEImageFormat format,
CRSParameter crs)
Produce a single grayscale raster of travel time, like travel time tiles but not broken into tiles.
|
javax.ws.rs.core.Response |
getTimeSurfaceList()
List all the available surfaces.
|
javax.ws.rs.core.Response |
getTimeSurfaceList(Integer surfaceId)
Describe a specific surface.
|
javax.ws.rs.core.Response |
tileGet(Integer surfaceId,
int x,
int y,
int z) |
buildRequest
@POST public javax.ws.rs.core.Response createSurface(@QueryParam(value="cutoffMinutes") @DefaultValue(value="90") int cutoffMinutes, @QueryParam(value="routerId") String routerId)
@GET public javax.ws.rs.core.Response getTimeSurfaceList()
@GET @Path(value="/{surfaceId}") public javax.ws.rs.core.Response getTimeSurfaceList(@PathParam(value="surfaceId") Integer surfaceId)
@GET @Path(value="/{surfaceId}/indicator") public javax.ws.rs.core.Response getIndicator(@PathParam(value="surfaceId") Integer surfaceId, @QueryParam(value="targets") String targetPointSetId, @QueryParam(value="origins") String originPointSetId, @QueryParam(value="detail") boolean detail)
detail
- if true, include the travel time to every point in the pointset (which is in fact an ordered list)@GET @Path(value="/{surfaceId}/isochrone") public javax.ws.rs.core.Response getIsochrone(@PathParam(value="surfaceId") Integer surfaceId, @QueryParam(value="spacing") int spacing, @QueryParam(value="nMax") @DefaultValue(value="1") int nMax)
@Path(value="/{surfaceId}/isotiles/{z}/{x}/{y}.png") @GET @Produces(value="image/png") public javax.ws.rs.core.Response tileGet(@PathParam(value="surfaceId") Integer surfaceId, @PathParam(value="x") int x, @PathParam(value="y") int y, @PathParam(value="z") int z) throws Exception
Exception
@Path(value="/{surfaceId}/differencetiles/{compareToSurfaceId}/{z}/{x}/{y}.png") @GET @Produces(value="image/png") public javax.ws.rs.core.Response differenceTileGet(@PathParam(value="surfaceId") Integer surfaceId, @PathParam(value="compareToSurfaceId") Integer compareToSurfaceId, @PathParam(value="x") int x, @PathParam(value="y") int y, @PathParam(value="z") int z) throws Exception
surfaceId
- The id of the first surfacecompareToSurfaceId
- The id of of the surface, which is compared to the first surfaceException
public static List<IsochroneData> getIsochronesAccumulative(TimeSurface surf, int spacing, int nMax)
spacing
- the number of minutes between isochrones@Path(value="/{surfaceId}/raster") @GET @Produces(value="image/*") public javax.ws.rs.core.Response getRaster(@PathParam(value="surfaceId") Integer surfaceId, @QueryParam(value="width") @DefaultValue(value="1024") Integer width, @QueryParam(value="height") @DefaultValue(value="768") Integer height, @QueryParam(value="resolution") Double resolution, @QueryParam(value="time") IsoTimeParameter time, @QueryParam(value="format") @DefaultValue(value="image/geotiff") MIMEImageFormat format, @QueryParam(value="crs") @DefaultValue(value="EPSG:4326") CRSParameter crs) throws Exception
Exception
Copyright © 2019. All rights reserved.