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

2 views (last 30 days)
Albert Zurita on 15 Jun 2022
Commented: Albert Zurita on 24 Jun 2022
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...
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

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
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...

R2022a

### Community Treasure Hunt

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

Start Hunting!

Translated by