sertit / eoreader

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and spectral indices in a sensor-agnostic way.
https://eoreader.readthedocs.io/en/latest/
Apache License 2.0
271 stars 22 forks source link

How to set os.environ[DEM_PATH] correctly? #61

Closed TK12331 closed 1 year ago

TK12331 commented 1 year ago

In FAQ I read

11

if I want to use the default setting as the DEM of SNAP, how can I find the specific path?

remi-braun commented 1 year ago

If you want to use i.e. COPDEM-30, just type:

import os
from eoreader.env_vars import SNAP_DEM_NAME
os.environ[SNAP_DEM_NAME] = "Copernicus 30m Global DEM"

The env_var can be found here

But I just saw that the default is not GETASSE30 anymore (it was when COPDEM-30 wasn't existing or was buggy). I will change that 😄

Note that the piece of code here above won't change your result, as COPDEM-30 is SNAP's default DEM.

remi-braun commented 1 year ago

I updated the documentation of SAR notebook to add a paragraph about your question 😉

TK12331 commented 1 year ago

Thanks for your quick response! Howerever, now there are new problems occur... First, there are some bool values of band_names returned from s1_prod.has_band(band) are True, while they don't exist in get_existing_bands() image

Second, I check the output file and there are only two tif files image which causes the code s1_prod.load(ok_bands, resolution=20.) to fail.

remi-braun commented 1 year ago

To load DEM-related bands, you need to provide a DEM on your own as specified here. (I cannot use SNAP DEMs as the software downloads the tiles on the spot...)

You may have more information about that in the DEM notebook.

TLDR:

remi-braun commented 1 year ago

However, your current bug seems to come from another source, could you create another issue with full log trace ?

TK12331 commented 1 year ago

OK, I create a new one right now.