Skip to content

Commit

Permalink
schema: v17.4, CRSless maps
Browse files Browse the repository at this point in the history
Issue: #237
Issue: #300
  • Loading branch information
alex4401 committed Jul 21, 2024
1 parent 1c19900 commit 5ca860f
Show file tree
Hide file tree
Showing 3 changed files with 2,150 additions and 3 deletions.
4 changes: 3 additions & 1 deletion includes/Content/SchemaRevision.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ final class SchemaRevision {
public const REV_17_1 = 'v17.1';
public const REV_17_2 = 'v17.2';
public const REV_17_3 = 'v17.3';
public const REV_17_4 = 'v17.4';

public const SUPPORTED_REVISIONS = [
self::REV_17_0,
self::REV_17_1,
self::REV_17_2,
self::REV_17_3,
self::REV_17_4,
];
public const DEPRECATED_REVISIONS = [
// schema revision => extension version to be removed in
];
public const RECOMMENDED_REVISION = self::REV_17_3;
public const RECOMMENDED_REVISION = self::REV_17_4;
}
18 changes: 16 additions & 2 deletions schemas/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,17 @@ class NamedPoint(BaseModelEx):


##% Structs
class CoordinateSystem(BaseModelEx):
class CoordinateSettings(BaseModelEx):
origin: Literal['topLeft', 'bottomLeft'] = Field(
'topLeft',
)
order: Literal['yx', 'latlon', 'xy'] = Field(
'yx',
)
rotation: Optional[float] = Field(
None,
)
class LEGACY_CoordinateSystem(BaseModelEx):
order: Literal['yx', 'latlon', 'xy'] = Field(
'yx',
)
Expand Down Expand Up @@ -358,7 +368,11 @@ class DataMap(BaseModelEx):
None,
description='List of fragments that must be imported.'
)
crs: CoordinateSystem | Box = Field(
if REV >= 17.4:
coordinates: CoordinateSettings = Field(
CoordinateSettings(),
)
crs: LEGACY_CoordinateSystem | Box = Field(
((0, 0), (100, 100)),
)
settings: Optional[Settings] = Field(
Expand Down
Loading

0 comments on commit 5ca860f

Please sign in to comment.