Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to process certain GeoTIFFs #163

Open
kasra-keshavarz opened this issue Jan 20, 2025 · 3 comments
Open

Not able to process certain GeoTIFFs #163

kasra-keshavarz opened this issue Jan 20, 2025 · 3 comments

Comments

@kasra-keshavarz
Copy link

kasra-keshavarz commented Jan 20, 2025

Problem

The problem is that for this specific raster, I cannot extract zonal statistics. I am not sure where the problem is, but included an MCVE. Let me know if you need more information.

MCVE

Here is a reproducible MCVE (using the data.zip file attached here):

wget https://github.com/user-attachments/files/18482547/data.zip
unzip data.zip
exactextract --polygons ./data/polygons/bcalgary_subbasins.shp --raster ./data/raster/nalcms_2020_landcover.tif --stat frac --fid COMID --output=fraction_landcover.csv --progress # results in an empty output
exactextract --polygons ./data/polygons/bcalgary_subbasins.shp --raster ./data/raster/nalcms_2020_landcover.tif --stat mean --fid COMID --output=mean_landcover.csv --progress # just a test - results in `nan` values

exactextrac version

$ ./exactextract 
Zonal statistics using exactextract: version 0.3.0-dev (d33bb54)
... 

Attachements:

data.zip

@kasra-keshavarz
Copy link
Author

Forgot to mention that equivalent commands work well in exactextractr.

@dbaston
Copy link
Member

dbaston commented Jan 21, 2025

The command-line interface does not check the CRS of its inputs. At a minimum, it should check the CRS of the inputs and produce a warning if they don't match. Some related discussion in #108

@dbaston
Copy link
Member

dbaston commented Jan 21, 2025

Warning added in f312a11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants