As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Maps Isochrones v1 API

class google.maps.isochrones_v1.types.GenerateIsochroneRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A request to generate a single isochrone.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

location

The origin as a latitude/longitude coordinate.

This field is a member of oneof origin.

Type

google.type.latlng_pb2.LatLng

place

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

This field is a member of oneof origin.

Type

str

travel_duration

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).

Type

google.protobuf.duration_pb2.Duration

travel_mode

Required. The mode of transportation.

Type

google.maps.isochrones_v1.types.GenerateIsochroneRequest.TravelMode

travel_direction

Required. The direction of travel.

Type

google.maps.isochrones_v1.types.GenerateIsochroneRequest.TravelDirection

routing_preference

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

Type

google.maps.isochrones_v1.types.GenerateIsochroneRequest.RoutingPreference

enable_smoothing

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

Type

bool

polygon_fidelity

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

Type

google.maps.isochrones_v1.types.GenerateIsochroneRequest.PolygonFidelity

class PolygonFidelity(value)[source]

Bases: proto.enums.Enum

Controls the level of detail in the isochrone polygon.

Values:
POLYGON_FIDELITY_UNSPECIFIED (0):

No polygon fidelity specified. The server will use its default, which is based on the travel duration.

LOW (1):

Low precision. Good for covering large areas with fewer vertices.

MEDIUM (2):

Medium precision. A balance between detail and artifact size.

HIGH (3):

High precision. High fidelity edges, but may produce holes in the polygon where the road network density is low.

class RoutingPreference(value)[source]

Bases: proto.enums.Enum

Determines how traffic conditions are incorporated into the calculation.

Values:
ROUTING_PREFERENCE_UNSPECIFIED (0):

No routing preference specified. The server will use its default, which is TRAFFIC_UNAWARE.

TRAFFIC_UNAWARE (1):

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 (2):

The calculation will factor in live traffic conditions.

class TravelDirection(value)[source]

Bases: proto.enums.Enum

Specifies the direction of travel for the isochrone calculation.

Values:
TRAVEL_DIRECTION_UNSPECIFIED (0):

No travel direction specified.

FROM (1):

Calculates the area reachable from the origin point. Example: “Where can I deliver to from my warehouse in 30 minutes?”.

TO (2):

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?”.

class TravelMode(value)[source]

Bases: proto.enums.Enum

Defines the mode of transportation for isochrone calculation.

Values:
TRAVEL_MODE_UNSPECIFIED (0):

No travel mode specified.

DRIVE (1):

Travel by passenger car.

BICYCLE (2):

Travel by bicycle.

WALK (3):

Travel by walking.

class google.maps.isochrones_v1.types.GenerateIsochroneResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A response containing the generated isochrone data.

isochrone

Output only. The generated isochrone.

Type

google.maps.isochrones_v1.types.Isochrone

class google.maps.isochrones_v1.types.Isochrone(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

geo_json

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

This field is a member of oneof geometry.

Type

google.protobuf.struct_pb2.Struct