OsduCatalog¶
- class geodetic_engine.osdudb.OsduCatalog[source]¶
Bases:
objectAn indexed OSDU manifest.
CRSs and coordinate operations are indexed separately. Their code spaces overlap in principle, and resolving a bound CRS’s source CRS against an operation of the same code would silently produce a different object.
Example
>>> catalog = OsduCatalog.from_file(Path("CRS_CT.json")) >>> len(list(catalog.records(BOUND_CRS))) 1276
- classmethod from_file(path)[source]¶
Read and index a manifest.
- Parameters:
path (
Path) – The manifest file.- Return type:
- Returns:
The indexed catalogue.
- Raises:
OsduCatalogError – If the file is unreadable, is not JSON, or has no
ReferenceDataarray.
- classmethod from_document(document, *, path=None)[source]¶
Index an already parsed manifest.
- Parameters:
- Return type:
- Returns:
The catalogue, indexed by authority and code.
- Raises:
OsduCatalogError – If the document has no
ReferenceDataarray.