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

tutorial #1

Open
Joaquin-Urruti opened this issue Feb 9, 2023 · 7 comments
Open

tutorial #1

Joaquin-Urruti opened this issue Feb 9, 2023 · 7 comments

Comments

@Joaquin-Urruti
Copy link

Hi! I'm not an advanced user of python so don't know how to use the package. I tryed to detrend a raster but couldn't do it. Could you give me some help on how to call the function once I installed the package?

@ArcticSnow
Copy link
Owner

ArcticSnow commented Feb 10, 2023

Hi @Joaquin-Urruti ,

So you wanna first open the raster with the function openGeoTiff(). It will return the 2D array. You use this one on the function detrend() which will detrend the raster.

detrend() returns a numpy 2D array. So then you need to save a new raster using the same geotransform as the original one. For that you can use: saveArray2RasterTiff()

@Joaquin-Urruti
Copy link
Author

Hi @ArcticSnow!

Thanks for the answer.

I'm trying to install the lib like I show in the pic but can't access the methods of rasterTool. I'm a bit lost sorry

imagen

@Joaquin-Urruti
Copy link
Author

I also tryed like this:
imagen

@ArcticSnow
Copy link
Owner

try

from dempy import rasterTool as rt

rt.openGeoTiff(file)

@Joaquin-Urruti
Copy link
Author

thank you Simon. I wasn't able to install on macos, I had some problem with open-cv

@Joaquin-Urruti
Copy link
Author

I installed in a new anaconda env in windows but couldn't make it work either.
I think there are several dependency problems in the package, I tryed to fix it but I couldn't...

@ArcticSnow
Copy link
Owner

I have had many issues of compatibilities between gdal and opencv. A trick I think I had was to install gdal with conda and opencv with pip. It is an ad-hoc solution. Both library are very useful but sadly not easily compatible.
Good luck

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