Skip to content
GuidesPlaygroundDashboard

Calculate an isochrone from a point

routing.isochrone(**kwargs) -> GeoJsonFeature { geometry, properties, type, 2 more }
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: String

Travel mode (auto, foot, bicycle)

ReturnsExpand Collapse
class GeoJsonFeature { geometry, properties, type, 2 more }
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: Hash[Symbol, untyped]
type: :Feature
id: String

Feature identifier (type/osm_id)

osm_id: Integer

OpenStreetMap ID

Calculate an isochrone from a point

require "plaza"

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

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

puts(geo_json_feature)
Returns Examples