question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

processing scenes over ocean without a DEM

See original GitHub issue

I have a set of Level 1 GRD data taken from Copernicus which I wanted to geocode and calibrate using pyroSAR.

OS: Ubuntu 18.04

Environment Used: Anaconda environment

Library versions: pyroSAR: version 0.11.1 from conda-forge SNAP: 8.0

Files:

S1A_EW_GRDH_1SSH_20200317T225506_20200317T225606_031721_03A873_CB43.zip
S1A_EW_GRDM_1SSH_20191215T231834_20191215T231938_030365_037956_C2B6.zip
S1B_EW_GRDH_1SDH_20190820T075249_20190820T075349_017666_0213C3_F0A9.zip

Code:

from pathlib import Path
from pyroSAR.snap import geocode 

sar_zips = [str(Path.cwd() / i) for i in Path("./data").iterdir() if i.suffix == ".zip"]
outdir = "./outdir"

out_proj = 4326

geocode(
    infile=sar_zips[0],
    outdir=outdir,
    t_srs=out_proj,
    scaling="linear",
    speckleFilter="Refined Lee",
)

However the process produced a (seemingly) blank TIF.

Output of gdalinfo S1A__EW___A_20200317T225506_HH_NR_Orb_TF_Spk_TC.tif

Driver: GTiff/GeoTIFF
Files: S1A__EW___A_20200317T225506_HH_NR_Orb_TF_Spk_TC.tif
       S1A__EW___A_20200317T225506_HH_NR_Orb_TF_Spk_TC.tif.aux.xml
Size is 58554, 27919
Coordinate System is:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-55.043315251243307,-58.879481151356849)
Pixel Size = (0.000179663056824,-0.000179663056824)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -55.0433153, -58.8794812) ( 55d 2'35.93"W, 58d52'46.13"S)
Lower Left  ( -55.0433153, -63.8954940) ( 55d 2'35.93"W, 63d53'43.78"S)
Upper Right ( -44.5233246, -58.8794812) ( 44d31'23.97"W, 58d52'46.13"S)
Lower Right ( -44.5233246, -63.8954940) ( 44d31'23.97"W, 63d53'43.78"S)
Center      ( -49.7833199, -61.3874876) ( 49d46'59.95"W, 61d23'14.96"S)
Band 1 Block=496x384 Type=Float32, ColorInterp=Gray
  NoData Value=0
  Metadata:
    STATISTICS_VALID_PERCENT=0

Could someone explain why this occurs? I’m new to SAR image processing so kindly let me know if my workflow is incorrect.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
johntruckenbrodtcommented, Sep 17, 2021

Hi. I discovered that SNAP has an option to use the GETASSE30 DEM. This is in 30 arc seconds resolution, so quite low, but it is fully global (i.e. also covering oceean areas). This is great because there is no need to adjust the pyroSAR.snap.geocode workflow with these Ellipsoid-Correction operators (which are quite limited anyways).

from pyroSAR.snap import geocode

filename = S1A_EW_GRDH_1SSH_20200317T225506_20200317T225606_031721_03A873_CB43.zip
outdir = "./outdir"

geocode(infile=filename, outdir=outdir, terrainFlattening=False, nodataValueAtSea=False, demName='GETASSE30')

This seems to be a very good solution so I am closing the issue. Feel free to re-open if there is more to it.

1reaction
johntruckenbrodtcommented, Mar 5, 2021

Great! With the current master branch this “hacky modification” is no longer needed. Let’s leave it open so I can integrate this into ‘geocode’ later. No idea when it will be though.
Thanks a lot for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the result of terrain correction over ocean? - s1tbx
I found that for scenes over the areas where SRTM30 is absent, TC step still runs, but produces scenes that are not geolocated...
Read more >
Landsat Levels of Processing | U.S. Geological Survey
All Landsat scenes are attempted to process to L1TP, using Ground Control Points (GCPs) and a digital elevation model (DEM). In some cases ......
Read more >
Everything you need to know about Digital Elevation ...
DEMs are popular for calculations, manipulations, and further analysis of an area, and analysis based on the elevation.
Read more >
Optimized Tool for DEM Pit Removal Now Available
The Optimized Pit Removal tool accomplishes this by treating any cell with No Data as a flow outlet, allowing the user to mark...
Read more >
DEM Resolution Impact on the Estimation of the Physical ...
In some hydrologic models the slope derived from the DEM does not influence the output data. A coarser resolution DEM could be used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found