Skip to content

Commit

Permalink
troublesome crs matching, works on some versions of rasterio, best to…
Browse files Browse the repository at this point in the history
… just to do string object comparison (#592)
  • Loading branch information
bw4sz authored Dec 27, 2023
1 parent 7467527 commit ee9ee5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepforest/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def shapefile_to_annotations(shapefile,
raster_crs = src.crs

# Check matching the crs
if not gdf.crs == raster_crs:
if not gdf.crs.to_string() == raster_crs.to_string():
raise ValueError("The shapefile crs {} does not match the image crs {}".format(
gdf.crs, src.crs))

Expand Down

0 comments on commit ee9ee5d

Please sign in to comment.