Skip to content
GuidesPlaygroundDashboard

Calculate an isochrone from a point

routing().isochrone(RoutingIsochroneParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : GeoJsonFeature
GET/api/v1/isochrone

Calculate an isochrone from a point

ParametersExpand Collapse
params: RoutingIsochroneParams
lat: Double

Latitude

lng: Double

Longitude

time: Double

Travel time in seconds (1-7200)

mode: Optional<String>

Travel mode (auto, foot, bicycle)

ReturnsExpand Collapse
class GeoJsonFeature:
geometry: GeoJsonGeometry
coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
properties: Properties
type: Type
id: Optional<String>

Feature identifier (type/osm_id)

osmId: Optional<Long>

OpenStreetMap ID

Calculate an isochrone from a point

package com.plazafyi.example

import com.plazafyi.client.PlazaClient
import com.plazafyi.client.okhttp.PlazaOkHttpClient
import com.plazafyi.models.GeoJsonFeature
import com.plazafyi.models.routing.RoutingIsochroneParams

fun main() {
    val client: PlazaClient = PlazaOkHttpClient.fromEnv()

    val params: RoutingIsochroneParams = RoutingIsochroneParams.builder()
        .lat(0.0)
        .lng(0.0)
        .time(0.0)
        .build()
    val geoJsonFeature: GeoJsonFeature = client.routing().isochrone(params)
}
Returns Examples