Skip to content
GuidesPlaygroundDashboard

Calculate an isochrone from a point

routing.isochrone(RoutingIsochroneParams**kwargs) -> GeoJsonFeature
GET/api/v1/isochrone

Calculate an isochrone from a point

ParametersExpand Collapse
lat: float

Latitude

lng: float

Longitude

time: float

Travel time in seconds (1-7200)

mode: Optional[str]

Travel mode (auto, foot, bicycle)

ReturnsExpand Collapse
class GeoJsonFeature:
geometry: GeoJsonGeometry
coordinates: Union[List[float], List[List[float]], List[List[List[float]]], List[List[List[List[float]]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Dict[str, object]
type: Literal["Feature"]
id: Optional[str]

Feature identifier (type/osm_id)

osm_id: Optional[int]

OpenStreetMap ID

Calculate an isochrone from a point

import os
from plaza import Plaza

client = Plaza(
    api_key=os.environ.get("PLAZA_API_KEY"),  # This is the default and can be omitted
)
geo_json_feature = client.routing.isochrone(
    lat=0,
    lng=0,
    time=0,
)
print(geo_json_feature.id)
Returns Examples