geofileops.get_layerinfo#

geofileops.get_layerinfo(path: Union[str, PathLike[Any]], layer: Optional[str] = None, raise_on_nogeom: bool = True) LayerInfo#

Get information about a layer in the geofile.

Raises ValueError if the layer definition has errors like invalid column names,…

Parameters:
  • path (PathLike) – path to the file to get info about

  • layer (str, optional) – the layer you want info about. Doesn’t need to be specified if there is only one layer in the geofile.

  • raise_on_nogeom (bool, optional) – True to raise if the layer doesn’t have a geometry column. If False, the returned LayerInfo.geometrycolumn will be None. Defaults to True.

Returns:

the information about the layer.

Return type:

LayerInfo