Open falkamelung opened 2 years ago
I was aware of this potential issue. After seeing @stackTom's initial implementation using the four corners lat/lon, I realize it won't work for dataset with no-data-value on the corners/edges, which is very common for S1. Thus, I changed it to the min/max lat/lon as a bounding box. If you have a robust way to exact the inclined polygon, please issue another PR.
I only know how to get data from the unavco h5 files, don't know enough about geology or rest of the mintpy pipeline to suggest any alternatives.
Do you know how else we could do it @falkamelung?
Hi @stackTom , I would think in most cases we can just take the (1,1), (1,N), (N,1), (N,N) of the arrays to get the lat/long coordinates of the edges:
To capture Yunjun's case above, if latitude(1,1) is NaN, we should be able to take the first row where it is not NaN. We have to to make sure that it works for both descending and ascending as the location of the NaN areas get flipped.
Will have to play with it. I initially did it like you suggest (before yunjun put in his fixes), but the resultant polygon also wasn't slanted.
I tested it using an online WKT visualizer. Unless my memory is failing me (which is a full possibility), it wasn't slanted.
I could not find the MintPy issue so I am writing it here.
https://insarmaps.miami.edu/start/19.4594/-155.5096/10.6143?flyToDatasetCenter=false&startDataset=S1_IW12_087_0527_0531_20180908_XXXXXXXX_N19390_N19549_W155679_W155507
The --subset option does not work:
(There is something weird: in geo coordinates it always uses --subset, no matter whether it is given. Try the command below without --subset. ??????)
Test datasets to fix the data_footprint right are here:
save_hdfeos5.py timeseries_demErr.h5 --tc temporalCoherence.h5 --asc avgSpatialCoh.h5 -m ../maskPS.h5 -g inputs/geometryRadar.h5 -t smallbaselineApp.cfg --suffix PS h5file=S1_IW3_048_0081_0082_20191111_20220710_PS.he5 rm -rf JSON ; hdfeos5_2json_mbtiles.py $h5file ./JSON; json_mbtiles2insarmaps.py -u insaradmin -p Insar123 --host insarmaps.miami.edu -P rsmastest -U rsmas\@gmail.com --json_folder JSON --mbtiles_file JSON/${h5file%.*}.mbtiles
Geo coordinates (subset) cd /data/HDF5EOS/MaunaLoaSenDT87/mintpy
h5file=S1_IW12_087_0527_0531_20180908_XXXXXXXX_N19390_N19549_W155679_W155507.he5 rm -rf JSON ; hdfeos5_2json_mbtiles.py $h5file ./JSON; json_mbtiles2insarmaps.py -u insaradmin -p Insar123 --host insarmaps.miami.edu -P rsmastest -U rsmas\@gmail.com --json_folder JSON --mbtiles_file JSON/${h5file%.*}.mbtiles