This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KDP-1528 initial implementation of the EDR spec
- Loading branch information
1 parent
4071bde
commit 1850ca0
Showing
2 changed files
with
43 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from __future__ import annotations | ||
|
||
from typing import List | ||
from typing import Optional | ||
|
||
from .data_queries import DataQueries | ||
from .extent import Extent | ||
from .link import Link | ||
from .my_base_model import EDRBaseModel | ||
from .parameter import ParameterNames | ||
|
||
|
||
# TODO instances or collections as base? | ||
class Collection(EDRBaseModel): | ||
links: List[Link] | ||
id: str | ||
extent: Extent | ||
parameter_names: ParameterNames | ||
title: Optional[str] = None | ||
description: Optional[str] = None | ||
keywords: Optional[List[str]] = None | ||
data_queries: Optional[DataQueries] = None | ||
# TODO required according to A.13, string array or crs object? | ||
crs: Optional[List[str]] = None | ||
# TODO in req as f? | ||
output_formats: Optional[List[str]] = None | ||
# TODO may have distanceunits, if radius is in link, it shall have distanceunits | ||
distanceunits: Optional[List[str]] = None | ||
|
||
|
||
class CollectionsModel(EDRBaseModel): | ||
links: List[Link] | ||
collections: List[Collection] | ||
|
||
|
||
class InstancesModel(EDRBaseModel): | ||
links: List[Link] | ||
instances: List[Instance] | ||
|
||
|
||
# For now, the instance metadata corresponds to the first collection metadata. So they have equal classes | ||
class Instance(Collection): | ||
pass |
This file was deleted.
Oops, something went wrong.