ACCESS-Cloud-Based-InSAR / dem-stitcher

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

Handle Point and Line Intersections of DEM tiles #54

Closed cmarshak closed 1 year ago

cmarshak commented 1 year ago

Resolves the related https://github.com/ACCESS-Cloud-Based-InSAR/DockerizedTopsApp/issues/89#issue-1551310313.

MWE:

from dem_stitcher import stitch_dem

dem_array, dem_profile = stitch_dem([40.0, 36.0, 44.0, 39.0],
                                    'glo_90_missing',
                                    dst_ellipsoidal_height=True,
                                    dst_area_or_point='Point')

This intersects a tile of the missing glo_90 tiles that are not in glo_30 on a Western edge (see the related issue). Previously, shapely LineStrings could be acceptable intersections causing subsequent errors in the code (not expected). The fix is to exclude intersections that are not polygons, so we have at least one pixel in our dem raster.

We also updated the test workflow to use: https://github.com/mamba-org/provision-with-micromamba