Skip to content

GDAL No such file or directory when using unzipped SAFE file #80

@forrestfwilliams

Description

@forrestfwilliams

Currently, rtc_s1.py fails with a GDAL No such file or directory error if the input Sentinel-1 data is unzipped.

This can be recreated by processing the Los Angeles sample data hosted on zenodo, unzipping the provide SAFE file, then running rtc_s1.py with this configuration file.

This error occurs because calling s1reader's Sentinel1BurstSlc.slc_to_vrt_file() method writes a VRT representing the burst SLC data with a relative path to the parent geotiff that assumes the VRT is in the same directory as the SAFE file. However, in RTC this VRT is written to a temporary subdirectory with this structure:

input_dir
└── S1_SLC.SAFE
scratch_dir
└── temp_*
   └── temp_*
      └── BURST_ID
         └── slc_VV.vrt

Thus, GDAL is not able to locate the parent geotiff using the information in the VRT.

I can think of two ways to remedy this:

  1. Modify Sentinel1BurstSlc.slc_to_vrt_file() so that it uses absolute file paths
  2. Force RTC to write burst VRTs into the same directory as the input SAFE file

Personally, I prefer option 1 because it fixes the problem for other projects as well, and requires fewer code changes.
error.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions