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

API allows scenes without Copernicus DEM coverage over the antimeridian to be submitted for processing #1989

Open
asjohnston-asf opened this issue Dec 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@asjohnston-asf
Copy link
Member

Scenes crossing the antimeridian that do not have Copernicus DEM coverage can be submitted for RTC/InSAR processing but will ultimately fail during processing.

For example, an RTC_GAMMA job for S1A_IW_GRDH_1SDV_20201218T063902_20201218T063931_035736_042E94_0235 can be submitted to the API, but fails during processing with hyp3lib.exceptions.DemError: Copernicus GLO-30 Public DEM does not intersect this geometry:

https://hyp3-api.asf.alaska.edu/jobs/26cec4ea-db07-4dcb-832b-878861515c17

12/27/2023 11:18:48 PM - INFO - Downloading https://sentinel1.asf.alaska.edu/GRD_HD/SA/S1A_IW_GRDH_1SDV_20201218T063902_20201218T063931_035736_042E94_0235.zip
12/27/2023 11:19:02 PM - INFO - Unzipping S1A_IW_GRDH_1SDV_20201218T063902_20201218T063931_035736_042E94_0235.zip
12/27/2023 11:19:12 PM - INFO - Downloading orbit file for S1A_IW_GRDH_1SDV_20201218T063902_20201218T063931_035736_042E94_0235
12/27/2023 11:19:14 PM - INFO - Downloading https://zipper.dataspace.copernicus.eu/download/0d7cb598-ba10-4702-bad4-310bee81538a
12/27/2023 11:19:17 PM - INFO - Got orbit file S1A_OPER_AUX_POEORB_OPOD_20210318T220737_V20201217T225942_20201219T005942.EOF from provider ESA
12/27/2023 11:19:17 PM - INFO - Parameters for this run:
12/27/2023 11:19:17 PM - INFO -     SAFE directory            : S1A_IW_GRDH_1SDV_20201218T063902_20201218T063931_035736_042E94_0235.SAFE
12/27/2023 11:19:17 PM - INFO -     Output resolution         : 30.0
12/27/2023 11:19:17 PM - INFO -     Radiometry                : gamma0
12/27/2023 11:19:17 PM - INFO -     Scale                     : power
12/27/2023 11:19:17 PM - INFO -     Speckle filter            : False
12/27/2023 11:19:17 PM - INFO -     DEM matching              : False
12/27/2023 11:19:17 PM - INFO -     Include DEM               : False
12/27/2023 11:19:17 PM - INFO -     Include inc. angle map    : False
12/27/2023 11:19:17 PM - INFO -     Include scattering area   : False
12/27/2023 11:19:17 PM - INFO -     Include RGB decomposition : False
12/27/2023 11:19:17 PM - INFO -     Orbit file                : S1A_OPER_AUX_POEORB_OPOD_20210318T220737_V20201217T225942_20201219T005942.EOF
12/27/2023 11:19:17 PM - INFO -     Output name               : S1A_IW_20201218T063902_DVP_RTC30_G_gpuned_D962
12/27/2023 11:19:17 PM - INFO -     DEM name                  : copernicus
12/27/2023 11:19:17 PM - INFO - Preparing DEM
Traceback (most recent call last):
  File "/usr/local/bin/hyp3_gamma", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/__main__.py", line 38, in main
    process_entry_point.load()()
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/__main__.py", line 111, in rtc
    product_name = rtc_sentinel_gamma(
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/rtc/rtc_sentinel.py", line 345, in rtc_sentinel_gamma
    dem_image, dem_par, dem_type = prepare_dem(safe_dir, dem_name, bbox, dem, resolution)
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/rtc/rtc_sentinel.py", line 169, in prepare_dem
    prepare_dem_geotiff(dem_tif, geometry, pixel_size)
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/dem.py", line 97, in prepare_dem_geotiff
    raise DemError(f'Copernicus GLO-30 Public DEM does not intersect this geometry: {geometry}')
hyp3lib.exceptions.DemError: Copernicus GLO-30 Public DEM does not intersect this geometry: MULTIPOLYGON (((179.752365 -21.707975,180.0 -22.5992797013829,180.0 -23.497875754304,177.795349 -24.019802,177.341919 -22.276783,179.752365 -21.707975)),((-179.765747 -23.442419,-180 -23.497875754304,-180 -22.5992797013829,-179.765747 -23.442419)))

The hyp3_api.validation.check_dem_coverage() validator does not account for granule polygons crossing the antimeridian, so the polygon is assumed to wrap the wrong way around the earth.

@asjohnston-asf asjohnston-asf added the bug Something isn't working label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant