-
Notifications
You must be signed in to change notification settings - Fork 15
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
weightmap (pixel_overlaps) warnings and errors #24
Comments
Hi Kerrie, thanks for the post. First of all, I'm glad to hear that you were able to install Second of all, that's odd to hear. The first warning I've run into a few times, and though worrying, I don't think it's affected the final calculation (though it would be good if I would double check). The error is new to me, however. This may be a silly question, but does the AVHRR NDVI data happen to have a variable called 'geometry' or 'polygon' or something like that? Could you link to the datafile you were using (or attach a subset version that still reproduces the error)? Thanks! |
So really I'm using Ubuntu WSL2 on my window's 10 machine (I enabled WSL2 subsystem linux with Ubuntu- there are various instructions on the web). I installed xagg using conda from the conda-forge channel. So nothing different from how I would install any other packages. The AVHRR NDVI data does not have any variables named geometry or polygon. It does have a variable named crs, but I tested out rewriting the data file without the crs variable and it didn't solve the problem. The data file (~60MB) I've been troubleshooting with can be downloaded here: https://www.ncei.noaa.gov/data/avhrr-land-normalized-difference-vegetation-index/access/1981/AVHRR-Land_v005_AVH13C1_NOAA-07_19810625_c20170610042839.nc. The shp file I'm using is us_county_mex_munis.zip. Thanks for the help! |
Ah, fair! Just to double-check, you said the error was also happening in Also, this is a good reminder too (for me) to work through a few pending performance upgrades - that takes a while with the high resolution data you're working with 😅 |
This should be now fixed through #39 , and the new update (only a few years late,...) |
Closed by #39 , upcoming in v0.3.1 |
Hi, thanks for the helpful package.
On a Windows machine, I'm using the package successfully on ERA5 reanalysis data although I do get a user warning when calling pixel_overlaps. It occurs after the output "calculating overlaps between pixels and output polygons...". The warning is:
"/home/kgeil/miniconda3/envs/xagg/lib/python3.9/site-packages/xagg/core.py:308: UserWarning:
keep_geom_type=True
in overlay resulted in 1 dropped geometries of different geometry types than df1 has. Setkeep_geom_type=False
to retain all geometries overlaps = gpd.overlay(gdf_in.to_crs(epsg_set),'When I try generating a weight map with the exact same shapefile but on AVHRR NDVI data instead I get a full error at the same-ish location:
"ValueError: GeoDataFrame does not support setting the geometry column where the column name is shared by multiple columns."
It looks like something is going wrong in get_pixel_overlaps around line 323 overlap_info...
I've tried rewriting the NDVI netcdf to be as identical as possible as the ERA5 file (same coord and dim names, etc) and both files are epsg:4326.
Any ideas how to get past this error?
The text was updated successfully, but these errors were encountered: