pygmtsar
pygmtsar copied to clipboard
[Help]: projection and filesize issue related to sbas.export_geotiff
I am trying to save all coherence and phase data into a GeoTIFF using sbas.export_geotiff.
decimator = sbas.decimator(resolution=15) corr_sbas = decimator(ds_sbas.correlation) sbas.export_geotiff(sbas.ra2ll(corr_sbas),f'{OUTDIR}/Coherence_stack')
The saved GeoTIFF should already been saved in latitude/longitude coordinates after sbas.ra2ll. However, the saved GeoTIFF appears to be in 'pseudo' geographic Lat/Lon coordinates when I open it in ENVI. Additionally, the entire image seems to be in an incorrect projection when I check it using the large icons view in Windows 10 File Explorer directly:
When I open the file in QGIS, the projection appears to be correct, but it is prone to causing QGIS to crash.
I then used gdalwarp to reproject it to EPSG:4326 and saved it with LZW compression, as shown below:
After re-saving with GDAL, QGIS is able to open the data safely, and the file size has been reduced from 1.22 GB to 881 MB.
I am wondering why this issue occurs when exporting data to a GeoTIFF using sbas.export_geotiff. Is there a way to fix the projection issue and also reduce the file size using pyGMTSAR?
Thank you.