Find 2D intersection in lat lon between curve (rivers) and satellite traces (2D polygon) on a map

2 views (last 30 days)
I have a set of (lon,lat) points defining the course of a river. Then I also have a set of (lon, lat) points defining the traces of satellite measurements on-ground. The trace is not 1D, there is a 'left' point and a 'right' point, denoting what woud be in reality a continuous 2D band. In fact both the river and the trace are continuous. I want to find the intersections between the river (a curve) and also the 2D trace. I managed in 1D with the answer of the link above, but not evident in 2D at all. Thank you
PS: I include now included exemplary mat data, with the [lon lat] values of the river, and the [lon lat] values of the satellite trace, defined by the left and right points that define the band/belt extremes. On of the problems I see as well is that close to the poles the bands mix because of the projection effect...
  6 Comments
Jeffrey Clark
Jeffrey Clark on 17 Jun 2022
@Albert Zurita, yes the closer to the poles the more problematic lat-lon. Before realizing you created the case where all riv points were in the trace_1/2 I included a step in my proposed solution to convert lat-lon to a cartesian coordinate system in three dimensions, in this case Earth-Centered Rotated (right) as compared to the lon-lat data (I augmented and reversed columns of the lon-lat of all three files with altitude of zero to do the transform from Lat-Lon-Alt to ECR in the figure on the right):
Albert Zurita
Albert Zurita on 24 Jun 2022
Hi, what is ECR, like ECI? And what coordinates do you plot there, because I guess x,y,z will matter. Thanks

Sign in to comment.

Answers (1)

Bjorn Gustavsson
Bjorn Gustavsson on 17 Jun 2022
If you have a single-pass of the satellite you could check what "river-points" are inside the ground-track with the inpolygon function. Check the help and documentation for illustrating examples. My approach would be to split up the satellite-track into single-pass-segments and search for points inside the ground-track pass-by-pass and collect what I need from each.
HTH
  4 Comments
Albert Zurita
Albert Zurita on 17 Jun 2022
But I think it makes more sense to organize by orbit because the wrap-around would make sense to fasten the code, which at the moment it's not a problem.
On the coordinates the problem with ECEF is that they are 3D coordinates, and it seems a lot easier to work on projected coordinates, with of course the caveats we could encounter...
Bjorn Gustavsson
Bjorn Gustavsson on 17 Jun 2022
Oh, yes, by orbit first. The idea to work with unwrap and ecef would be if you have rivers close to your +180/-180 (or 0-360) cuts. For ecef you could possibly work with the x-y coordinates if you are safely on the northern or southern hemisphere - I guess there the cut-problem would be the equator. But now I'm mainly throwing completely unbaked ideas at you for the possibility that I by stupid luck manage to randomly combine a couple of phrases in the right order...

Sign in to comment.

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!