reVX.handlers.geopackage.GPKGMeta

class GPKGMeta(filename)[source]

Bases: object

Extract meta info about underlying GeoPackage SQL tables.

Parameters:

filename (path-like) – Path to input GeoPackage.

Methods

feat_ids_for_bbox(bbox)

Find the ID's of the features within the input bounding box.

Attributes

bbox

MIN_X, MIN_Y, MAX_X, MAX_Y values for GeoPackage.

crs

Coordinate Reference System for GeoPackage.

feat_ids

All the feature ID's in the GeoPackage.

geom_table_suffix

Name of the geometry table suffix.

num_feats

Number of feature rows.

primary_key_column

Name of the primary key column in the user data table.

primary_table

Name of table containing user data.

srs_id

Spatial reference system ID (4326, 3857, etc.)

property primary_table

Name of table containing user data.

Type:

str

property srs_id

Spatial reference system ID (4326, 3857, etc.)

Type:

int

property crs

Coordinate Reference System for GeoPackage.

Type:

pyproj.crs.CRS

property bbox

MIN_X, MIN_Y, MAX_X, MAX_Y values for GeoPackage.

Type:

tuple

property primary_key_column

Name of the primary key column in the user data table.

Type:

str

property geom_table_suffix

Name of the geometry table suffix.

Type:

str

property num_feats

Number of feature rows.

Type:

int

property feat_ids

All the feature ID’s in the GeoPackage.

Type:

tuple

feat_ids_for_bbox(bbox)[source]

Find the ID’s of the features within the input bounding box.

Parameters:

bbox (list | tuple | iterable) – Container with four int/float values describing the bounding box. The values should be in the following order: MIN_X, MIN_Y, MAX_X, MAX_Y

Returns:

ids (tuple) – Tuple of all the feature IDs within the given input bounding box.