-
Notifications
You must be signed in to change notification settings - Fork 4
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
JSON output refactor #33
Conversation
david-i-berry
commented
Dec 22, 2024
- Major update (incl. breaking changes) to align with wccdm-obs data model.
- Better handling of code and flag table entries.
- Individual geojsons yielded rather than all for one subset, this should see improved memory usage for BUFR messages with a large number of elements (e.g. TEMP).
bug fix for single subset.
- Fix for broken DAYCLI sequence and phenomenonTime. - First order statistic appended to observed property when present.
…bservation results are post-processed, the resultTime is the post-processing time, while the phenomenonTime is the time of initial interaction with the world.")
…paths. (dim image also used in w2b where b2g may be run).
} | ||
} | ||
}, | ||
"Geometry": { |
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.
Strongly suggest $ref
'ing GeoJSON geometry from https://geojson.org/schema/Geometry.json
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.
Automatically loading remote references is deprecated in the jsonschema package. More work is required to support this using the referencing package. Suggest raising an issue to update in the future.
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 I would suggest having a build step that dereferences the schema on release to PyPI.
Or if the schema is relatively stable, I would manage this manually (something like https://github.com/wmo-im/wcmp2/blob/main/schemas/README.md)
bufr2geojson/__init__.py
Outdated
# next decoded value if from code table | ||
description = None | ||
if attributes["units"] == "CODE TABLE": | ||
observation_type = "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement" # noqa default type | ||
if (attributes["units"] == "CODE TABLE") and (value is not None): |
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.
if attributes["units"] == "CODE TABLE" and value is not None:
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.
done
bufr2geojson/__init__.py
Outdated
data = { | ||
"geojson": { | ||
"id": feature_id, | ||
"conformsTo": ["https://schemas.wmo.int/wccdm-obs/2024/wccdm-obs.json"], # noqa |
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.
This should be a conformance URI, not a schema.
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.
corrected
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 there a documented specification for WCCDM with requirements and conformance classes?
In theory, conformsTo
should express conformance to 1..n conformance classes. So for example:
http://wis.wmo.int/spec/wccdm-obs/1/conf/core
...would express conformance to WCCDM Observations, Conformance Class "Core".