/** Create vector isochrones for a surface. */
@GET @Path("/{surfaceId}/isochrone")
public Response getIsochrone (
@PathParam("surfaceId") Integer surfaceId,
@QueryParam("spacing") int spacing) {
final TimeSurface surf = server.surfaceCache.get(surfaceId);
if (surf == null) return badRequest("Invalid TimeSurface ID.");
if (spacing < 1) spacing = 5;
List<IsochroneData> isochrones = getIsochronesAccumulative(surf, spacing);
final FeatureCollection fc = LIsochrone.makeContourFeatures(isochrones);
return Response.ok().entity(new StreamingOutput() {