validate¶
- geodetic_engine.projdb.validate(database, *, authorities, imported=None)[source]¶
Check that a built database is sound and that PROJ can read every object.
- Parameters:
database (
Path) – Path to the enriched proj.db.authorities (
Iterable[str]) – Custom authority names whose objects should be checked.imported (
Iterable[tuple[str,str,str]] |None, default:None) – The objects this build actually added, as(table, auth_name, code)triples. When given, only these are constructed. A build that imports objects under an established authority such as EPSG would otherwise be judged on the whole of that authority’s stock content, and the EPSG dataset PROJ ships with contains a handful of operations PROJ itself cannot build.
- Return type:
- Returns:
A summary for the build report – how many CRSs and operations were constructed, and every grid the imported operations reference with whether PROJ can currently find it.
- Raises:
ProjDbBuildError – If the file is corrupt, has dangling references, or contains an object PROJ cannot construct.
Example
>>> validate(Path("build/proj.db"), authorities=["Example"]) {'crs_checked': 195, 'operations_checked': 191, 'grids': [...]}