-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edr feature collection #7
Changes from all commits
6d046ef
3ecee58
0a961b2
90ce008
8a3b259
6032d5d
bc770e4
234e02c
c2ffcbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from typing import Dict | ||
from typing import Optional | ||
|
||
from covjson_pydantic.parameter import Parameter # type: ignore | ||
from edr_pydantic.base_model import EdrBaseModel | ||
from geojson_pydantic import FeatureCollection # type: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because mypy is not able to find the stubs for the external packages. I would have to look into it, but I think that there are two possible fixes:
|
||
|
||
|
||
class EDRFeatureCollection(EdrBaseModel, FeatureCollection): | ||
parameters: Optional[Dict[str, Parameter]] = None |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ | ||
5.1797, | ||
52.0989, | ||
1.9 | ||
] | ||
}, | ||
"properties": { | ||
"name": "DE BILT AWS", | ||
"parameter-name": [ | ||
"air_temperature_1.5_maximum_PT10M", | ||
"dew_point_temperature_1.5_mean_PT1M", | ||
"duration_of_sunshine_2.0_point_PT0S", | ||
"wind_speed_10_mean_PT10M" | ||
] | ||
}, | ||
"id": "06260" | ||
} | ||
], | ||
"parameters": { | ||
"tx_dryb_10": { | ||
"type": "Parameter", | ||
"description": { | ||
"en": "Temperature, air, maximum, 10" | ||
}, | ||
"observedProperty": { | ||
"id": "https://vocab.nerc.ac.uk/standard_name/air_temperature", | ||
"label": { | ||
"en": "Air temperature maximum" | ||
} | ||
}, | ||
"unit": { | ||
"label": { | ||
"en": "degree Celsius" | ||
}, | ||
"symbol": { | ||
"value": "°C", | ||
"type": "http://www.opengis.net/def/uom/UCUM/" | ||
} | ||
} | ||
}, | ||
"t_dewp_10": { | ||
"type": "Parameter", | ||
"description": { | ||
"en": "Temperature air dewpoint 10" | ||
}, | ||
"observedProperty": { | ||
"id": "https://vocab.nerc.ac.uk/standard_name/dew_point_temperature", | ||
"label": { | ||
"en": "Dew Point Temperature" | ||
} | ||
}, | ||
"unit": { | ||
"label": { | ||
"en": "degree Celsius" | ||
}, | ||
"symbol": { | ||
"value": "°C", | ||
"type": "http://www.opengis.net/def/uom/UCUM/" | ||
} | ||
} | ||
}, | ||
"sq_10": { | ||
"type": "Parameter", | ||
"description": { | ||
"en": "Sunshine duration, duration derived from radiation, 10" | ||
}, | ||
"observedProperty": { | ||
"id": "https://vocab.nerc.ac.uk/standard_name/duration_of_sunshine", | ||
"label": { | ||
"en": "Sunshine duration" | ||
} | ||
}, | ||
"unit": { | ||
"label": { | ||
"en": "minute" | ||
}, | ||
"symbol": { | ||
"value": "min", | ||
"type": "http://www.opengis.net/def/uom/UCUM/" | ||
} | ||
} | ||
}, | ||
"ff_10m_10": { | ||
"type": "Parameter", | ||
"description": { | ||
"en": "Wind, speed, average, converted to 10 metres, 10" | ||
}, | ||
"observedProperty": { | ||
"id": "https://vocab.nerc.ac.uk/standard_name/wind_speed", | ||
"label": { | ||
"en": "wind_speed_10_mean_PT10M" | ||
} | ||
}, | ||
"unit": { | ||
"label": { | ||
"en": "metre per second" | ||
}, | ||
"symbol": { | ||
"value": "m/s", | ||
"type": "http://www.opengis.net/def/uom/UCUM/" | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, when upgrading you can still use the FeatureCollection of geojson-pydantic. It is not mandatory to use the model or implement the parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why bump minor version?