-
Notifications
You must be signed in to change notification settings - Fork 42
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
DEM not array like in example scripts #360
Comments
Hi @LeaHartl, This is due to recent changes in GeoUtils, which have been fixed in xDEM: #341. The reason it does not work for you: I'll open an issue for us to start creating different branches for the documentation, so that |
Issue moved to #361. |
@LeaHartl: new releases of xDEM ( P.S: are you still at the GI?! (those TV in the entrance make me know people's name without ever having seen them). I'm a guest in WRRB 😉 |
@rhugonnet awesome, thank you. I am going to get a lot of usage out of xdem and the documentation is fantastic too. I am still/again employed at the GI but working remotely from europe. my employment situation is a little messy, reminds me of how my raster processing code was before I found xdem ;) |
@rhugonnet I now updated to xdem 0.0.9 and geoutils 0.0.12 and the import statement fails for both xdem and geoutils with "AttributeError: type object 'GeoSeries' has no attribute 'normalize'" Any ideas? |
Hi @LeaHartl, |
@adehecq yes that did it, THANK YOU! |
Perfect! A good rule to know: if the build is passing on the GitHub page (https://github.com/GlacioHack/xdem), there's a 99% chance that the package will work correctly by re-installing the environment from scratch: The 1% is if a package that we depend on (GeoPandas for example) pushed a release since our build ran its tests, and this release introduces a bug. It is quite rare but it happens, and is generally solved within a couple days by the package. |
Opening an issue to force |
fyi, I also had to update shapely from 1.8 to 2.0.x for some of the geoutils functionalities to work after I switched to xdem 0.0.9 and gu 0.0.12. this seems like a "me" problem because I am working in a weird older environment due to some other dependencies, just mentioning it to let you know. |
Hello, I am having issues running some of the example scripts and getting error messages related to "DEM" objects not being array like. The problems go away if I change the scripts to use DEM.data rather than DEM. For example, in plot_standardization.py line 41 throws an error ('DEM' object is not subscriptable) as:
dh_arr = dh[~mask_glacier].filled(np.nan)
but works like this:
dh_arr = dh.data[~mask_glacier].filled(np.nan)
Similarly, plot_nuth_kaab.py complains in line 39 (ValueError: Both DEMs need to be array-like (implement a numpy array interface)) with:
nuth_kaab.fit(reference_dem, dem_to_be_aligned, inlier_mask)
but this works:
nuth_kaab.fit(reference_dem.data, dem_to_be_aligned.data, inlier_mask, transform=reference_dem.transform)
There are also some more 'DEM' object is not subscriptable errors in plot_nuth_kaab.py
Is this some kind of version problem on my end, or has the DEM class been changed?
The text was updated successfully, but these errors were encountered: