-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
[Help]: projection and filesize issue related to sbas.export_geotiff #160
Comments
I can add the compression option for GeoTIFF file export, see the commit: 492a3d3 |
Of course, the pixels are not square because the resolution determines multilooking for azimuth and range in full (not fractional) pixels.
How are you going to make square pixels when 13.977… / 4.168… = 3.356…? |
Another issue I would like to ask for help if that I got the memory problem when I run this line sbas.export_geotiff(sbas.ra2ll(unwrap_sbas.phase-trend_sbas),f'{OUTDIR}/SBAS_Phase_unwrap_detrend_sbas') The data I would like to save is
Since I am running the software on our server with a 1008GB memory limit, the issue should not be related to memory itself. I also tried with the following methods: but neither approach helped in this case. I even try to only save one phase using Still the problem exist. I am wondering what the problem is in my case. Thank you very much |
You’re attempting to export a stack of 45 large rasters:
However, your available worker memory is insufficient:
Do you really need to export the geocoded detrended phase? Typically, results are exported while processing is done internally in radar coordinates. If exporting this data is necessary, consider reducing the number of workers to allocate more RAM per worker. Alternatively, materialize the data (using sync or similar functions) for (unwrap_sbas.phase - trend_sbas) or even sbas.ra2ll(unwrap_sbas.phase - trend_sbas) before export. |
But my problem is that even when I try to only export one raster instead of 45 at once, it still shave such memory issue. xxx = sbas.ra2ll(unwrap_sbas.phase-trend_sbas)[0,:,:]
|
But how exactly are you computing the interferograms and correlations? |
Here are the code I used:
|
This code is redundant because you've already specified the parameter 'resolution=15' in the
However, neither the Remember, PyGMTSAR follows a lazy computation paradigm where you write the full code, run it, inspect the result sizes, and adjust outputs as necessary before executing the entire computation. This concept is detailed in my book, available in the repository. |
sync_cube() function is very ineffective for stack based data. It is intended for pixel wise computations like 1D unwrapping and least-squares processing. For your case, it requires all the phases and unwrapped phases calculation at once. Use sync_stack() as in PyGMTSAR examples. |
Thanks a lot. Yes, sync_stack() is more effective. But I got this error at the last step in sync_stack Saving 2D Stack: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4601/4601 [00:11<00:00, 414.01it/s] |
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.
The text was updated successfully, but these errors were encountered: