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

Are we using the correct DEM ? #552

Open
falkamelung opened this issue Sep 7, 2024 · 5 comments
Open

Are we using the correct DEM ? #552

falkamelung opened this issue Sep 7, 2024 · 5 comments

Comments

@falkamelung
Copy link
Member

falkamelung commented Sep 7, 2024

Summary: the DEM created using the sardem code (Copernicus DEM) has elevation referenced to the geoid. In the past we used dem.py which produced a DEM with elevation referenced to the ellipsoid. I thought that this what we need to use, but the sardem DEM makes me wonder. Alternatively, there could be a problem with our sardem/gdal installation. sardem uses the local gdal installation (PROJ_LIB) for height conversion. I previously got errors regarding PROJ_LIB which somehow I made disappear. I have not yet been able to test independently that our gdal installation works. Actually some tests proposal by copilot rather suggest that it does not work, which would be the explanation.

In the past we did:

dem.py -a stitch --filling --filling_value 0 -b 25 26 -81 -80 -c -u https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11/

It created two DEMs, which are shown below. We always used the *dem.wgs84 file where sea level gets negative.

demLat_N25_N26_Lon_W081_W080.dem
demLat_N25_N26_Lon_W081_W080.dem.wgs84
image image

Here the sardem command:

sardem --bbox -81 25 -80 26 --data COP --make-isce-xml

It does not produce and negative elevations which surprises me.

image
@yunjunz
Copy link
Contributor

yunjunz commented Sep 9, 2024

sardem converts to ellipsoid as well.

@falkamelung
Copy link
Member Author

Hi @yunjunz , that is what it says, but in my example above it does not. There is no difference whether I use the --keep-egm option or not. Can you just run the sardem command above and tell me whether you get the same result or negative elevations as I would expect? I either have an PROJ_LIB installation problem or sardem has a bug.

@yunjunz
Copy link
Contributor

yunjunz commented Sep 19, 2024

Here is what I have with sardem --bbox -81 25 -80 26 --data COP --make-isce-xml. The --make-isce-xml option will ensure the output DEM is converted to the ellipsoid.

Screenshot 2024-09-19 at 10 53 20

@falkamelung
Copy link
Member Author

Thank you. That looks different to what I have. So I really have an installation problem with PROJ_LIB.

@falkamelung
Copy link
Member Author

I am not sure there is a problem. Maybe it was just temporary. I am now getting the same DEM using dem.py and sardem:

image

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