overture-schema-theme-base 0.1.1.dev0__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.
@@ -0,0 +1,45 @@
1
+ """Base theme.
2
+
3
+ Fundamental geographic features including bathymetry, infrastructure, land, land cover,
4
+ land use, and water features.
5
+ """
6
+
7
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
8
+
9
+
10
+ from ._common import (
11
+ Depth,
12
+ Elevation,
13
+ Height,
14
+ SourceTags,
15
+ SurfaceMaterial,
16
+ )
17
+ from .bathymetry import Bathymetry
18
+ from .infrastructure import Infrastructure, InfrastructureClass, InfrastructureSubtype
19
+ from .land import Land, LandClass, LandSubtype
20
+ from .land_cover import LandCover, LandCoverSubtype
21
+ from .land_use import LandUse, LandUseClass, LandUseSubtype
22
+ from .water import Water, WaterClass, WaterSubtype
23
+
24
+ __all__ = [
25
+ "Bathymetry",
26
+ "Depth",
27
+ "Elevation",
28
+ "Height",
29
+ "Infrastructure",
30
+ "InfrastructureClass",
31
+ "InfrastructureSubtype",
32
+ "Land",
33
+ "LandClass",
34
+ "LandCover",
35
+ "LandCoverSubtype",
36
+ "LandSubtype",
37
+ "LandUse",
38
+ "LandUseClass",
39
+ "LandUseSubtype",
40
+ "SourceTags",
41
+ "SurfaceMaterial",
42
+ "Water",
43
+ "WaterClass",
44
+ "WaterSubtype",
45
+ ]
@@ -0,0 +1,89 @@
1
+ import textwrap
2
+ from enum import Enum
3
+ from typing import Annotated, Any, NewType
4
+
5
+ from pydantic import BaseModel, Field
6
+
7
+ from overture.schema.system.numeric import float64, int32
8
+ from overture.schema.system.string import WikidataId
9
+
10
+ Depth = NewType(
11
+ "Depth",
12
+ Annotated[
13
+ int32,
14
+ Field(
15
+ ge=0,
16
+ description="Depth below surface level of the feature in meters.",
17
+ ),
18
+ ],
19
+ )
20
+
21
+ Elevation = NewType(
22
+ "Elevation",
23
+ Annotated[
24
+ int32,
25
+ Field(
26
+ le=9000,
27
+ description="Elevation above sea level of the feature in meters.",
28
+ ),
29
+ ],
30
+ )
31
+
32
+ Height = NewType(
33
+ "Height",
34
+ Annotated[float64, Field(gt=0, description="Height of the feature in meters.")],
35
+ )
36
+
37
+
38
+ SourceTags = NewType(
39
+ "SourceTags",
40
+ Annotated[
41
+ dict[str, Any],
42
+ Field(
43
+ description=textwrap.dedent("""
44
+ Key/value pairs imported directly from the source data without change.
45
+
46
+ This field provides access to raw OSM entity tags for features sourced from
47
+ OpenStreetMap.
48
+ """).strip()
49
+ ),
50
+ ],
51
+ )
52
+
53
+
54
+ class SourcedFromOpenStreetMap(BaseModel):
55
+ """
56
+ Model derived from an OpenStreetMap entity and containing the entity's OSM tags and wikidata ID.
57
+ """
58
+
59
+ source_tags: SourceTags | None = None
60
+ wikidata: WikidataId | None = None
61
+
62
+
63
+ class SurfaceMaterial(str, Enum):
64
+ """Material that makes up the surface of `Infrastructure` and `Land` features."""
65
+
66
+ ASPHALT = "asphalt"
67
+ COBBLESTONE = "cobblestone"
68
+ COMPACTED = "compacted"
69
+ CONCRETE = "concrete"
70
+ CONCRETE_PLATES = "concrete_plates"
71
+ DIRT = "dirt"
72
+ EARTH = "earth"
73
+ FINE_GRAVEL = "fine_gravel"
74
+ GRASS = "grass"
75
+ GRAVEL = "gravel"
76
+ GROUND = "ground"
77
+ PAVED = "paved"
78
+ PAVING_STONES = "paving_stones"
79
+ PEBBLESTONE = "pebblestone"
80
+ RECREATION_GRASS = "recreation_grass"
81
+ RECREATION_PAVED = "recreation_paved"
82
+ RECREATION_SAND = "recreation_sand"
83
+ RUBBER = "rubber"
84
+ SAND = "sand"
85
+ SETT = "sett"
86
+ TARTAN = "tartan"
87
+ UNPAVED = "unpaved"
88
+ WOOD = "wood"
89
+ WOODCHIPS = "woodchips"
@@ -0,0 +1,44 @@
1
+ """
2
+ The `Bathymetry` feature type model and supporting types.
3
+ """
4
+
5
+ from typing import Annotated, Literal
6
+
7
+ from pydantic import ConfigDict, Field
8
+
9
+ from overture.schema.common import (
10
+ OvertureFeature,
11
+ )
12
+ from overture.schema.common.cartography import CartographicallyHinted
13
+ from overture.schema.system.geometric import (
14
+ Geometry,
15
+ GeometryType,
16
+ GeometryTypeConstraint,
17
+ )
18
+
19
+ from ._common import Depth
20
+
21
+
22
+ class Bathymetry(
23
+ OvertureFeature[Literal["base"], Literal["bathymetry"]], CartographicallyHinted
24
+ ):
25
+ """
26
+ Bathymetry features provide topographic representations of underwater areas, such as parts of
27
+ lake beds or ocean floors.
28
+ """
29
+
30
+ model_config = ConfigDict(title="bathymetry")
31
+
32
+ # Overture Feature
33
+
34
+ geometry: Annotated[
35
+ Geometry,
36
+ GeometryTypeConstraint(GeometryType.POLYGON, GeometryType.MULTI_POLYGON),
37
+ Field(
38
+ description="Shape of the underwater area, which may be a polygon or multi-polygon."
39
+ ),
40
+ ]
41
+
42
+ # Required
43
+
44
+ depth: Depth
@@ -0,0 +1,265 @@
1
+ """
2
+ The `Infrastructure` feature type model and supporting types.
3
+ """
4
+
5
+ import textwrap
6
+ from enum import Enum
7
+ from typing import Annotated, Literal
8
+
9
+ from pydantic import ConfigDict, Field
10
+
11
+ from overture.schema.base._common import Height, SourcedFromOpenStreetMap
12
+ from overture.schema.common import (
13
+ OvertureFeature,
14
+ )
15
+ from overture.schema.common.level import Stacked
16
+ from overture.schema.common.names import Named
17
+ from overture.schema.system.geometric import (
18
+ Geometry,
19
+ GeometryType,
20
+ GeometryTypeConstraint,
21
+ )
22
+
23
+ from ._common import SurfaceMaterial
24
+
25
+
26
+ class InfrastructureSubtype(str, Enum):
27
+ """
28
+ Broadest classification of the type of infrastructure.
29
+
30
+ This broad classification can be refined by `InfrastructureClass`.
31
+ """
32
+
33
+ AERIALWAY = "aerialway"
34
+ AIRPORT = "airport"
35
+ BARRIER = "barrier"
36
+ BRIDGE = "bridge"
37
+ COMMUNICATION = "communication"
38
+ EMERGENCY = "emergency"
39
+ MANHOLE = "manhole"
40
+ PEDESTRIAN = "pedestrian"
41
+ PIER = "pier"
42
+ POWER = "power"
43
+ QUAY = "quay"
44
+ RECREATION = "recreation"
45
+ TOWER = "tower"
46
+ TRANSIT = "transit"
47
+ TRANSPORTATION = "transportation"
48
+ UTILITY = "utility"
49
+ WASTE_MANAGEMENT = "waste_management"
50
+ WATER = "water"
51
+
52
+
53
+ class InfrastructureClass(str, Enum):
54
+ """
55
+ Further classification of the type of infrastructure.
56
+
57
+ The infrastructure class adds detail to the broad classification of `InfrastructureSubtype`.
58
+ """
59
+
60
+ AERIALWAY_STATION = "aerialway_station"
61
+ AIRPORT = "airport"
62
+ AIRPORT_GATE = "airport_gate"
63
+ AIRSTRIP = "airstrip"
64
+ APRON = "apron"
65
+ AQUEDUCT = "aqueduct"
66
+ ARTWORK = "artwork"
67
+ ATM = "atm"
68
+ BARRIER = "barrier"
69
+ BELL_TOWER = "bell_tower"
70
+ BENCH = "bench"
71
+ BICYCLE_PARKING = "bicycle_parking"
72
+ BICYCLE_RENTAL = "bicycle_rental"
73
+ BLOCK = "block"
74
+ BOARDWALK = "boardwalk"
75
+ BOLLARD = "bollard"
76
+ BORDER_CONTROL = "border_control"
77
+ BREAKWATER = "breakwater"
78
+ BRIDGE = "bridge"
79
+ BRIDGE_SUPPORT = "bridge_support"
80
+ BUMP_GATE = "bump_gate"
81
+ BUS_ROUTE = "bus_route"
82
+ BUS_STATION = "bus_station"
83
+ BUS_STOP = "bus_stop"
84
+ BUS_TRAP = "bus_trap"
85
+ CABLE = "cable"
86
+ CABLE_BARRIER = "cable_barrier"
87
+ CABLE_CAR = "cable_car"
88
+ CABLE_DISTRIBUTION = "cable_distribution"
89
+ CAMP_SITE = "camp_site"
90
+ CANTILEVER = "cantilever"
91
+ CATENARY_MAST = "catenary_mast"
92
+ CATTLE_GRID = "cattle_grid"
93
+ CHAIN = "chain"
94
+ CHAIR_LIFT = "chair_lift"
95
+ CHARGING_STATION = "charging_station"
96
+ CITY_WALL = "city_wall"
97
+ COMMUNICATION_LINE = "communication_line"
98
+ COMMUNICATION_POLE = "communication_pole"
99
+ COMMUNICATION_TOWER = "communication_tower"
100
+ CONNECTION = "connection"
101
+ COOLING = "cooling"
102
+ COVERED = "covered"
103
+ CROSSING = "crossing"
104
+ CUTLINE = "cutline"
105
+ CYCLE_BARRIER = "cycle_barrier"
106
+ DAM = "dam"
107
+ DEFENSIVE = "defensive"
108
+ DITCH = "ditch"
109
+ DIVING = "diving"
110
+ DRAG_LIFT = "drag_lift"
111
+ DRAIN = "drain"
112
+ DRINKING_WATER = "drinking_water"
113
+ ENTRANCE = "entrance"
114
+ FENCE = "fence"
115
+ FERRY_TERMINAL = "ferry_terminal"
116
+ FIRE_HYDRANT = "fire_hydrant"
117
+ FOUNTAIN = "fountain"
118
+ FULL_HEIGHT_TURNSTILE = "full-height_turnstile"
119
+ GASOMETER = "gasometer"
120
+ GATE = "gate"
121
+ GENERATOR = "generator"
122
+ GIVE_WAY = "give_way"
123
+ GONDOLA = "gondola"
124
+ GOODS = "goods"
125
+ GUARD_RAIL = "guard_rail"
126
+ HAMPSHIRE_GATE = "hampshire_gate"
127
+ HANDRAIL = "handrail"
128
+ HEDGE = "hedge"
129
+ HEIGHT_RESTRICTOR = "height_restrictor"
130
+ HELIOSTAT = "heliostat"
131
+ HELIPAD = "helipad"
132
+ HELIPORT = "heliport"
133
+ HOSE = "hose"
134
+ INFORMATION = "information"
135
+ INSULATOR = "insulator"
136
+ INTERNATIONAL_AIRPORT = "international_airport"
137
+ J_BAR = "j-bar"
138
+ JERSEY_BARRIER = "jersey_barrier"
139
+ KERB = "kerb"
140
+ KISSING_GATE = "kissing_gate"
141
+ LAUNCHPAD = "launchpad"
142
+ LIFT_GATE = "lift_gate"
143
+ LIGHTING = "lighting"
144
+ LIGHTNING_PROTECTION = "lightning_protection"
145
+ MAGIC_CARPET = "magic_carpet"
146
+ MANHOLE = "manhole"
147
+ MILESTONE = "milestone"
148
+ MILITARY_AIRPORT = "military_airport"
149
+ MINARET = "minaret"
150
+ MINOR_LINE = "minor_line"
151
+ MIXED_LIFT = "mixed_lift"
152
+ MOBILE_PHONE_TOWER = "mobile_phone_tower"
153
+ MONITORING = "monitoring"
154
+ MOTORCYCLE_PARKING = "motorcycle_parking"
155
+ MOTORWAY_JUNCTION = "motorway_junction"
156
+ MOVABLE = "movable"
157
+ MUNICIPAL_AIRPORT = "municipal_airport"
158
+ OBSERVATION = "observation"
159
+ PARKING = "parking"
160
+ PARKING_ENTRANCE = "parking_entrance"
161
+ PARKING_SPACE = "parking_space"
162
+ PEDESTRIAN_CROSSING = "pedestrian_crossing"
163
+ PICNIC_TABLE = "picnic_table"
164
+ PIER = "pier"
165
+ PIPELINE = "pipeline"
166
+ PLANT = "plant"
167
+ PLANTER = "planter"
168
+ PLATFORM = "platform"
169
+ PLATTER = "platter"
170
+ PORTAL = "portal"
171
+ POST_BOX = "post_box"
172
+ POWER_LINE = "power_line"
173
+ POWER_POLE = "power_pole"
174
+ POWER_TOWER = "power_tower"
175
+ PRIVATE_AIRPORT = "private_airport"
176
+ PYLON = "pylon"
177
+ QUAY = "quay"
178
+ RADAR = "radar"
179
+ RAILWAY_HALT = "railway_halt"
180
+ RAILWAY_STATION = "railway_station"
181
+ RECYCLING = "recycling"
182
+ REGIONAL_AIRPORT = "regional_airport"
183
+ RESERVOIR_COVERED = "reservoir_covered"
184
+ RETAINING_WALL = "retaining_wall"
185
+ ROLLER_COASTER = "roller_coaster"
186
+ ROPE_TOW = "rope_tow"
187
+ RUNWAY = "runway"
188
+ SALLY_PORT = "sally_port"
189
+ SEAPLANE_AIRPORT = "seaplane_airport"
190
+ SEWER = "sewer"
191
+ SILO = "silo"
192
+ SIREN = "siren"
193
+ STILE = "stile"
194
+ STOP = "stop"
195
+ STOP_POSITION = "stop_position"
196
+ STOPWAY = "stopway"
197
+ STORAGE_TANK = "storage_tank"
198
+ STREET_CABINET = "street_cabinet"
199
+ STREET_LAMP = "street_lamp"
200
+ SUBSTATION = "substation"
201
+ SUBWAY_STATION = "subway_station"
202
+ SWING_GATE = "swing_gate"
203
+ SWITCH = "switch"
204
+ T_BAR = "t-bar"
205
+ TAXILANE = "taxilane"
206
+ TAXIWAY = "taxiway"
207
+ TERMINAL = "terminal"
208
+ TOILETS = "toilets"
209
+ TOLL_BOOTH = "toll_booth"
210
+ TRAFFIC_SIGNALS = "traffic_signals"
211
+ TRANSFORMER = "transformer"
212
+ TRESTLE = "trestle"
213
+ UTILITY_POLE = "utility_pole"
214
+ VENDING_MACHINE = "vending_machine"
215
+ VIADUCT = "viaduct"
216
+ VIEWPOINT = "viewpoint"
217
+ WALL = "wall"
218
+ WASTE_BASKET = "waste_basket"
219
+ WASTE_DISPOSAL = "waste_disposal"
220
+ WATCHTOWER = "watchtower"
221
+ WATER_TOWER = "water_tower"
222
+ WEIR = "weir"
223
+ ZIP_LINE = "zip_line"
224
+
225
+
226
+ class Infrastructure(
227
+ OvertureFeature[Literal["base"], Literal["infrastructure"]],
228
+ Named,
229
+ Stacked,
230
+ SourcedFromOpenStreetMap,
231
+ ):
232
+ """
233
+ Infrastructure features provide basic information about real-world infrastructure entities
234
+ such as bridges, airports, runways, aerialways, communication towers, and power lines.
235
+ """
236
+
237
+ model_config = ConfigDict(title="infrastructure")
238
+
239
+ # Overture Feature
240
+
241
+ geometry: Annotated[
242
+ Geometry,
243
+ GeometryTypeConstraint(
244
+ GeometryType.POINT,
245
+ GeometryType.LINE_STRING,
246
+ GeometryType.POLYGON,
247
+ GeometryType.MULTI_POLYGON,
248
+ ),
249
+ Field(
250
+ description=textwrap.dedent("""
251
+ Geometry of the infrastructure feature, which may be a point, line string, polygon, or
252
+ multi-polygon.
253
+ """).strip()
254
+ ),
255
+ ]
256
+
257
+ # Required
258
+
259
+ class_: Annotated[InfrastructureClass, Field(alias="class")]
260
+ subtype: InfrastructureSubtype
261
+
262
+ # Optional
263
+
264
+ height: Height | None = None
265
+ surface: SurfaceMaterial | None = None
@@ -0,0 +1,150 @@
1
+ """
2
+ The `Land` feature type model and supporting types.
3
+ """
4
+
5
+ import textwrap
6
+ from enum import Enum
7
+ from typing import Annotated, Literal
8
+
9
+ from pydantic import ConfigDict, Field
10
+
11
+ from overture.schema.base._common import Elevation, SourcedFromOpenStreetMap
12
+ from overture.schema.common import (
13
+ OvertureFeature,
14
+ )
15
+ from overture.schema.common.level import Stacked
16
+ from overture.schema.common.names import Named
17
+ from overture.schema.system.geometric import (
18
+ Geometry,
19
+ GeometryType,
20
+ GeometryTypeConstraint,
21
+ )
22
+
23
+ from ._common import SurfaceMaterial
24
+
25
+
26
+ class LandSubtype(str, Enum):
27
+ """
28
+ Broadest classification of the land.
29
+
30
+ This broad classification can be refined by `LandClass`.
31
+ """
32
+
33
+ CRATER = "crater"
34
+ DESERT = "desert"
35
+ FOREST = "forest"
36
+ GLACIER = "glacier"
37
+ GRASS = "grass"
38
+ LAND = "land"
39
+ PHYSICAL = "physical"
40
+ REEF = "reef"
41
+ ROCK = "rock"
42
+ SAND = "sand"
43
+ SHRUB = "shrub"
44
+ TREE = "tree"
45
+ WETLAND = "wetland"
46
+
47
+
48
+ class LandClass(str, Enum):
49
+ """
50
+ Further classification of the land.
51
+
52
+ The land class adds detail to the broad classification of `LandSubtype`.
53
+ """
54
+
55
+ ARCHIPELAGO = "archipelago"
56
+ BARE_ROCK = "bare_rock"
57
+ BEACH = "beach"
58
+ CAVE_ENTRANCE = "cave_entrance"
59
+ CLIFF = "cliff"
60
+ DESERT = "desert"
61
+ DUNE = "dune"
62
+ FELL = "fell"
63
+ FOREST = "forest"
64
+ GLACIER = "glacier"
65
+ GRASS = "grass"
66
+ GRASSLAND = "grassland"
67
+ HEATH = "heath"
68
+ HILL = "hill"
69
+ ISLAND = "island"
70
+ ISLET = "islet"
71
+ LAND = "land"
72
+ MEADOW = "meadow"
73
+ METEOR_CRATER = "meteor_crater"
74
+ MOUNTAIN_RANGE = "mountain_range"
75
+ PEAK = "peak"
76
+ PENINSULA = "peninsula"
77
+ PLATEAU = "plateau"
78
+ REEF = "reef"
79
+ RIDGE = "ridge"
80
+ ROCK = "rock"
81
+ SADDLE = "saddle"
82
+ SAND = "sand"
83
+ SCREE = "scree"
84
+ SCRUB = "scrub"
85
+ SHINGLE = "shingle"
86
+ SHRUB = "shrub"
87
+ SHRUBBERY = "shrubbery"
88
+ STONE = "stone"
89
+ TREE = "tree"
90
+ TREE_ROW = "tree_row"
91
+ TUNDRA = "tundra"
92
+ VALLEY = "valley"
93
+ VOLCANIC_CALDERA_RIM = "volcanic_caldera_rim"
94
+ VOLCANO = "volcano"
95
+ WETLAND = "wetland"
96
+ WOOD = "wood"
97
+
98
+
99
+ class Land(
100
+ OvertureFeature[Literal["base"], Literal["land"]],
101
+ Named,
102
+ Stacked,
103
+ SourcedFromOpenStreetMap,
104
+ ):
105
+ """
106
+ Land features are representations of physical land surfaces.
107
+
108
+ In Overture data releases, land features are sourced from OpenStreetMap. TODO. Finish this when
109
+ I get more info from Jennings.
110
+
111
+
112
+
113
+ Physical representations of land surfaces.
114
+
115
+ Global land derived from the inverse of OSM Coastlines. Translates `natural` tags from OpenStreetMap.
116
+
117
+ TODO: Update this description when the relationship to `land_cover` is better understood.
118
+ """
119
+
120
+ model_config = ConfigDict(title="land")
121
+
122
+ # Overture Feature
123
+
124
+ geometry: Annotated[
125
+ Geometry,
126
+ GeometryTypeConstraint(
127
+ GeometryType.POINT,
128
+ GeometryType.LINE_STRING,
129
+ GeometryType.POLYGON,
130
+ GeometryType.MULTI_POLYGON,
131
+ ),
132
+ Field(
133
+ description=textwrap.dedent("""
134
+ Geometry of the land feature, which may be a point, line string, polygon, or
135
+ multi-polygon.
136
+ """).strip()
137
+ ),
138
+ ]
139
+
140
+ # Required
141
+
142
+ class_: Annotated[LandClass, Field(default=LandClass.LAND, alias="class")] = (
143
+ LandClass.LAND
144
+ )
145
+ subtype: Annotated[LandSubtype, Field(default=LandSubtype.LAND)] = LandSubtype.LAND
146
+
147
+ # Optional
148
+
149
+ elevation: Elevation | None = None
150
+ surface: SurfaceMaterial | None = None
@@ -0,0 +1,65 @@
1
+ """
2
+ The `LandCover` feature type model and supporting types.
3
+ """
4
+
5
+ from enum import Enum
6
+ from typing import Annotated, Literal
7
+
8
+ from pydantic import ConfigDict, Field
9
+
10
+ from overture.schema.common import (
11
+ OvertureFeature,
12
+ )
13
+ from overture.schema.common.cartography import CartographicallyHinted
14
+ from overture.schema.system.geometric import (
15
+ Geometry,
16
+ GeometryType,
17
+ GeometryTypeConstraint,
18
+ )
19
+
20
+
21
+ class LandCoverSubtype(str, Enum):
22
+ """Primary or dominant material covering the land."""
23
+
24
+ BARREN = "barren"
25
+ CROP = "crop"
26
+ FOREST = "forest"
27
+ GRASS = "grass"
28
+ MANGROVE = "mangrove"
29
+ MOSS = "moss"
30
+ SHRUB = "shrub"
31
+ SNOW = "snow"
32
+ URBAN = "urban"
33
+ WETLAND = "wetland"
34
+
35
+
36
+ class LandCover(
37
+ OvertureFeature[Literal["base"], Literal["land_cover"]], CartographicallyHinted
38
+ ):
39
+ """
40
+ Land cover features indicate the primary natural or artificial surface material covering a land
41
+ area on the earth, including vegetation types like forests and crops, built environments like
42
+ cities, and natural surfaces like wetlands or barren ground.
43
+
44
+ Land cover features relate to `LandUse` features in the following way: land cover is the
45
+ physical thing covering the land, while land use is the human use to which the land is being
46
+ put.
47
+
48
+ TODO: Explain relationship to `Land` features.
49
+ """
50
+
51
+ model_config = ConfigDict(title="land_cover")
52
+
53
+ # Overture Feature
54
+
55
+ geometry: Annotated[
56
+ Geometry,
57
+ GeometryTypeConstraint(GeometryType.POLYGON, GeometryType.MULTI_POLYGON),
58
+ Field(
59
+ description="Shape of the covered land area, which may be a polygon or multi-polygon."
60
+ ),
61
+ ]
62
+
63
+ # Required
64
+
65
+ subtype: LandCoverSubtype
@@ -0,0 +1,223 @@
1
+ """
2
+ The `LandUse` feature type model and supporting types.
3
+ """
4
+
5
+ import textwrap
6
+ from enum import Enum
7
+ from typing import Annotated, Literal
8
+
9
+ from pydantic import ConfigDict, Field
10
+
11
+ from overture.schema.base._common import Elevation, SourcedFromOpenStreetMap
12
+ from overture.schema.common import (
13
+ OvertureFeature,
14
+ )
15
+ from overture.schema.common.level import Stacked
16
+ from overture.schema.common.names import Named
17
+ from overture.schema.system.geometric import (
18
+ Geometry,
19
+ GeometryType,
20
+ GeometryTypeConstraint,
21
+ )
22
+
23
+ from ._common import SurfaceMaterial
24
+
25
+
26
+ class LandUseSubtype(str, Enum):
27
+ """
28
+ Broadest classification of the land use.
29
+
30
+ This broad classification can be refined by `LandUseClass`.
31
+ """
32
+
33
+ AGRICULTURE = "agriculture"
34
+ AQUACULTURE = "aquaculture"
35
+ CAMPGROUND = "campground"
36
+ CEMETERY = "cemetery"
37
+ CONSTRUCTION = "construction"
38
+ DEVELOPED = "developed"
39
+ EDUCATION = "education"
40
+ ENTERTAINMENT = "entertainment"
41
+ GOLF = "golf"
42
+ GRASS = "grass"
43
+ HORTICULTURE = "horticulture"
44
+ LANDFILL = "landfill"
45
+ MANAGED = "managed"
46
+ MEDICAL = "medical"
47
+ MILITARY = "military"
48
+ PARK = "park"
49
+ PEDESTRIAN = "pedestrian"
50
+ PROTECTED = "protected"
51
+ RECREATION = "recreation"
52
+ RELIGIOUS = "religious"
53
+ RESIDENTIAL = "residential"
54
+ RESOURCE_EXTRACTION = "resource_extraction"
55
+ TRANSPORTATION = "transportation"
56
+ WINTER_SPORTS = "winter_sports"
57
+
58
+
59
+ class LandUseClass(str, Enum):
60
+ """
61
+ Further classification of the land use.
62
+
63
+ The land use class adds detail to the broad classification of `LandUseSubtype`.
64
+ """
65
+
66
+ ABORIGINAL_LAND = "aboriginal_land"
67
+ AIRFIELD = "airfield"
68
+ ALLOTMENTS = "allotments"
69
+ ANIMAL_KEEPING = "animal_keeping"
70
+ AQUACULTURE = "aquaculture"
71
+ BARRACKS = "barracks"
72
+ BASE = "base"
73
+ BEACH_RESORT = "beach_resort"
74
+ BROWNFIELD = "brownfield"
75
+ BUNKER = "bunker"
76
+ CAMP_SITE = "camp_site"
77
+ CEMETERY = "cemetery"
78
+ CLINIC = "clinic"
79
+ COLLEGE = "college"
80
+ COMMERCIAL = "commercial"
81
+ CONNECTION = "connection"
82
+ CONSTRUCTION = "construction"
83
+ DANGER_AREA = "danger_area"
84
+ DOCTORS = "doctors"
85
+ DOG_PARK = "dog_park"
86
+ DOWNHILL = "downhill"
87
+ DRIVING_RANGE = "driving_range"
88
+ DRIVING_SCHOOL = "driving_school"
89
+ EDUCATION = "education"
90
+ ENVIRONMENTAL = "environmental"
91
+ FAIRWAY = "fairway"
92
+ FARMLAND = "farmland"
93
+ FARMYARD = "farmyard"
94
+ FATBIKE = "fatbike"
95
+ FLOWERBED = "flowerbed"
96
+ FOREST = "forest"
97
+ GARAGES = "garages"
98
+ GARDEN = "garden"
99
+ GOLF_COURSE = "golf_course"
100
+ GRASS = "grass"
101
+ GRAVE_YARD = "grave_yard"
102
+ GREEN = "green"
103
+ GREENFIELD = "greenfield"
104
+ GREENHOUSE_HORTICULTURE = "greenhouse_horticulture"
105
+ HIGHWAY = "highway"
106
+ HIKE = "hike"
107
+ HOSPITAL = "hospital"
108
+ ICE_SKATE = "ice_skate"
109
+ INDUSTRIAL = "industrial"
110
+ INSTITUTIONAL = "institutional"
111
+ KINDERGARTEN = "kindergarten"
112
+ LANDFILL = "landfill"
113
+ LATERAL_WATER_HAZARD = "lateral_water_hazard"
114
+ LOGGING = "logging"
115
+ MARINA = "marina"
116
+ MEADOW = "meadow"
117
+ MILITARY = "military"
118
+ MILITARY_HOSPITAL = "military_hospital"
119
+ MILITARY_SCHOOL = "military_school"
120
+ MUSIC_SCHOOL = "music_school"
121
+ NATIONAL_PARK = "national_park"
122
+ NATURAL_MONUMENT = "natural_monument"
123
+ NATURE_RESERVE = "nature_reserve"
124
+ NAVAL_BASE = "naval_base"
125
+ NORDIC = "nordic"
126
+ NUCLEAR_EXPLOSION_SITE = "nuclear_explosion_site"
127
+ OBSTACLE_COURSE = "obstacle_course"
128
+ ORCHARD = "orchard"
129
+ PARK = "park"
130
+ PEAT_CUTTING = "peat_cutting"
131
+ PEDESTRIAN = "pedestrian"
132
+ PITCH = "pitch"
133
+ PLANT_NURSERY = "plant_nursery"
134
+ PLAYGROUND = "playground"
135
+ PLAZA = "plaza"
136
+ PROTECTED = "protected"
137
+ PROTECTED_LANDSCAPE_SEASCAPE = "protected_landscape_seascape"
138
+ QUARRY = "quarry"
139
+ RAILWAY = "railway"
140
+ RANGE = "range"
141
+ RECREATION_GROUND = "recreation_ground"
142
+ RELIGIOUS = "religious"
143
+ RESIDENTIAL = "residential"
144
+ RESORT = "resort"
145
+ RETAIL = "retail"
146
+ ROUGH = "rough"
147
+ SALT_POND = "salt_pond"
148
+ SCHOOL = "school"
149
+ SCHOOLYARD = "schoolyard"
150
+ SKI_JUMP = "ski_jump"
151
+ SKITOUR = "skitour"
152
+ SLED = "sled"
153
+ SLEIGH = "sleigh"
154
+ SNOW_PARK = "snow_park"
155
+ SPECIES_MANAGEMENT_AREA = "species_management_area"
156
+ STADIUM = "stadium"
157
+ STATE_PARK = "state_park"
158
+ STATIC_CARAVAN = "static_caravan"
159
+ STRICT_NATURE_RESERVE = "strict_nature_reserve"
160
+ TEE = "tee"
161
+ THEME_PARK = "theme_park"
162
+ TRACK = "track"
163
+ TRAFFIC_ISLAND = "traffic_island"
164
+ TRAINING_AREA = "training_area"
165
+ TRENCH = "trench"
166
+ UNIVERSITY = "university"
167
+ VILLAGE_GREEN = "village_green"
168
+ VINEYARD = "vineyard"
169
+ WATER_HAZARD = "water_hazard"
170
+ WATER_PARK = "water_park"
171
+ WILDERNESS_AREA = "wilderness_area"
172
+ WINTER_SPORTS = "winter_sports"
173
+ WORKS = "works"
174
+ ZOO = "zoo"
175
+
176
+
177
+ class LandUse(
178
+ OvertureFeature[Literal["base"], Literal["land_use"]],
179
+ Named,
180
+ Stacked,
181
+ SourcedFromOpenStreetMap,
182
+ ):
183
+ """
184
+ Land use features specify the predominant human use of an area of land, for example commercial
185
+ activity, recreation, farming, housing, education, or military use.
186
+
187
+ Land use features relate to `LandCover` features in the following way: land use is the human
188
+ activity being done with the land, while land cover is the physical thing that covers it.
189
+
190
+ TODO: Explain relationship to `Land` features.
191
+ """
192
+
193
+ model_config = ConfigDict(title="land_use")
194
+
195
+ # Core
196
+
197
+ geometry: Annotated[
198
+ Geometry,
199
+ GeometryTypeConstraint(
200
+ GeometryType.POINT,
201
+ GeometryType.LINE_STRING,
202
+ GeometryType.POLYGON,
203
+ GeometryType.MULTI_POLYGON,
204
+ ),
205
+ Field(
206
+ description=textwrap.dedent(
207
+ """
208
+ Geometry of the land use area, which may be a point, line string, polygon, or
209
+ multi-polygon.
210
+ """
211
+ ).strip(),
212
+ ),
213
+ ]
214
+
215
+ # Required
216
+
217
+ class_: Annotated[LandUseClass, Field(alias="class")]
218
+ subtype: LandUseSubtype
219
+
220
+ # Optional
221
+
222
+ elevation: Elevation | None = None
223
+ surface: SurfaceMaterial | None = None
File without changes
@@ -0,0 +1,167 @@
1
+ """Water feature models for Overture Maps base theme."""
2
+
3
+ import textwrap
4
+ from enum import Enum
5
+ from typing import Annotated, Literal
6
+
7
+ from pydantic import ConfigDict, Field
8
+
9
+ from overture.schema.base._common import SourcedFromOpenStreetMap
10
+ from overture.schema.common import (
11
+ OvertureFeature,
12
+ )
13
+ from overture.schema.common.level import Stacked
14
+ from overture.schema.common.names import Named
15
+ from overture.schema.system.geometric import (
16
+ Geometry,
17
+ GeometryType,
18
+ GeometryTypeConstraint,
19
+ )
20
+
21
+
22
+ class WaterSubtype(str, Enum):
23
+ """
24
+ The broad classification of water body such as river, ocean or lake.
25
+
26
+ This broad classification can be refined using `WaterClass`.
27
+ """
28
+
29
+ CANAL = "canal"
30
+ HUMAN_MADE = "human_made"
31
+ LAKE = "lake"
32
+ OCEAN = "ocean"
33
+ PHYSICAL = "physical"
34
+ POND = "pond"
35
+ RESERVOIR = "reservoir"
36
+ RIVER = "river"
37
+ SPRING = "spring"
38
+ STREAM = "stream"
39
+ WASTEWATER = "wastewater"
40
+ WATER = "water"
41
+
42
+
43
+ class WaterClass(str, Enum):
44
+ """
45
+ Further description of the type of water body.
46
+
47
+ The water class adds detail to the broad classification of `WaterSubtype`.
48
+ """
49
+
50
+ BASIN = "basin"
51
+ BAY = "bay"
52
+ BLOWHOLE = "blowhole"
53
+ CANAL = "canal"
54
+ CAPE = "cape"
55
+ DITCH = "ditch"
56
+ DOCK = "dock"
57
+ DRAIN = "drain"
58
+ FAIRWAY = "fairway"
59
+ FISH_PASS = "fish_pass"
60
+ FISHPOND = "fishpond"
61
+ GEYSER = "geyser"
62
+ HOT_SPRING = "hot_spring"
63
+ LAGOON = "lagoon"
64
+ LAKE = "lake"
65
+ MOAT = "moat"
66
+ OCEAN = "ocean"
67
+ OXBOW = "oxbow"
68
+ POND = "pond"
69
+ REFLECTING_POOL = "reflecting_pool"
70
+ RESERVOIR = "reservoir"
71
+ RIVER = "river"
72
+ SALT_POND = "salt_pond"
73
+ SEA = "sea"
74
+ SEWAGE = "sewage"
75
+ SHOAL = "shoal"
76
+ SPRING = "spring"
77
+ STRAIT = "strait"
78
+ STREAM = "stream"
79
+ SWIMMING_POOL = "swimming_pool"
80
+ TIDAL_CHANNEL = "tidal_channel"
81
+ WASTEWATER = "wastewater"
82
+ WATER = "water"
83
+ WATER_STORAGE = "water_storage"
84
+ WATERFALL = "waterfall"
85
+
86
+
87
+ class Water(
88
+ OvertureFeature[Literal["base"], Literal["water"]],
89
+ Stacked,
90
+ Named,
91
+ SourcedFromOpenStreetMap,
92
+ ):
93
+ """
94
+ Water features represent ocean and inland water bodies.
95
+
96
+ In Overture data releases, water features are sourced from OpenStreetMap. There are two main
97
+ categories of water feature: ocean and inland water bodies.
98
+
99
+ Ocean
100
+ -----
101
+ The `subytpe` value `"ocean"` indicates an ocean area feature whose geometry represents the
102
+ surface area of an ocean or part of an ocean. Ocean area may be tiled into many small polygons
103
+ of consistent complexity to ensure manageable geometry. In Overture data releases, ocean area
104
+ features are created from OpenStreetMap coastlines data (`natural=coastline`) using a QA'd
105
+ version of the output from the OSMCoastline tool. In aggregate, all the ocean area features
106
+ represent the inverse of the land features with subtype `"land"` and class `"land"`.
107
+
108
+ The names and recommended label position for oceans and seas can be found in features with the
109
+ subtype `"physical"` and the class `"ocean"` or `"sea"`.
110
+
111
+ Inland Water
112
+ ------------
113
+ Subtypes other than `"ocean"` (and `"physical"`) represent inland water bodies. In Overture data
114
+ releases, these features are sourced from the OpenStreetMap tag `natural=*` where the tag value
115
+ indicates a water body, as well as the tags `natural=water`, `waterway=*`,
116
+ and `water=*`.
117
+ """
118
+
119
+ model_config = ConfigDict(title="water")
120
+
121
+ # Overture Feature
122
+
123
+ geometry: Annotated[
124
+ Geometry,
125
+ GeometryTypeConstraint(
126
+ GeometryType.POINT,
127
+ GeometryType.LINE_STRING,
128
+ GeometryType.POLYGON,
129
+ GeometryType.MULTI_POLYGON,
130
+ ),
131
+ Field(
132
+ description=textwrap.dedent("""
133
+ Geometry of the water feature, which may be a point, line string, polygon, or
134
+ multi-polygon.
135
+ """).strip()
136
+ ),
137
+ ]
138
+
139
+ # Required
140
+
141
+ class_: Annotated[
142
+ WaterClass,
143
+ Field(
144
+ default=WaterClass.WATER,
145
+ alias="class",
146
+ ),
147
+ ] = WaterClass.WATER
148
+ subtype: Annotated[
149
+ WaterSubtype,
150
+ Field(
151
+ default=WaterSubtype.WATER,
152
+ ),
153
+ ] = WaterSubtype.WATER
154
+
155
+ # Optional
156
+
157
+ is_intermittent: Annotated[
158
+ bool | None,
159
+ Field(
160
+ description="Whether the water body exists intermittently, not permanently",
161
+ strict=True,
162
+ ),
163
+ ] = None
164
+ is_salt: Annotated[
165
+ bool | None,
166
+ Field(description="Whether the water body contains salt water", strict=True),
167
+ ] = None
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: overture-schema-theme-base
3
+ Version: 0.1.1.dev0
4
+ Summary: Overture Maps base theme shared structures and models (bathymetry, infrastructure, land, land_cover, land_use, water)
5
+ License-Expression: MIT
6
+ Requires-Dist: overture-schema-common>=0.1.1
7
+ Requires-Dist: overture-schema-system>=0.1.1
8
+ Requires-Dist: pydantic>=2.13.0
9
+ Maintainer: Overture Maps Schema Working Group
10
+ Requires-Python: >=3.10
11
+ Project-URL: Homepage, https://overturemaps.org
12
+ Project-URL: Source, https://github.com/OvertureMaps/schema
13
+ Project-URL: Issues, https://github.com/OvertureMaps/schema/issues
14
+ Description-Content-Type: text/markdown
15
+
16
+ # Overture Schema Base Theme
17
+
18
+ Shared structures and validation logic for Overture Maps' base theme.
19
+ Contains common surface materials, validation utilities, and foundational patterns.
@@ -0,0 +1,13 @@
1
+ overture/schema/base/__init__.py,sha256=14W_41sF8rgANy_Lkqpdp3H2t-BkrACUAG28QOUAaHo,1031
2
+ overture/schema/base/_common.py,sha256=TFBqAPyUQP4xvX9EX87RBmsb_23hDO20q2ANk5sR6Sw,2158
3
+ overture/schema/base/bathymetry.py,sha256=IYREZai1rpf1V9pSYyTyy4f2t6N5EOK8ejDfnTOWGks,1029
4
+ overture/schema/base/infrastructure.py,sha256=FzqLYgyXQESIZXT7VO2o6oYUYLVA1xNpNeKnWau1Vko,7417
5
+ overture/schema/base/land.py,sha256=DJbmR1AlvjeSHZjsXnI5yqBRP3V_48t8bsTvPLTsuQo,3565
6
+ overture/schema/base/land_cover.py,sha256=HB2rGOHpBe40hrYjL4zUTEhHy3Sein3kuCjkGPp9Qa0,1726
7
+ overture/schema/base/land_use.py,sha256=A_1jSpdU8k_c5UL8x-Wo9JCRpB25_ras434A0lpvo34,6161
8
+ overture/schema/base/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ overture/schema/base/water.py,sha256=aWODVhpzBazn4d5bWgTDf5Jfgl5Ma2IEV9yp096z0ss,4643
10
+ overture_schema_theme_base-0.1.1.dev0.dist-info/WHEEL,sha256=Lkz__M3n3EKWmzMwHnFILNW2SHO43bOxmbqnBjwb--4,80
11
+ overture_schema_theme_base-0.1.1.dev0.dist-info/entry_points.txt,sha256=wF4G9-zzS8BrqUKI8LSX87BJ9yE55JtGTikyaBcuBvU,340
12
+ overture_schema_theme_base-0.1.1.dev0.dist-info/METADATA,sha256=om4_ZrY_IWS5eWYF9_ABxAM5P0hrH7BA7KF9MnYrqn8,819
13
+ overture_schema_theme_base-0.1.1.dev0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.12.6
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,11 @@
1
+ [overture.models]
2
+ bathymetry = overture.schema.base:Bathymetry
3
+ infrastructure = overture.schema.base:Infrastructure
4
+ land = overture.schema.base:Land
5
+ land_cover = overture.schema.base:LandCover
6
+ land_use = overture.schema.base:LandUse
7
+ water = overture.schema.base:Water
8
+
9
+ [pytest11]
10
+ overture_baselines = overture.schema.system.testing.plugin
11
+