export_persistable_references_from_catalog¶
- geodetic_engine.persistablereference.export_persistable_references_from_catalog(destination, *, format='json', pretty=False, wkt=False, values=None, entity=None, kinds=None, authorities=None, include_deprecated=True, database=None)[source]¶
Write recorded persistableReferences to a file.
Each entry carries the reference and what is recorded about it: the record id, the object, the kind, the stated authority code, the version, the digest and the source. The reference is the verbatim string unless
prettyis given.With
valuesthe named objects are written, in that order, each entry under aquerykey as well. An object with no reference still gets an entry, withpersistable_referencenull and areason, so a missing reference shows up in the file rather than as a gap.- Parameters:
destination (
Path|IO[str]) – A path, or a text stream to write to.format (
ExportFormat, default:"json") –"json", a document holding a list of entries;"jsonl", one compact entry per line; or"csv".pretty (
bool, default:False) – JSON only: give each reference as its decoded object, so the document reads naturally.wkt (
bool, default:False) – JSON only: also lay each embedded ESRI WKT out over indented lines. The file is then for reading and is not JSON.values (
Sequence[str] |None, default:None) – Export these objects, named aspersistable_reference_from_catalog()takes them, rather than every reference recorded.entity (
Entity|None, default:None) – Only CRSs, or only operations.kinds (
Iterable[Kind|str] |None, default:None) – Only references stating these kinds. Not withvalues.authorities (
Iterable[str] |None, default:None) – Only objects of these authorities. Not withvalues.include_deprecated (
bool, default:True) – Include inactive records. Not withvalues.database (
Path|None, default:None) – The proj.db to read; the first on PROJ’s data path by default.
- Return type:
- Returns:
How many references were written, not counting entries for objects that have none.
- Raises:
ValueError – If
prettyorwktis given for JSONL or CSV, a filter is given withvalues, or a value is neither an OSDU id nor"AUTH:CODE".