Skip to content
GuidesBlogPlaygroundDashboard

Calculate an isochrone from a point

routing.isochrone(**kwargs) -> RoutingIsochroneResponse { features, geometry, properties, type }
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)

format_: String

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

mode: String

Travel mode (auto, foot, bicycle)

output_fields: String

Comma-separated property fields to include

output_geometry: bool

Include geometry (default true)

output_include: String

Extra computed fields: bbox, center

output_precision: Integer

Coordinate decimal precision (1-15, default 7)

output_simplify: Float

Simplify geometry tolerance in meters

ReturnsExpand Collapse
class RoutingIsochroneResponse { 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 } ]

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[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

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

One of the following:
Array[Float]

[longitude, latitude] or [longitude, latitude, elevation]

Array[Array[Float]]

Array of [lng, lat] positions

Array[Array[Array[Float]]]

Array of linear rings / line strings

Array[Array[Array[Array[Float]]]]

Array of polygons

type: :Point | :LineString | :Polygon | 3 more

Geometry type

One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: Hash[Symbol, untyped]

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 }

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

coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

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

One of the following:
Array[Float]

[longitude, latitude] or [longitude, latitude, elevation]

Array[Array[Float]]

Array of [lng, lat] positions

Array[Array[Array[Float]]]

Array of linear rings / line strings

Array[Array[Array[Array[Float]]]]

Array of polygons

type: :Point | :LineString | :Polygon | 3 more

Geometry type

One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { area_m2, max_cost_s, mode, 2 more}

Isochrone metadata

area_m2: Float

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

max_cost_s: Float

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: Float

Travel time budget in seconds

vertices_reached: Integer

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

require "plaza"

plaza = Plaza::Client.new(
  api_key: "My API Key",
  environment: "local" # defaults to "production"
)

response = plaza.routing.isochrone(lat: 0, lng: 0, time: 0)

puts(response)
{
  "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"
}