stadiamaps 3.2.1__py3-none-any.whl → 5.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stadiamaps/__init__.py +32 -11
- stadiamaps/api/geocoding_api.py +128 -116
- stadiamaps/api/geospatial_api.py +7 -3
- stadiamaps/api/routing_api.py +33 -19
- stadiamaps/api_client.py +21 -5
- stadiamaps/configuration.py +156 -40
- stadiamaps/exceptions.py +1 -1
- stadiamaps/models/__init__.py +31 -10
- stadiamaps/models/access.py +1 -1
- stadiamaps/models/admin_region.py +1 -1
- stadiamaps/models/administrative.py +1 -1
- stadiamaps/models/annotation_filters.py +124 -0
- stadiamaps/models/auto_costing_options.py +1 -1
- stadiamaps/models/base_costing_options.py +1 -1
- stadiamaps/models/base_trace_request.py +7 -7
- stadiamaps/models/bicycle_costing_options.py +1 -1
- stadiamaps/models/bike_network.py +1 -1
- stadiamaps/models/bulk_request.py +1 -1
- stadiamaps/models/bulk_request_query.py +1 -1
- stadiamaps/models/bulk_search_response.py +4 -4
- stadiamaps/models/contour.py +1 -1
- stadiamaps/models/coordinate.py +1 -1
- stadiamaps/models/costing_model.py +1 -1
- stadiamaps/models/costing_options.py +1 -1
- stadiamaps/models/directions_options.py +4 -4
- stadiamaps/models/distance_unit.py +1 -1
- stadiamaps/models/edge_sign.py +1 -1
- stadiamaps/models/edge_use.py +1 -1
- stadiamaps/models/end_node.py +4 -4
- stadiamaps/models/extended_directions_options.py +121 -0
- stadiamaps/models/geo_attributes.py +1 -1
- stadiamaps/models/geo_json_geometry.py +1 -1
- stadiamaps/models/geo_json_geometry_base.py +1 -1
- stadiamaps/models/geo_json_line_string.py +1 -1
- stadiamaps/models/geo_json_point.py +1 -1
- stadiamaps/models/geo_json_polygon.py +1 -1
- stadiamaps/models/{pelias_response.py → geocode_response.py} +11 -11
- stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
- stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +40 -14
- stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
- stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
- stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
- stadiamaps/models/geocoding_object.py +1 -1
- stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
- stadiamaps/models/height_request.py +4 -4
- stadiamaps/models/height_response.py +4 -4
- stadiamaps/models/highway_classification.py +1 -1
- stadiamaps/models/intersecting_edge.py +1 -1
- stadiamaps/models/isochrone_costing_model.py +1 -1
- stadiamaps/models/isochrone_feature.py +1 -1
- stadiamaps/models/isochrone_properties.py +1 -1
- stadiamaps/models/isochrone_request.py +7 -7
- stadiamaps/models/isochrone_response.py +4 -4
- stadiamaps/models/locate_detailed_edge.py +1 -1
- stadiamaps/models/locate_edge.py +1 -1
- stadiamaps/models/locate_edge_info.py +1 -1
- stadiamaps/models/locate_node.py +1 -1
- stadiamaps/models/locate_object.py +7 -7
- stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
- stadiamaps/models/maneuver_sign.py +13 -13
- stadiamaps/models/maneuver_sign_element.py +1 -1
- stadiamaps/models/map_match_costing_model.py +1 -1
- stadiamaps/models/map_match_request.py +35 -11
- stadiamaps/models/map_match_route_response.py +4 -4
- stadiamaps/models/map_match_trace_options.py +1 -1
- stadiamaps/models/map_match_waypoint.py +1 -1
- stadiamaps/models/matched_point.py +1 -1
- stadiamaps/models/matrix_costing_model.py +1 -1
- stadiamaps/models/matrix_distance.py +1 -1
- stadiamaps/models/matrix_request.py +10 -10
- stadiamaps/models/matrix_response.py +16 -16
- stadiamaps/models/matrix_waypoint.py +1 -1
- stadiamaps/models/motor_scooter_costing_options.py +1 -1
- stadiamaps/models/motorcycle_costing_options.py +1 -1
- stadiamaps/models/nearest_roads_request.py +7 -7
- stadiamaps/models/node_id.py +1 -1
- stadiamaps/models/node_type.py +1 -1
- stadiamaps/models/optimized_route_request.py +35 -11
- stadiamaps/models/osrm_admin.py +103 -0
- stadiamaps/models/osrm_annotation.py +117 -0
- stadiamaps/models/osrm_banner_component.py +113 -0
- stadiamaps/models/osrm_banner_content.py +131 -0
- stadiamaps/models/osrm_banner_instruction.py +112 -0
- stadiamaps/models/osrm_base_api_response.py +112 -0
- stadiamaps/models/osrm_guidance_modifier.py +44 -0
- stadiamaps/models/osrm_intersection.py +145 -0
- stadiamaps/models/osrm_lane.py +111 -0
- stadiamaps/models/osrm_route.py +119 -0
- stadiamaps/models/osrm_route_leg.py +148 -0
- stadiamaps/models/osrm_route_response.py +132 -0
- stadiamaps/models/osrm_route_step.py +185 -0
- stadiamaps/models/osrm_speed_limit.py +117 -0
- stadiamaps/models/osrm_step_maneuver.py +127 -0
- stadiamaps/models/osrm_via_waypoint.py +105 -0
- stadiamaps/models/osrm_voice_instruction.py +105 -0
- stadiamaps/models/osrm_waypoint.py +108 -0
- stadiamaps/models/pedestrian_costing_options.py +1 -1
- stadiamaps/models/restrictions.py +1 -1
- stadiamaps/models/road_class.py +1 -1
- stadiamaps/models/route200_response.py +138 -0
- stadiamaps/models/route_leg.py +4 -4
- stadiamaps/models/route_maneuver.py +1 -1
- stadiamaps/models/route_request.py +34 -12
- stadiamaps/models/route_response.py +4 -4
- stadiamaps/models/route_response_alternates_inner.py +1 -1
- stadiamaps/models/route_summary.py +1 -1
- stadiamaps/models/route_trip.py +13 -13
- stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
- stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
- stadiamaps/models/routing_response_waypoint.py +1 -1
- stadiamaps/models/routing_waypoint.py +1 -1
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
- stadiamaps/models/search_query.py +6 -6
- stadiamaps/models/search_structured_query.py +6 -6
- stadiamaps/models/simple_routing_waypoint.py +1 -1
- stadiamaps/models/speeds.py +1 -1
- stadiamaps/models/trace_attribute_filter_options.py +1 -1
- stadiamaps/models/trace_attribute_key.py +1 -1
- stadiamaps/models/trace_attributes_base_response.py +10 -10
- stadiamaps/models/trace_attributes_request.py +13 -11
- stadiamaps/models/trace_attributes_response.py +16 -16
- stadiamaps/models/trace_edge.py +2 -2
- stadiamaps/models/travel_mode.py +1 -1
- stadiamaps/models/traversability.py +1 -1
- stadiamaps/models/truck_costing_options.py +1 -1
- stadiamaps/models/tz_response.py +1 -1
- stadiamaps/models/warning.py +1 -1
- stadiamaps/rest.py +2 -2
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/METADATA +14 -6
- stadiamaps-5.0.0.dist-info/RECORD +157 -0
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/WHEEL +1 -1
- stadiamaps/models/pelias_response_geocoding.py +0 -89
- stadiamaps/models/route_response_trip.py +0 -117
- stadiamaps/models/trace_attributes_response_all_of.py +0 -96
- stadiamaps-3.2.1.dist-info/RECORD +0 -139
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/LICENSE.txt +0 -0
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -21,18 +21,18 @@ import json
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
23
|
from typing_extensions import Annotated
|
24
|
+
from stadiamaps.models.geocoding_geo_json_feature import GeocodingGeoJSONFeature
|
24
25
|
from stadiamaps.models.geocoding_object import GeocodingObject
|
25
|
-
from stadiamaps.models.pelias_geo_json_feature import PeliasGeoJSONFeature
|
26
26
|
from typing import Optional, Set
|
27
27
|
from typing_extensions import Self
|
28
28
|
|
29
|
-
class
|
29
|
+
class GeocodeResponse(BaseModel):
|
30
30
|
"""
|
31
|
-
|
31
|
+
GeocodeResponse
|
32
32
|
""" # noqa: E501
|
33
33
|
geocoding: GeocodingObject
|
34
34
|
bbox: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=4, max_length=4)]] = Field(default=None, description="An array of 4 floating point numbers representing the (W, S, E, N) extremes of the features found.")
|
35
|
-
features: List[
|
35
|
+
features: List[GeocodingGeoJSONFeature]
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
37
37
|
__properties: ClassVar[List[str]] = ["geocoding", "bbox", "features"]
|
38
38
|
|
@@ -54,7 +54,7 @@ class PeliasResponse(BaseModel):
|
|
54
54
|
|
55
55
|
@classmethod
|
56
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
57
|
-
"""Create an instance of
|
57
|
+
"""Create an instance of GeocodeResponse from a JSON string"""
|
58
58
|
return cls.from_dict(json.loads(json_str))
|
59
59
|
|
60
60
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -83,9 +83,9 @@ class PeliasResponse(BaseModel):
|
|
83
83
|
# override the default output from pydantic by calling `to_dict()` of each item in features (list)
|
84
84
|
_items = []
|
85
85
|
if self.features:
|
86
|
-
for
|
87
|
-
if
|
88
|
-
_items.append(
|
86
|
+
for _item_features in self.features:
|
87
|
+
if _item_features:
|
88
|
+
_items.append(_item_features.to_dict())
|
89
89
|
_dict['features'] = _items
|
90
90
|
# puts key-value pairs in additional_properties in the top level
|
91
91
|
if self.additional_properties is not None:
|
@@ -96,7 +96,7 @@ class PeliasResponse(BaseModel):
|
|
96
96
|
|
97
97
|
@classmethod
|
98
98
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
99
|
-
"""Create an instance of
|
99
|
+
"""Create an instance of GeocodeResponse from a dict"""
|
100
100
|
if obj is None:
|
101
101
|
return None
|
102
102
|
|
@@ -106,7 +106,7 @@ class PeliasResponse(BaseModel):
|
|
106
106
|
_obj = cls.model_validate({
|
107
107
|
"geocoding": GeocodingObject.from_dict(obj["geocoding"]) if obj.get("geocoding") is not None else None,
|
108
108
|
"bbox": obj.get("bbox"),
|
109
|
-
"features": [
|
109
|
+
"features": [GeocodingGeoJSONFeature.from_dict(_item) for _item in obj["features"]] if obj.get("features") is not None else None
|
110
110
|
})
|
111
111
|
# store additional fields in additional_properties
|
112
112
|
for _key in obj.keys():
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -22,17 +22,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, Stric
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
23
|
from typing_extensions import Annotated
|
24
24
|
from stadiamaps.models.geo_json_point import GeoJSONPoint
|
25
|
-
from stadiamaps.models.
|
25
|
+
from stadiamaps.models.geocoding_geo_json_properties import GeocodingGeoJSONProperties
|
26
26
|
from typing import Optional, Set
|
27
27
|
from typing_extensions import Self
|
28
28
|
|
29
|
-
class
|
29
|
+
class GeocodingGeoJSONFeature(BaseModel):
|
30
30
|
"""
|
31
|
-
|
31
|
+
GeocodingGeoJSONFeature
|
32
32
|
""" # noqa: E501
|
33
33
|
type: StrictStr
|
34
34
|
geometry: GeoJSONPoint
|
35
|
-
properties: Optional[
|
35
|
+
properties: Optional[GeocodingGeoJSONProperties] = None
|
36
36
|
bbox: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=4, max_length=4)]] = Field(default=None, description="An array of 4 floating point numbers representing the (W, S, E, N) extremes of the features found.")
|
37
37
|
additional_properties: Dict[str, Any] = {}
|
38
38
|
__properties: ClassVar[List[str]] = ["type", "geometry", "properties", "bbox"]
|
@@ -62,7 +62,7 @@ class PeliasGeoJSONFeature(BaseModel):
|
|
62
62
|
|
63
63
|
@classmethod
|
64
64
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
65
|
-
"""Create an instance of
|
65
|
+
"""Create an instance of GeocodingGeoJSONFeature from a JSON string"""
|
66
66
|
return cls.from_dict(json.loads(json_str))
|
67
67
|
|
68
68
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -100,7 +100,7 @@ class PeliasGeoJSONFeature(BaseModel):
|
|
100
100
|
|
101
101
|
@classmethod
|
102
102
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
103
|
-
"""Create an instance of
|
103
|
+
"""Create an instance of GeocodingGeoJSONFeature from a dict"""
|
104
104
|
if obj is None:
|
105
105
|
return None
|
106
106
|
|
@@ -110,7 +110,7 @@ class PeliasGeoJSONFeature(BaseModel):
|
|
110
110
|
_obj = cls.model_validate({
|
111
111
|
"type": obj.get("type"),
|
112
112
|
"geometry": GeoJSONPoint.from_dict(obj["geometry"]) if obj.get("geometry") is not None else None,
|
113
|
-
"properties":
|
113
|
+
"properties": GeocodingGeoJSONProperties.from_dict(obj["properties"]) if obj.get("properties") is not None else None,
|
114
114
|
"bbox": obj.get("bbox")
|
115
115
|
})
|
116
116
|
# store additional fields in additional_properties
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -20,25 +20,28 @@ import json
|
|
20
20
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from stadiamaps.models.
|
24
|
-
from stadiamaps.models.
|
23
|
+
from stadiamaps.models.geocoding_geo_json_properties_addendum import GeocodingGeoJSONPropertiesAddendum
|
24
|
+
from stadiamaps.models.geocoding_layer import GeocodingLayer
|
25
25
|
from typing import Optional, Set
|
26
26
|
from typing_extensions import Self
|
27
27
|
|
28
|
-
class
|
28
|
+
class GeocodingGeoJSONProperties(BaseModel):
|
29
29
|
"""
|
30
|
-
|
30
|
+
GeocodingGeoJSONProperties
|
31
31
|
""" # noqa: E501
|
32
|
-
gid: Optional[StrictStr] = Field(default=None, description="A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable
|
32
|
+
gid: Optional[StrictStr] = Field(default=None, description="A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable long-term.")
|
33
33
|
source_id: Optional[StrictStr] = Field(default=None, description="An ID referencing the original data source (specified via source) for the result. These IDs are specific to the source that they originated from. For example, in the case of OSM, these typically look like way/123 or point/123.")
|
34
34
|
label: Optional[StrictStr] = Field(default=None, description="A full, human-readable label. However, you may not necessarily want to use this; be sure to read the docs for name, locality, and region before making a decision. This field is mostly localized. The order of components is generally locally correct (ex: for an address in South Korea, the house number appears after the street name). However, components will use a request language equivalent if one exists (ex: Seoul instead of 서울 if lang=en).")
|
35
|
-
layer: Optional[
|
35
|
+
layer: Optional[GeocodingLayer] = None
|
36
|
+
source: Optional[StrictStr] = Field(default=None, description="The ID of the data source that the result came from.")
|
36
37
|
name: Optional[StrictStr] = Field(default=None, description="The name of the place, the street address including house number, or label of similar relevance. If your app is localized to a specific region, you may get better display results by combining name, locality OR region (or neither?), and postal code together in the local format. Experiment with what works best for your use case.")
|
37
38
|
accuracy: Optional[StrictStr] = Field(default=None, description="The accuracy of the geographic coordinates in the result. This value is a property of the result itself and won't change based on the query. A point result means that the record can reasonably be represented by a single geographic point. Addresses, venues, or interpolated addresses usually have point accuracy. Larger areas, such as a city or country, cannot be represented by a single point, so a centroid is given instead.")
|
38
|
-
addendum: Optional[
|
39
|
+
addendum: Optional[GeocodingGeoJSONPropertiesAddendum] = None
|
39
40
|
continent: Optional[StrictStr] = None
|
40
41
|
continent_gid: Optional[StrictStr] = None
|
41
42
|
country: Optional[StrictStr] = None
|
43
|
+
country_a: Optional[StrictStr] = Field(default=None, description="The ISO 3166-1 alpha-3 code for the country the place is located in.")
|
44
|
+
country_code: Optional[StrictStr] = Field(default=None, description="The ISO 3166-1 alpha-2 code for the country the place is located in.")
|
42
45
|
country_gid: Optional[StrictStr] = None
|
43
46
|
neighbourhood: Optional[StrictStr] = None
|
44
47
|
neighbourhood_gid: Optional[StrictStr] = None
|
@@ -50,10 +53,15 @@ class PeliasGeoJSONProperties(BaseModel):
|
|
50
53
|
locality: Optional[StrictStr] = Field(default=None, description="The city, village, town, etc. that the place / address is part of. Note that values may not always match postal or local conventions perfectly.")
|
51
54
|
locality_gid: Optional[StrictStr] = None
|
52
55
|
county: Optional[StrictStr] = Field(default=None, description="Administrative divisions between localities and regions. Useful for disambiguating nearby results with similar names.")
|
56
|
+
county_gid: Optional[StrictStr] = None
|
53
57
|
region: Optional[StrictStr] = Field(default=None, description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")
|
54
|
-
region_a: Optional[StrictStr] = Field(default=None, description="The abbreviation for the region.")
|
58
|
+
region_a: Optional[StrictStr] = Field(default=None, description="The abbreviation for the region (e.g. PA for the US state of Pennsylvania).")
|
59
|
+
region_gid: Optional[StrictStr] = None
|
60
|
+
localadmin: Optional[StrictStr] = Field(default=None, description="In many countries, this is the lowest level of government. Sometimes interchangeable with locality.")
|
61
|
+
localadmin_gid: Optional[StrictStr] = None
|
62
|
+
match_type: Optional[StrictStr] = Field(default=None, description="For search and structured search results, the type of match.")
|
55
63
|
additional_properties: Dict[str, Any] = {}
|
56
|
-
__properties: ClassVar[List[str]] = ["gid", "source_id", "label", "layer", "name", "accuracy", "addendum", "continent", "continent_gid", "country", "country_gid", "neighbourhood", "neighbourhood_gid", "borough", "borough_gid", "postalcode", "street", "housenumber", "locality", "locality_gid", "county", "region", "region_a"]
|
64
|
+
__properties: ClassVar[List[str]] = ["gid", "source_id", "label", "layer", "source", "name", "accuracy", "addendum", "continent", "continent_gid", "country", "country_a", "country_code", "country_gid", "neighbourhood", "neighbourhood_gid", "borough", "borough_gid", "postalcode", "street", "housenumber", "locality", "locality_gid", "county", "county_gid", "region", "region_a", "region_gid", "localadmin", "localadmin_gid", "match_type"]
|
57
65
|
|
58
66
|
@field_validator('accuracy')
|
59
67
|
def accuracy_validate_enum(cls, value):
|
@@ -65,6 +73,16 @@ class PeliasGeoJSONProperties(BaseModel):
|
|
65
73
|
raise ValueError("must be one of enum values ('point', 'centroid')")
|
66
74
|
return value
|
67
75
|
|
76
|
+
@field_validator('match_type')
|
77
|
+
def match_type_validate_enum(cls, value):
|
78
|
+
"""Validates the enum"""
|
79
|
+
if value is None:
|
80
|
+
return value
|
81
|
+
|
82
|
+
if value not in set(['exact', 'interpolated', 'fallback']):
|
83
|
+
raise ValueError("must be one of enum values ('exact', 'interpolated', 'fallback')")
|
84
|
+
return value
|
85
|
+
|
68
86
|
model_config = ConfigDict(
|
69
87
|
populate_by_name=True,
|
70
88
|
validate_assignment=True,
|
@@ -83,7 +101,7 @@ class PeliasGeoJSONProperties(BaseModel):
|
|
83
101
|
|
84
102
|
@classmethod
|
85
103
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
86
|
-
"""Create an instance of
|
104
|
+
"""Create an instance of GeocodingGeoJSONProperties from a JSON string"""
|
87
105
|
return cls.from_dict(json.loads(json_str))
|
88
106
|
|
89
107
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -118,7 +136,7 @@ class PeliasGeoJSONProperties(BaseModel):
|
|
118
136
|
|
119
137
|
@classmethod
|
120
138
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
121
|
-
"""Create an instance of
|
139
|
+
"""Create an instance of GeocodingGeoJSONProperties from a dict"""
|
122
140
|
if obj is None:
|
123
141
|
return None
|
124
142
|
|
@@ -130,12 +148,15 @@ class PeliasGeoJSONProperties(BaseModel):
|
|
130
148
|
"source_id": obj.get("source_id"),
|
131
149
|
"label": obj.get("label"),
|
132
150
|
"layer": obj.get("layer"),
|
151
|
+
"source": obj.get("source"),
|
133
152
|
"name": obj.get("name"),
|
134
153
|
"accuracy": obj.get("accuracy"),
|
135
|
-
"addendum":
|
154
|
+
"addendum": GeocodingGeoJSONPropertiesAddendum.from_dict(obj["addendum"]) if obj.get("addendum") is not None else None,
|
136
155
|
"continent": obj.get("continent"),
|
137
156
|
"continent_gid": obj.get("continent_gid"),
|
138
157
|
"country": obj.get("country"),
|
158
|
+
"country_a": obj.get("country_a"),
|
159
|
+
"country_code": obj.get("country_code"),
|
139
160
|
"country_gid": obj.get("country_gid"),
|
140
161
|
"neighbourhood": obj.get("neighbourhood"),
|
141
162
|
"neighbourhood_gid": obj.get("neighbourhood_gid"),
|
@@ -147,8 +168,13 @@ class PeliasGeoJSONProperties(BaseModel):
|
|
147
168
|
"locality": obj.get("locality"),
|
148
169
|
"locality_gid": obj.get("locality_gid"),
|
149
170
|
"county": obj.get("county"),
|
171
|
+
"county_gid": obj.get("county_gid"),
|
150
172
|
"region": obj.get("region"),
|
151
|
-
"region_a": obj.get("region_a")
|
173
|
+
"region_a": obj.get("region_a"),
|
174
|
+
"region_gid": obj.get("region_gid"),
|
175
|
+
"localadmin": obj.get("localadmin"),
|
176
|
+
"localadmin_gid": obj.get("localadmin_gid"),
|
177
|
+
"match_type": obj.get("match_type")
|
152
178
|
})
|
153
179
|
# store additional fields in additional_properties
|
154
180
|
for _key in obj.keys():
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -20,15 +20,15 @@ import json
|
|
20
20
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from stadiamaps.models.
|
23
|
+
from stadiamaps.models.geocoding_geo_json_properties_addendum_osm import GeocodingGeoJSONPropertiesAddendumOsm
|
24
24
|
from typing import Optional, Set
|
25
25
|
from typing_extensions import Self
|
26
26
|
|
27
|
-
class
|
27
|
+
class GeocodingGeoJSONPropertiesAddendum(BaseModel):
|
28
28
|
"""
|
29
29
|
Optional additional information from the underlying data source (ex: OSM). This includes select fields. The most useful fields are mapped in the definition here, but others may be available.
|
30
30
|
""" # noqa: E501
|
31
|
-
osm: Optional[
|
31
|
+
osm: Optional[GeocodingGeoJSONPropertiesAddendumOsm] = None
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties: ClassVar[List[str]] = ["osm"]
|
34
34
|
|
@@ -50,7 +50,7 @@ class PeliasGeoJSONPropertiesAddendum(BaseModel):
|
|
50
50
|
|
51
51
|
@classmethod
|
52
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
-
"""Create an instance of
|
53
|
+
"""Create an instance of GeocodingGeoJSONPropertiesAddendum from a JSON string"""
|
54
54
|
return cls.from_dict(json.loads(json_str))
|
55
55
|
|
56
56
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -85,7 +85,7 @@ class PeliasGeoJSONPropertiesAddendum(BaseModel):
|
|
85
85
|
|
86
86
|
@classmethod
|
87
87
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
88
|
-
"""Create an instance of
|
88
|
+
"""Create an instance of GeocodingGeoJSONPropertiesAddendum from a dict"""
|
89
89
|
if obj is None:
|
90
90
|
return None
|
91
91
|
|
@@ -93,7 +93,7 @@ class PeliasGeoJSONPropertiesAddendum(BaseModel):
|
|
93
93
|
return cls.model_validate(obj)
|
94
94
|
|
95
95
|
_obj = cls.model_validate({
|
96
|
-
"osm":
|
96
|
+
"osm": GeocodingGeoJSONPropertiesAddendumOsm.from_dict(obj["osm"]) if obj.get("osm") is not None else None
|
97
97
|
})
|
98
98
|
# store additional fields in additional_properties
|
99
99
|
for _key in obj.keys():
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -23,9 +23,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
26
|
-
class
|
26
|
+
class GeocodingGeoJSONPropertiesAddendumOsm(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
GeocodingGeoJSONPropertiesAddendumOsm
|
29
29
|
""" # noqa: E501
|
30
30
|
website: Optional[StrictStr] = None
|
31
31
|
wikipedia: Optional[StrictStr] = None
|
@@ -52,7 +52,7 @@ class PeliasGeoJSONPropertiesAddendumOsm(BaseModel):
|
|
52
52
|
|
53
53
|
@classmethod
|
54
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
55
|
-
"""Create an instance of
|
55
|
+
"""Create an instance of GeocodingGeoJSONPropertiesAddendumOsm from a JSON string"""
|
56
56
|
return cls.from_dict(json.loads(json_str))
|
57
57
|
|
58
58
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -84,7 +84,7 @@ class PeliasGeoJSONPropertiesAddendumOsm(BaseModel):
|
|
84
84
|
|
85
85
|
@classmethod
|
86
86
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
-
"""Create an instance of
|
87
|
+
"""Create an instance of GeocodingGeoJSONPropertiesAddendumOsm from a dict"""
|
88
88
|
if obj is None:
|
89
89
|
return None
|
90
90
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -19,7 +19,7 @@ from enum import Enum
|
|
19
19
|
from typing_extensions import Self
|
20
20
|
|
21
21
|
|
22
|
-
class
|
22
|
+
class GeocodingLayer(str, Enum):
|
23
23
|
"""
|
24
24
|
Our database is organized into several layers (in the GIS sense of the term) as follows: - `venue`: Points of interest, businesses, and things with walls - `address`: Places with a street address - `street`: Streets, roads, highways - `county`: Places that issue passports, nations, nation-states - `macroregion`: A related group of regions (mostly in Europe) - `region`: The first administrative division within a country (usually states and provinces) - `macrocounty`: A related group of counties (mostly in Europe) - `county`: Official governmental areas; usually bigger than a locality, but almost always smaller than a region - `locality`: Towns, hamlets, cities, etc. - `localadmin`: Local administrative boundaries - `borough`: Local administrative boundaries within cities (not widely used, but present in places such as NYC and Mexico City) - `neighbourhood`: Social communities and neighborhoods (note the British spelling in the API!) - `postalcode`: Postal codes used by mail services (note: not used for reverse geocoding) - `coarse`: An alias for simultaneously using all administrative layers (everything except `venue` and `address`) - `marinearea`: Places with fishes and boats. - `ocean`: A really big marine area.
|
25
25
|
"""
|
@@ -51,7 +51,7 @@ class PeliasLayer(str, Enum):
|
|
51
51
|
|
52
52
|
@classmethod
|
53
53
|
def from_json(cls, json_str: str) -> Self:
|
54
|
-
"""Create an instance of
|
54
|
+
"""Create an instance of GeocodingLayer from a JSON string"""
|
55
55
|
return cls(json.loads(json_str))
|
56
56
|
|
57
57
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -19,7 +19,7 @@ from enum import Enum
|
|
19
19
|
from typing_extensions import Self
|
20
20
|
|
21
21
|
|
22
|
-
class
|
22
|
+
class GeocodingSource(str, Enum):
|
23
23
|
"""
|
24
24
|
Our database contains info from multiple sources. These identifiers can be used to either limit search results or to determine the relevance of a result.
|
25
25
|
"""
|
@@ -31,10 +31,11 @@ class PeliasSource(str, Enum):
|
|
31
31
|
OPENADDRESSES = 'openaddresses'
|
32
32
|
WHOSONFIRST = 'whosonfirst'
|
33
33
|
GEONAMES = 'geonames'
|
34
|
+
FOURSQUARE = 'foursquare'
|
34
35
|
|
35
36
|
@classmethod
|
36
37
|
def from_json(cls, json_str: str) -> Self:
|
37
|
-
"""Create an instance of
|
38
|
+
"""Create an instance of GeocodingSource from a JSON string"""
|
38
39
|
return cls(json.loads(json_str))
|
39
40
|
|
40
41
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -93,9 +93,9 @@ class HeightRequest(BaseModel):
|
|
93
93
|
# override the default output from pydantic by calling `to_dict()` of each item in shape (list)
|
94
94
|
_items = []
|
95
95
|
if self.shape:
|
96
|
-
for
|
97
|
-
if
|
98
|
-
_items.append(
|
96
|
+
for _item_shape in self.shape:
|
97
|
+
if _item_shape:
|
98
|
+
_items.append(_item_shape.to_dict())
|
99
99
|
_dict['shape'] = _items
|
100
100
|
# puts key-value pairs in additional_properties in the top level
|
101
101
|
if self.additional_properties is not None:
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -81,9 +81,9 @@ class HeightResponse(BaseModel):
|
|
81
81
|
# override the default output from pydantic by calling `to_dict()` of each item in shape (list)
|
82
82
|
_items = []
|
83
83
|
if self.shape:
|
84
|
-
for
|
85
|
-
if
|
86
|
-
_items.append(
|
84
|
+
for _item_shape in self.shape:
|
85
|
+
if _item_shape:
|
86
|
+
_items.append(_item_shape.to_dict())
|
87
87
|
_dict['shape'] = _items
|
88
88
|
# puts key-value pairs in additional_properties in the top level
|
89
89
|
if self.additional_properties is not None:
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -88,9 +88,9 @@ class IsochroneRequest(BaseModel):
|
|
88
88
|
# override the default output from pydantic by calling `to_dict()` of each item in locations (list)
|
89
89
|
_items = []
|
90
90
|
if self.locations:
|
91
|
-
for
|
92
|
-
if
|
93
|
-
_items.append(
|
91
|
+
for _item_locations in self.locations:
|
92
|
+
if _item_locations:
|
93
|
+
_items.append(_item_locations.to_dict())
|
94
94
|
_dict['locations'] = _items
|
95
95
|
# override the default output from pydantic by calling `to_dict()` of costing_options
|
96
96
|
if self.costing_options:
|
@@ -98,9 +98,9 @@ class IsochroneRequest(BaseModel):
|
|
98
98
|
# override the default output from pydantic by calling `to_dict()` of each item in contours (list)
|
99
99
|
_items = []
|
100
100
|
if self.contours:
|
101
|
-
for
|
102
|
-
if
|
103
|
-
_items.append(
|
101
|
+
for _item_contours in self.contours:
|
102
|
+
if _item_contours:
|
103
|
+
_items.append(_item_contours.to_dict())
|
104
104
|
_dict['contours'] = _items
|
105
105
|
# puts key-value pairs in additional_properties in the top level
|
106
106
|
if self.additional_properties is not None:
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -85,9 +85,9 @@ class IsochroneResponse(BaseModel):
|
|
85
85
|
# override the default output from pydantic by calling `to_dict()` of each item in features (list)
|
86
86
|
_items = []
|
87
87
|
if self.features:
|
88
|
-
for
|
89
|
-
if
|
90
|
-
_items.append(
|
88
|
+
for _item_features in self.features:
|
89
|
+
if _item_features:
|
90
|
+
_items.append(_item_features.to_dict())
|
91
91
|
_dict['features'] = _items
|
92
92
|
# puts key-value pairs in additional_properties in the top level
|
93
93
|
if self.additional_properties is not None:
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|