geofileops.get_only_layer#

geofileops.get_only_layer(path: Union[str, PathLike[Any]]) str#

Get the layername for a file that only contains one layer.

If the file contains multiple layers, an exception is thrown.

Parameters:

path (PathLike) – the file.

Raises:

ValueError – an invalid parameter value was passed.

Returns:

the layer name

Return type:

str