Skip to content
GuidesBlogPlaygroundDashboard

Calculate an isochrone from a point

client.routing.isochronePost(RoutingIsochronePostParams { lat, lng, time, 7 more } params, RequestOptionsoptions?): RoutingIsochronePostResponse { features, geometry, properties, type }
POST/api/v1/isochrone

Calculate an isochrone from a point

ParametersExpand Collapse
params: RoutingIsochronePostParams { lat, lng, time, 7 more }
lat: number

Latitude

lng: number

Longitude

time: number

Travel time in seconds (1-7200)

format?: string

Response format: json (default), geojson, csv, ndjson

mode?: string

Travel mode (auto, foot, bicycle)

outputFields?: string

Comma-separated property fields to include

outputGeometry?: boolean

Include geometry (default true)

outputInclude?: string

Extra computed fields: bbox, center

outputPrecision?: number

Coordinate decimal precision (1-15, default 7)

outputSimplify?: number

Simplify geometry tolerance in meters

ReturnsExpand Collapse
RoutingIsochronePostResponse { features, geometry, properties, type }

GeoJSON Feature or FeatureCollection representing isochrone polygons — areas reachable within the specified travel time(s). Single time value returns a Feature; comma-separated times return a FeatureCollection with one polygon per contour.

features?: Array<GeoJsonFeature { geometry, properties, type, id } > | null

Array of isochrone polygon Features (multi-contour only)

geometry: GeoJsonGeometry { coordinates, type }

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more

Geometry type

One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Record<string, unknown>

OSM tags flattened as key-value pairs, plus @type (node/way/relation) and @id (OSM ID) metadata fields. May include distance_m for proximity queries.

type: "Feature"

Always Feature

id?: string

Compound identifier in type/osm_id format

geometry?: GeoJsonGeometry { coordinates, type } | null

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more

Geometry type

One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties?: Properties | null

Isochrone metadata

area_m2?: number | null

Area of the isochrone polygon in square meters (multi-contour features only)

max_cost_s?: number | null

Maximum actual travel cost in seconds to the isochrone boundary (single contour only)

mode?: "auto" | "foot" | "bicycle"

Travel mode used for the isochrone calculation

One of the following:
"auto"
"foot"
"bicycle"
time_seconds?: number

Travel time budget in seconds

vertices_reached?: number

Number of road network vertices within the isochrone

type?: "Feature" | "FeatureCollection"

Feature for single contour, FeatureCollection for multiple contours

One of the following:
"Feature"
"FeatureCollection"

Calculate an isochrone from a point

import Plaza from '@plazafyi/sdk';

const client = new Plaza({
  apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted
});

const response = await client.routing.isochronePost({
  lat: 0,
  lng: 0,
  time: 0,
});

console.log(response.features);
{
  "features": [
    {
      "geometry": {
        "coordinates": [
          2.3522,
          48.8566
        ],
        "type": "Point"
      },
      "properties": {
        "@id": "bar",
        "@type": "bar",
        "amenity": "bar",
        "cuisine": "bar",
        "name": "bar"
      },
      "type": "Feature",
      "id": "node/21154906"
    }
  ],
  "geometry": {
    "coordinates": [
      2.3522,
      48.8566
    ],
    "type": "Point"
  },
  "properties": {
    "area_m2": 0,
    "max_cost_s": 0,
    "mode": "auto",
    "time_seconds": 0,
    "vertices_reached": 0
  },
  "type": "Feature"
}
Returns Examples
{
  "features": [
    {
      "geometry": {
        "coordinates": [
          2.3522,
          48.8566
        ],
        "type": "Point"
      },
      "properties": {
        "@id": "bar",
        "@type": "bar",
        "amenity": "bar",
        "cuisine": "bar",
        "name": "bar"
      },
      "type": "Feature",
      "id": "node/21154906"
    }
  ],
  "geometry": {
    "coordinates": [
      2.3522,
      48.8566
    ],
    "type": "Point"
  },
  "properties": {
    "area_m2": 0,
    "max_cost_s": 0,
    "mode": "auto",
    "time_seconds": 0,
    "vertices_reached": 0
  },
  "type": "Feature"
}