remove redundant conditional in reading geopackages
@@ -360,9 +360,6 @@ class FeatureIOGeoDf(FeatureIO[gpd.GeoDataFrame]):
@_try_unpickling
def _read_from_file(self, file: Union[BinaryIO, gzip.GzipFile], path: str) -> gpd.GeoDataFrame:
- file_format = MimeType(fs.path.splitext(path)[1].strip("."))
-
- if file_format is MimeType.GPKG:
dataframe = gpd.read_file(file)
if dataframe.crs is not None:
@@ -379,8 +376,6 @@ class FeatureIOGeoDf(FeatureIO[gpd.GeoDataFrame]):
return dataframe
- raise ValueError(f"Path {self.path} leads to a non-GPKG file, which is not supported.")
-
def _write_to_file(self, data: gpd.GeoDataFrame, file: Union[BinaryIO, gzip.GzipFile]) -> None:
layer = fs.path.basename(self.path)
try:
