geofileops.LayerInfo#
- class geofileops.LayerInfo(name: str, featurecount: int, total_bounds: Tuple[float, float, float, float], geometrycolumn: str, geometrytypename: str, geometrytype: GeometryType, columns: Dict[str, ColumnInfo], fid_column: str, crs: Optional[CRS], errors: List[str])#
A data object containing meta-information about a layer.
- name#
the name of the layer.
- Type:
str
- featurecount#
the number of features (rows) in the layer.
- Type:
int
- total_bounds#
the bounding box of the layer: (minx, miny, maxx, maxy).
- Type:
Tuple[float, float, float, float]
- geometrycolumn#
name of the column that contains the primary geometry.
- Type:
str
- geometrytypename#
the geometry type name of the geometrycolumn. The type name returned is one of the following: POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, COLLECTION.
- Type:
str
- geometrytype#
the geometry type of the geometrycolumn.
- Type:
GeometryType
- columns#
the columns (other than the geometry column) that are available on the layer with their properties as a dict.
- Type:
dict
- fid_column#
column name of the FID column. Is “” for file types that don’t explicitly store an FID, like shapefile.
- Type:
str
- crs#
the spatial reference of the layer.
- Type:
pyproj.CRS
- errors#
list of errors in the layer, eg. invalid column names,…
- Type:
List[str]
- __init__(name: str, featurecount: int, total_bounds: Tuple[float, float, float, float], geometrycolumn: str, geometrytypename: str, geometrytype: GeometryType, columns: Dict[str, ColumnInfo], fid_column: str, crs: Optional[CRS], errors: List[str])#
Constructor of Layerinfo.
- Parameters:
name (str) – name of the layer.
featurecount (int) – number of features in the layer.
total_bounds (Tuple[float, float, float, float]) – the bounds of the layer.
geometrycolumn (str) – the name of the geometry column.
geometrytypename (str) – the name of the geometry column type.
geometrytype (GeometryType) – the type of the geometry column.
columns (Dict[str, ColumnInfo]) – the attribute columns of the layer.
fid_column (str) – the name of the fid column.
crs (Optional[pyproj.CRS]) – the crs of the layer.
errors (List[str]) – errors encountered reading the layer info.
Methods
__init__
(name, featurecount, total_bounds, ...)Constructor of Layerinfo.