OsduBuildConfig

class geodetic_engine.osdudb.OsduBuildConfig[source]

Bases: object

Resolved configuration for one proj.db build from an OSDU catalogue.

catalog

The OSDU manifest file, holding ReferenceData records of kind CoordinateReferenceSystem and CoordinateTransformation.

authorities

Code spaces whose objects are imported. Only rows whose auth_name is in this set may be written to the database. Defaults to {"OSDU"}; adding "EPSG" also imports the EPSG objects the catalogue carries that the base proj.db’s EPSG dataset does not yet define.

output_db

Path the enriched database is written to.

base_proj_db

Official proj.db used as the starting point.

naming_systems

Naming systems whose aliases are imported. Defaults to authorities; ["*"] imports every naming system.

include_deprecated

Import records flagged with InactiveIndicator, marked deprecated in the database. Enabled by default so a caller can answer “this code is deprecated” rather than “unknown code”.

unsupported_method_codes

EPSG method codes to skip.

authority_preference

How the imported authorities enter operation selection.

fallback_authorities

Authorities listed after the imported ones in every generated preference row.

append

Add to the database already at output_db instead of starting from a fresh copy of base_proj_db, so this catalogue can extend a database another source already built. Has no effect when the output does not exist yet. Disabled by default: a build that silently added to whatever happened to be at the output path could not be reproduced from its configuration alone.

replace

Publish over an output database built by authorities this build does not import, discarding it. Disabled by default, so running one source after another cannot silently drop the other’s import. Not read from the config file: discarding a built database is a decision for the run that does it.

overwrite_rows

Replace a row this build collides with rather than aborting. Reaches only the configured authorities, since the per-row authority guard runs first and every object table is keyed on (auth_name, code). Disabled by default, so a collision is a reported failure rather than a definition that changed underneath whoever was already using it.

catalog_version

Optional catalogue version to record in the report.

source_file

The config file the settings were read from, if any.

__init__(catalog, authorities=frozenset({'OSDU'}), output_db=PosixPath('build/proj.db'), base_proj_db=<factory>, naming_systems=frozenset({}), include_deprecated=True, unsupported_method_codes=frozenset({1044, 1108}), authority_preference=AuthorityPreference.CUSTOM_FIRST, fallback_authorities=('PROJ', 'EPSG'), append=False, replace=False, overwrite_rows=False, catalog_version=None, source_file=None)