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

DEM download takes a long time #55

Closed
jlmaurer opened this issue Jun 24, 2020 · 8 comments
Closed

DEM download takes a long time #55

jlmaurer opened this issue Jun 24, 2020 · 8 comments
Assignees

Comments

@jlmaurer
Copy link
Collaborator

The DEM download can take the longest to run of the whole code.

Starting line in RAiDER/tools/RAiDER/demdownload.py:

memRaster = '/vsimem/warpedDEM'

Description

DEM download takes a long time. Not sure why this is happening; but could be that passing boundaries as a warp option is not as fast as cropping a VRT?

Relevant code

_world_dem = ('https://cloud.sdsc.edu/v1/AUTH_opentopography/Raster/'
              'SRTM_GL1_Ellip/SRTM_GL1_Ellip_srtm.vrt')
inRaster ='/vsicurl/{}'.format(_world_dem)
memRaster = '/vsimem/warpedDEM'
wrpOpt = gdal.WarpOptions(outputBounds = (minlon, minlat,maxlon, maxlat))
gdal.Warp(memRaster, inRaster, options = wrpOpt)
out = RAiDER.utilFcns.gdal_open(memRaster)
@dbekaert
Copy link
Owner

@sssangha can you provide some insight from ARIA-tools experience?
Might first generate a cropped vrt and then do a warp in mem on the cropped vrt?
Recall @bbuzz31 had some similar issue for the nlc map.

@bbuzz31
Copy link
Collaborator

bbuzz31 commented Jun 27, 2020

I would recommend replacing the gdal.Warp command (and wrpOpt) with:
gdal.BuildVRT(memRaster, inRaster, outputBounds=[minlon, minlat, maxlon, maxlat])
This seems to increase the access speed, but when the array is read in utilFcns.gdal_open() it will still take awhile for a large region.

@dbekaert
Copy link
Owner

dbekaert commented Jun 27, 2020 via email

@jlmaurer
Copy link
Collaborator Author

jlmaurer commented Jul 1, 2020

Thanks @bbuzz31 and @dbekaert I'll implement that change and push it to the repo!

@piyushrpt
Copy link
Collaborator

If you are not transforming map projections, using translate is going to be lot faster than warp

@jlmaurer
Copy link
Collaborator Author

jlmaurer commented Jul 9, 2020

Thanks @piyushrpt, we implemented the virtual raster and seems to be working well!

I just noticed though that the DEM we download is ellipsoidal heights; should we be doing an ellipsoidal correction as is done in ISCE?

@dbekaert
Copy link
Owner

@jlmaurer see here for details open topogrpahy
SRTM GL1 (30m Ellipsoidal) is a version of the popular Shuttle Radar Topography Mission dataset where elevation values are WGS84 ellipsoidal height as opposed to the standard orthometric, or geoid-referenced, elevation.

This is correct as input for tropospheric delays estiamtion, and does not need any more correction. @piyushrpt can you confirm my statement?

@dbekaert
Copy link
Owner

Will close it out, @piyushrpt let us know in care you disagree.

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

5 participants