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.MessageA 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
- 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).
- travel_mode¶
Required. The mode of transportation.
- travel_direction¶
Required. The direction of travel.
- routing_preference¶
Optional. Specifies the preference for how to route. Defaults to TRAFFIC_UNAWARE.
- enable_smoothing¶
Optional. Specifies whether to smooth the edges of the resulting isochrone polygons.
- Type
- polygon_fidelity¶
Optional. Controls the precision of the generated polygon. Defaults to POLYGON_FIDELITY_UNSPECIFIED.
- class PolygonFidelity(value)[source]¶
Bases:
proto.enums.EnumControls 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.EnumDetermines 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.EnumSpecifies 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.EnumDefines 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.MessageA response containing the generated isochrone data.
- isochrone¶
Output only. The generated isochrone.
- class google.maps.isochrones_v1.types.Isochrone(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe 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.