Hello,
I am looking for a way to make SNAP read TS-X data that I have modified in some ways.
I have written Python code to read a TS-X stripmap product (from a *.cos file) and to perform some modifications on it. Now I would like to save the modified data back to a *.cos file (i.e., in COSAR format) so that I can treat the modified product just like any other TS-X product; I want to process it using SNAP.
Unfortunately, the GDAL COSAR driver only supports reading, but not writing. Hence, I tried to save the data as GeoTIFF because the corresponding GDAL driver is much more versatile. Alas, I can’t get SNAP to read the modified data if it’s saved as GTIFF. I suppose that’s because SNAP expects a certain structure for TS-X products.
Thus, I see two possible paths for my problem:
-
Find a way to write SAR-data in COSAR format (ideally in Python). Perhaps there is some alternative to GDAL which I just haven’t found yet? I also checked the TS-X L1b product specifications to check the COSAR file structure. I guess I could write my own code to try to emulate the file structure, but that looks like a rabbit hole I really don’t want to go down. Surely there must be some library containing a suitable driver?
-
Find a way to make SNAP read TS-X products when complex data is saved as GeoTIFF (or some other format for which the GDAL driver supports writing). Does anyone know what I can do to tell SNAP that the GTIFF I’m feeding it contains an SSC product? I think when SNAP sees a GTIFF in a TS-X product it automatically expects MGD data.
Does anyone have any clue for either of the strategies? I would appreciate any hints and tips!
Regards,
Jan