geofileops.has_spatial_index#

geofileops.has_spatial_index(path: Union[str, PathLike[Any]], layer: Optional[str] = None, no_geom_ok: bool = False) bool#

Check if the layer/column has a spatial index.

Parameters:
  • path (PathLike) – The file path.

  • layer (str, optional) – The layer. Defaults to None.

  • no_geom_ok (bool, options) – If True and the file doesn’t have a geometry column, don’t throw an error. Defaults to False.

Raises:

ValueError – an invalid parameter value was passed.

Returns:

True if a spatial index exists, False if it doesn’t exist.

Return type:

bool