geowatch.rc.registry module¶
A registry of resource files bundled with the geowatch package
Schemas are from * https://smartgitlab.com/TE/aristeas/-/tree/main/src/aristeas/schemas * https://smartgitlab.com/TE/standards * https://smartgitlab.com/TE/standards/-/snippets/18
Previous: * https://smartgitlab.com/infrastructure/docs/-/tree/main/pages/schemas * commit fe4343521d05e433d4ccfcf080d9bcf46c9d2e83
Geoidgrid is from * https://smartgitlab.com/TE/annotations/-/wikis/WorldView-Annotations#notes-on-the-egm96-geoidgrid-file
- SeeAlso:
../geoannots/geomodels.py https://github.com/ResonantGeoData/RD-WATCH/blob/main/django/src/rdwatch/schemas/site_model.py
- geowatch.rc.registry.load_site_model_schema(strict=True)[source]¶
- Parameters:
strict (bool) – if True we make a few changes the schema to be more permissive towards things like region names and originator.
Example
>>> from geowatch.rc.registry import * # NOQA >>> data1 = load_site_model_schema(strict=True) >>> data2 = load_site_model_schema(strict=False) >>> import rich >>> rich.print('data = {}'.format(ub.urepr(data1, nl=-2))) >>> rich.print('data = {}'.format(ub.urepr(data2, nl=-2))) >>> import jsonschema >>> cls = jsonschema.validators.validator_for(data1) >>> cls.check_schema(data1) >>> cls = jsonschema.validators.validator_for(data2) >>> cls.check_schema(data2)
- geowatch.rc.registry.load_region_model_schema(strict=True)[source]¶
- Parameters:
strict (bool) – if True we make a few changes the schema to be more permissive towards things like region names and originator.
- Returns:
the schema
- Return type:
Dict
CommandLine
xdoctest -m geowatch.rc.registry load_region_model_schema
Example
>>> from geowatch.rc.registry import * # NOQA >>> data1 = load_region_model_schema(strict=True) >>> data2 = load_region_model_schema(strict=False) >>> import rich >>> rich.print('data = {}'.format(ub.urepr(data1, nl=-2))) >>> rich.print('data = {}'.format(ub.urepr(data2, nl=-2))) >>> import jsonschema >>> cls = jsonschema.validators.validator_for(data1) >>> cls.check_schema(data1) >>> cls = jsonschema.validators.validator_for(data2) >>> cls.check_schema(data2)