-
Notifications
You must be signed in to change notification settings - Fork 260
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
Allow GPS
class to work with other image projections
#1079
base: main
Are you sure you want to change the base?
Conversation
Gps
class to compare to other projectionsGPS
class to compare to other projections
GPS
class to compare to other projectionsGPS
class to compare to work with other image projections
GPS
class to compare to work with other image projectionsGPS
class to work with other image projections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @scottstanie for the PR! My main comment is the get_image_rowcol()
: since it relies on mintpy.objects.coord.coordinate.geo2radar()
, and mintpy.objects.coord.py
relies on mintpy.utils.utils0.py
, I would suggest moving this function into mintpy.objects.coord.py
to avoid the circular imports. You could find the complete reliance info among sub-modules in mintpy here. The possible location could be:
- as an independent function as it's now OR
- inside
geo2radar()
OR - inside
lalo2yx()
UPDATE: If we assume the InSAR file is already geocoded (in EPSG:4236 or other projections), then merging geo_iamge_rowcol()
into lalo2yx()
sounds the simplest to me. What do you think?
Could you also rebase this PR against the latest main branch?
utils0 as ut0, | ||
utils1 as ut, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utils0
is imported within util1
already, so we don't need an extra utils0 as ut0
here. This is a messy part in mintpy, and the current logic is: 1) utils1
imports everything from utils0
; 2) utils
imports everything from utils0
and utils1
.
|
||
def get_image_values(self, filename, datasetName=None, pad: int = 0, print_msg=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not used currently anywhere, so it's fine with me. For your information: from my experience, given a GNSS site, we either interpolate InSAR or average multiple InSAR pixels around the GNSS site. Personally, I have not gotten a good result yet by comparing GNSS and its nearest InSAR pixel yet.
|
||
return inc_angle, az_angle | ||
return inc_angle or np.nan, az_angle or np.nan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just curious: in this syntax, when will the np.nan
value be returned? Is it the same scenario as the raise ValueError
above?
Description of proposed changes
reproject
convert X/Y coordinates between different EPSGs. It's more general than some of the other UTM conversion functions- for instance,to_latlon
can now just call thereproject
function to do the conversion.get_image_rowcol
to find the pixel location nearest to some lat/lon locationGPS
class to convert the gps station locations in lat/lon to whatever the image projection is, stored in theEPSG
attributetropo_pyaps.py
to run that script on non-EPSG:4326 images. That will be submitted afterReminders