dicogis.models.metadataset module

Metadaset models.

class dicogis.models.metadataset.MetaDatabaseFlat(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', layers=None)

Bases: MetaDataset

Database table abstraction model.

__init__(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', layers=None)
property count_layers: int | None

Calculate the total number of layers.

Returns:

total number of layers or None if no layers listed

Return type:

int | None

property cumulated_count_feature_attributes: int | None

Calculate the total number of attribute fields of every layer.

Returns:

total number of attribute fields or None if no layers listed

Return type:

int | None

property cumulated_count_feature_objects: int | None

Calculate the total number of feature objects of every layer.

Returns:

total number of feature objects or None if no layers listed

Return type:

int | None

layers: list[MetaVectorDataset] | None = None
class dicogis.models.metadataset.MetaDatabaseTable(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', feature_attributes=None, features_objects_count=0, geometry_type=None, database_connection=None, schema_name='public')

Bases: MetaVectorDataset

Database table abstraction model.

__init__(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', feature_attributes=None, features_objects_count=0, geometry_type=None, database_connection=None, schema_name='public')
database_connection: DatabaseConnection | None = None
schema_name: str = 'public'
class dicogis.models.metadataset.MetaDataset(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='')

Bases: object

Dataset abstraction model.

__init__(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='')
property as_markdown_description: str

Concatenate some informations as a markdown description.

Returns:

markdown description of the metadataset

bbox: tuple[float] | None = None
crs_name: str | None = None
crs_registry: str = 'EPSG'
crs_registry_code: str | None = None
crs_type: str | None = None
dataset_type: Optional[Literal['flat_cad', 'flat_database', 'flat_database_esri', 'flat_raster', 'flat_vector', 'sgbd_postgis']] = None
envelope: tuple[float] | None = None
files_dependencies: list[Path] | None = None
format_gdal_long_name: str | None = None
format_gdal_short_name: str | None = None
is_3d: bool = False
name: str | None = None
parent_folder_name: str | None = None
path: Path | None = None
property path_as_str: str | None

Helper to have an universal path resolver independent of source type.

Returns:

path or connection uri (without password)

Return type:

str | None

processing_error_msg: str | None = ''
processing_error_type: str | None = ''
processing_succeeded: bool | None = None
signature(hashable_attributes=('bands_count', 'crs_name', 'crs_type', 'dataset_type', 'envelope', 'features_objects_count', 'feature_attributes', 'format_gdal_long_name', 'geometry_type', 'name', 'path_as_str', 'schema_name', 'storage_type'))

Calculate a hash cumulating certain attributes values.

hashable_attributes: object attributes to include in hash.

Return type:

str

property slug: str

Concatenate some attributes to build a slug.

Returns:

slugified metadataset name and other attributes

storage_date_created: datetime | None = None
storage_date_updated: datetime | None = None
storage_size: int | None = None
storage_type: str | None = None
class dicogis.models.metadataset.MetaRasterDataset(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', bands_count=None, data_type=None, columns_count=None, rows_count=None, pixel_height=None, pixel_width=None, origin_x=None, origin_y=None, orientation=None, color_space=None, compression_rate=None)

Bases: MetaDataset

Raster dataset abstraction model.

__init__(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', bands_count=None, data_type=None, columns_count=None, rows_count=None, pixel_height=None, pixel_width=None, origin_x=None, origin_y=None, orientation=None, color_space=None, compression_rate=None)
property as_markdown_image_metadata: str

Return raster metadata as a Markdown table.

Returns:

string containing markdown table

bands_count: int | None = None
color_space: str | None = None
columns_count: int | None = None
compression_rate: int | None = None
data_type: str | None = None
orientation: float | None = None
origin_x: float | None = None
origin_y: float | None = None
pixel_height: int | None = None
pixel_width: int | None = None
rows_count: int | None = None
class dicogis.models.metadataset.MetaVectorDataset(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', feature_attributes=None, features_objects_count=0, geometry_type=None)

Bases: MetaDataset

Vector dataset abstraction model.

__init__(name=None, path=None, parent_folder_name=None, dataset_type=None, format_gdal_long_name=None, format_gdal_short_name=None, files_dependencies=None, storage_date_created=None, storage_date_updated=None, storage_size=None, storage_type=None, bbox=None, envelope=None, crs_name=None, crs_registry='EPSG', crs_registry_code=None, crs_type=None, is_3d=False, processing_succeeded=None, processing_error_msg='', processing_error_type='', feature_attributes=None, features_objects_count=0, geometry_type=None)
property as_markdown_feature_attributes: str

Return feature attributes as a Markdown table.

Returns:

string containing markdown table

property count_feature_attributes: int | None

Return the length of ‘feature_attributes’ attribute.

Returns:

number of attribute fields related to the layer or None if no feature atttributes listed

Return type:

int | None

feature_attributes: list[AttributeField] | None = None
features_objects_count: int = 0
geometry_type: str | None = None