Skip to content

Commit

Permalink
Merge pull request #27 from senthilkumar-dimitra/main
Browse files Browse the repository at this point in the history
Fix: correct variable names in CRS comparison within `extract` function
  • Loading branch information
yotarazona authored Jul 24, 2024
2 parents 985282f + d0ff240 commit aa127a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scikeo/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit aa127a3

Please sign in to comment.