From d0ff2401fa9f8e0e621c4ae9c1d3accab394f34a Mon Sep 17 00:00:00 2001 From: senthilkumar-dimitra Date: Wed, 24 Jul 2024 18:31:20 +0530 Subject: [PATCH] fix: correct variable names in CRS comparison within extract function --- scikeo/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scikeo/process.py b/scikeo/process.py index 6516856..06c00b4 100644 --- a/scikeo/process.py +++ b/scikeo/process.py @@ -135,8 +135,8 @@ def extract(image, vector): if not isinstance(vector, (gpd.geodataframe.GeoDataFrame)): raise TypeError('"vector" must be a vector, tipically a Shapefile (.shp)') - if not img.crs == endm.crs: - raise TypeError(f'Coordinate systems of both the "image" ({img.crs}) and the "vector" ({endm.crs}) must be the same.') + if not image.crs == vector.crs: + raise TypeError(f'Coordinate systems of both the "image" ({image.crs}) and the "vector" ({vector.crs}) must be the same.') if not vector.geom_type[0] == 'Point': raise TypeError('"Vector" file must have a Point geometry.')