Method: isochrones.generate

Calculates and returns a single isochrone for a given set of parameters.

HTTP request

POST https://isochrones.googleapis.com/v1/isochrones:generate

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "travelDuration": string,
  "travelMode": enum (TravelMode),
  "travelDirection": enum (TravelDirection),
  "routingPreference": enum (RoutingPreference),
  "enableSmoothing": boolean,
  "polygonFidelity": enum (PolygonFidelity),

  // Union field origin can be only one of the following:
  "location": {
    object (LatLng)
  },
  "place": string
  // End of list of possible types for union field origin.
}
Fields
travelDuration

string (Duration format)

Required. The travel time for the isochrone calculation. The value must be positive and is capped at 7200 seconds (120 minutes). For DRIVE mode, the maximum allowed duration is 3600 seconds (60 minutes).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

travelMode

enum (TravelMode)

Required. The mode of transportation.

travelDirection

enum (TravelDirection)

Required. The direction of travel.

routingPreference

enum (RoutingPreference)

Optional. Specifies the preference for how to route. Defaults to TRAFFIC_UNAWARE.

enableSmoothing

boolean

Optional. Specifies whether to smooth the edges of the resulting isochrone polygons.

polygonFidelity

enum (PolygonFidelity)

Optional. Controls the precision of the generated polygon. Defaults to POLYGON_FIDELITY_UNSPECIFIED.

Union field origin. Required. The starting point for the isochrone calculation. origin can be only one of the following:
location

object (LatLng)

The origin as a latitude/longitude coordinate.

place

string

The resource name of a place, in the places/{place_id} format.

Response body

A response containing the generated isochrone data.

If successful, the response body contains data with the following structure:

JSON representation
{
  "isochrone": {
    object (Isochrone)
  }
}
Fields
isochrone

object (Isochrone)

Output only. The generated isochrone.

LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

JSON representation
{
  "latitude": number,
  "longitude": number
}
Fields
latitude

number

The latitude in degrees. It must be in the range [-90.0, +90.0].

longitude

number

The longitude in degrees. It must be in the range [-180.0, +180.0].

TravelMode

Defines the mode of transportation for isochrone calculation.

Enums
TRAVEL_MODE_UNSPECIFIED No travel mode specified.
DRIVE Travel by passenger car.
BICYCLE Travel by bicycle.
WALK Travel by walking.

TravelDirection

Specifies the direction of travel for the isochrone calculation.

Enums
TRAVEL_DIRECTION_UNSPECIFIED No travel direction specified.
FROM Calculates the area reachable from the origin point. Example: "Where can I deliver to from my warehouse in 30 minutes?"
TO Calculates the area from which you can travel to the origin point. Example: "Where can my employees commute from to reach the office in 30 minutes?"

RoutingPreference

Determines how traffic conditions are incorporated into the calculation.

Enums
ROUTING_PREFERENCE_UNSPECIFIED No routing preference specified. The server will use its default, which is TRAFFIC_UNAWARE.
TRAFFIC_UNAWARE The calculation will not take traffic conditions into consideration. The isochrone will be based on the road network and static travel times. This is suitable for planning purposes where traffic is not a factor.
TRAFFIC_AWARE The calculation will factor in live traffic conditions.

PolygonFidelity

Controls the level of detail in the isochrone polygon.

Enums
POLYGON_FIDELITY_UNSPECIFIED No polygon fidelity specified. The server will use its default, which is based on the travel duration.
LOW Low precision. Good for covering large areas with fewer vertices.
MEDIUM Medium precision. A balance between detail and artifact size.
HIGH High precision. High fidelity edges, but may produce holes in the polygon where the road network density is low.

Isochrone

The result of an isochrone calculation, representing an area of reachability from an origin point within a specified travel time.

JSON representation
{

  // Union field geometry can be only one of the following:
  "geoJson": {
    object
  }
  // End of list of possible types for union field geometry.
}
Fields
Union field geometry. The geometric representation of the isochrone. geometry can be only one of the following:
geoJson

object (Struct format)

The isochrone geometry in GeoJSON format, using the RFC 7946 format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.