-
Notifications
You must be signed in to change notification settings - Fork 115
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
Grid Shape & Multiple TIF #161
Comments
I would loop over the climate tifs and run zonal stats on each:
You would be left with a
From here, how you process this data is entirely up to your application. |
I think i have something wrong with packages: FutureWarning: The value of this property will change in version 1.0. Please see rasterio/rasterio#86 for details. FutureWarning: GDAL-style transforms are deprecated and will not be supported in Rasterio 1.0. UserWarning: Setting nodata to -999; specify nodata explicitly Im getting results. However, im getting different values that the ones i could get using qgis on some (not all) grids . |
The transforms warnings should not cause any problems, it's a known issue for future releases #64 The user warning re: nodata indicates that you may need to set nodata explicitly.
Can't help you unless you provide more information. First thing to check is making sure you're set the nodata correctly. Please open a new issue if you can find and reproduce a bug. |
It was a double check but different are not sensible at this stage. Nodat set now is ok. I will check how to include on rasters tuple all the files in my directory (up to 10k) and how to export results to a csv. Thanks! |
Done. IS there any way to get the code more efficient? import os, glob polys = r'C:\Users\mvarela3\Documents\CHIRPS\Python\GRIDBSAS.shp' rasterfolder = r'C:\Users\mvarela3\Documents\CHIRPS\img\Global' results = {} for lyr in glob.glob("*.tif") : with open('my_file.csv', 'w') as f: |
First at all, many thanks on sharing all this work.
I´m new on Python and maybe i want to run before walk.
I´m running the script orienting to climate data, where I have a Shape with around 500 equal squares and 30 years daily data of rainfall (tif files for each day around 11k .tif).
I need as an output a table with the rainfall value for each day for each grid.
How to deal with this?
Thanks
The text was updated successfully, but these errors were encountered: