Skip to content

Commit 5e41bfb

Browse files
authored
Merge pull request #39 from crim-ca/extent-temporal
fix extent temporal interval
2 parents a3d3f7d + ccabebe commit 5e41bfb

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

pydggsapi/schemas/ogc_collections/extent.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
from __future__ import annotations
2-
from typing import List, Optional, Union
2+
from typing import List, Optional, Tuple
33
from pydantic import BaseModel, Field, model_validator, conlist
44
from fastapi.exceptions import HTTPException
55

66

77
class Spatial(BaseModel):
88
bbox: List[List[float]]
99
storageCrsBbox: Optional[List[float]] = None
10-
crs: Optional[List[str]] = Field(
11-
['http://www.opengis.net/def/crs/OGC/1.3/CRS84'],
10+
crs: Optional[str] = Field(
11+
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
1212
description='the list of coordinate reference systems supported by the API; the first item is the default coordinate reference system',
13-
example=[
13+
examples=[
1414
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
1515
'http://www.opengis.net/def/crs/EPSG/0/4326',
1616
],
@@ -27,17 +27,18 @@ def validation(self):
2727

2828

2929
class Temporal(BaseModel):
30-
interval: Optional[conlist(str, min_length=1, max_length=2)] = None
31-
crs: Optional[List[str]] = Field(
32-
[''],
30+
interval: Optional[conlist(
31+
Tuple[Optional[str], Optional[str]],
32+
min_length=1,
33+
)] = None
34+
trs: Optional[str] = Field(
35+
'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian',
3336
description="""Coordinate reference system of the coordinates in the temporal extent
3437
(property interval). The default reference system is the Gregorian calendar.
3538
For data for which the Gregorian calendar is not suitable, such as geological time scale,
3639
another temporal reference system may be used""",
37-
example=[
40+
examples=[
3841
'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian'
3942
],
4043
)
4144
grid: Optional[str] = ''
42-
43-

0 commit comments

Comments
 (0)