HyDAMO

HyDAMO(
    self,
    version='2.2',
    schemas_path=SCHEMAS_DIR,
    ignored_layers=['afvoeraanvoergebied', 'imwa_geoobject', 'leggerwatersysteem', 'leggerwaterveiligheid', 'waterbeheergebied'],
)

Definition of the HyDAMO datamodel.

Methods

Name Description
from_geopackage Initialize HyDAMO class from GeoPackage
get Get a DataFrame row (feature) providing a layer an global_id.
init_datamodel Initialize DataModel from self.schemas_path.
set_data Set data to a HyDAMO object-layer.
to_geopackage Write HyDAMO object to a GeoPackage.

from_geopackage

HyDAMO.from_geopackage(
    file_path,
    version='2.2',
    check_columns=True,
    check_geotype=True,
)

Initialize HyDAMO class from GeoPackage

Parameters

Name Type Description Default
file_path path - string Path-string to the hydamo GeoPackage required
check_columns bool Check if all required columns are present in the GeoDataFrame. The default is True. True
check_geotype bool Check if the geometry is of the required type. The default is True. True

Returns

Name Type Description
hydamo HyDAMO HyDAMO object initialized with content of GeoPackage

get

HyDAMO.get(layer, global_id)

Get a DataFrame row (feature) providing a layer an global_id.

Parameters

Name Type Description Default
layer str DESCRIPTION. required
global_id str DESCRIPTION. required

Returns

Name Type Description
TYPE DESCRIPTION.

init_datamodel

HyDAMO.init_datamodel()

Initialize DataModel from self.schemas_path.

set_data

HyDAMO.set_data(
    gdf,
    layer,
    index_col=None,
    check_columns=True,
    check_geotype=True,
    extra_values={},
)

Set data to a HyDAMO object-layer.

Parameters

Name Type Description Default
gdf GeoDataFrame GeoDataFrame with a HyDAMO object-layer required
layer TYPE HyDAMO layer to be set required
index_col str Column to be used as index. The default is None. None
check_columns bool Check if all required columns are present in the GeoDataFrame. The default is True. True
check_geotype bool Check if the geometry is of the required type. The default is True. True

Returns

Name Type Description
None.

to_geopackage

HyDAMO.to_geopackage(file_path, use_schema=True)

Write HyDAMO object to a GeoPackage.

Parameters

Name Type Description Default
file_path path - string Path-string where the file should be written to required
use_schema bool Use the schema to specify column-properties The default is True. True

Returns

Name Type Description
None.