Skip to content

Commit a921cb5

Browse files
sethfitzvcschapp
authored andcommitted
Widen cartography and score types
Cartography types (Prominence, MinZoom, MaxZoom, SortKey) from uint8 to int32; ConfidenceScore from float32 to float64. Matches actual data ranges in Overture releases.
1 parent 08d012f commit a921cb5

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

packages/overture-schema-base-theme/tests/bathymetry_baseline_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
},
2828
"sort_key": {
2929
"description": "Integer indicating the recommended order in which to draw features.\n\nFeatures with a lower number should be drawn \"in front\" of features with a higher\nnumber.",
30-
"maximum": 255,
31-
"minimum": 0,
30+
"maximum": 2147483647,
31+
"minimum": -2147483648,
3232
"title": "Sort Key",
3333
"type": "integer"
3434
}

packages/overture-schema-base-theme/tests/land_cover_baseline_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
},
2828
"sort_key": {
2929
"description": "Integer indicating the recommended order in which to draw features.\n\nFeatures with a lower number should be drawn \"in front\" of features with a higher\nnumber.",
30-
"maximum": 255,
31-
"minimum": 0,
30+
"maximum": 2147483647,
31+
"minimum": -2147483648,
3232
"title": "Sort Key",
3333
"type": "integer"
3434
}

packages/overture-schema-core/src/overture/schema/core/cartography.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from pydantic import BaseModel, Field
99

1010
from overture.schema.system.model_constraint import no_extra_fields
11-
from overture.schema.system.primitive import uint8
11+
from overture.schema.system.primitive import int32
1212

1313
Prominence = NewType(
1414
"Prominence",
1515
Annotated[
16-
uint8,
16+
int32,
1717
Field(
1818
ge=1,
1919
le=100,
@@ -34,7 +34,7 @@
3434
MinZoom = NewType(
3535
"MinZoom",
3636
Annotated[
37-
uint8,
37+
int32,
3838
Field(
3939
ge=0,
4040
le=23,
@@ -55,7 +55,7 @@
5555
MaxZoom = NewType(
5656
"MaxZoom",
5757
Annotated[
58-
uint8,
58+
int32,
5959
Field(
6060
ge=0,
6161
le=23,
@@ -76,7 +76,7 @@
7676
SortKey = NewType(
7777
"SortKey",
7878
Annotated[
79-
uint8,
79+
int32,
8080
Field(
8181
description=textwrap.dedent("""
8282
Integer indicating the recommended order in which to draw features.

packages/overture-schema-core/src/overture/schema/core/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
Field,
55
)
66

7-
from overture.schema.system.primitive import float32, int32
7+
from overture.schema.system.primitive import float64, int32
88

99
ConfidenceScore = NewType(
1010
"ConfidenceScore",
1111
Annotated[
12-
float32,
12+
float64,
1313
Field(description="Confidence score between 0.0 and 1.0", ge=0.0, le=1.0),
1414
],
1515
)

packages/overture-schema-divisions-theme/tests/division_baseline_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
},
5050
"sort_key": {
5151
"description": "Integer indicating the recommended order in which to draw features.\n\nFeatures with a lower number should be drawn \"in front\" of features with a higher\nnumber.",
52-
"maximum": 255,
53-
"minimum": 0,
52+
"maximum": 2147483647,
53+
"minimum": -2147483648,
5454
"title": "Sort Key",
5555
"type": "integer"
5656
}

0 commit comments

Comments
 (0)