-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocation.py
58 lines (43 loc) · 1.4 KB
/
Location.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from pydantic import BaseModel
from typing import Optional
class BoundingBox(BaseModel):
"""The spatial limits of a bounding box.
Fields
------
westBoundLongitude: float
Western longitudinal dimension of the bounding box: -180 -180
eastBoundLongitude: float
Eastern longitudinal dimension of the bounding box: -180 -180
southBoundLatitude: float
Southern latitudinal dimensions of the bounding box: -90 -90
northBoundLatitude: float
Northern latitudinal dimensions of the bounding box: -90 -90
"""
westBoundLongitude: float
eastBoundLongitude: float
southBoundLatitude: float
northBoundLatitude: float
class Centroid(BaseModel):
"""The longitude and latitude coordinates of the Location's centroid
Fields
------
point_longitude: float
Longitude decimal degrees: -180 -180
point_latitude: float
Latitude decimal degrees: -90 -90
"""
pointLongitude: float
pointLatitude: float
class Location(BaseModel):
"""A spatial region of named place
Fields
------
geometry: Geometry
Not included in initial schema. Could be added in the future
bbox: BoundingBox
The spatial limits of a bounding box.
centroid: Centroid
The longitude and latitude coordinates of the Location's centroid
"""
bbox: Optional[BoundingBox]
centroid: Optional[Centroid]