ACCESS-Cloud-Based-InSAR / dem-stitcher

Download and merge DEM tiles
Apache License 2.0
39 stars 15 forks source link

Reading tile imagery take long time in wsl (windows subsidiary linux tested os : ubuntu and debian) #84

Closed sugizo closed 1 month ago

sugizo commented 1 month ago

The bug

Reading tile imagery take long time in wsl (windows subsidiary linux tested os : ubuntu and debian) host os : win 11 ram : 8 gb

Opening glo_30 Datasets: 100%|██████████| 1/1 [00:02<00:00,  2.18s/it]
Reading tile metadata: 100%|██████████| 1/1 [00:00<00:00, 664.71it/s]
Reading tile imagery:   0%|          | 0/1 [00:00<?, ?it/s]

To Reproduce

1 create virtual environment, 2 install dem-stitcher on virtual environment created above 3 use the code from pypi

from dem_stitcher import stitch_dem

# as xmin, ymin, xmax, ymax in epsg:4326
bounds = [-119.085, 33.402, -118.984, 35.435]

X, p = stitch_dem(bounds,
                  dem_name='glo_30',  # Global Copernicus 30 meter resolution DEM
                  dst_ellipsoidal_height=False,
                  dst_area_or_point='Point')

4 save is app.py 5 execute python app.py

Additional context

the same code took from pypi run well in google colab

steps for additional context 1 install dem-stitcher 2 use code from pypi above 3 execute the code

best regards

cmarshak commented 1 month ago

Hi @sugizo - thanks for your interest in this library and carefully testing it.

We have automated testing each PR (granted the APIs change frequently). The testing includes reading from all the APIs and typically automated testing can be completed in less <10 minutes (including the env setup). The testing uses ubuntu and Python 3.9 - 3.12.

See the workflow file here: https://github.com/ACCESS-Cloud-Based-InSAR/dem-stitcher/blob/dev/.github/workflows/test.yml Here is a sample integration test reading from all the possible DEM datasets: https://github.com/ACCESS-Cloud-Based-InSAR/dem-stitcher/blob/dev/tests/test_stitcher.py#L87-L101

I created a PR so I could manually trigger these tests after reading this issue as I was concerned an API or url endpoint changed (see #49 for example). However, the tests for the PR just ran fine.

It sounds like you are using a linux virtual machine on a windows machine. I don't have the tools to reproduce this so am going to close this issue as this is likely beyond the scope of what can be sorted out here. However, if there are any specific items that might help us resolve this together, please share. Thanks!