comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » intersection of two tracks(lat,lon)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
intersection of two tracks(lat,lon) [message #75069] Wed, 16 February 2011 00:59 Go to next message
Kai Muehlbauer is currently offline  Kai Muehlbauer
Messages: 13
Registered: February 2011
Junior Member
Hi,

I've consulted already the usual IDL resources. Maybe I overlooked
something.

I'm looking for a program which calculates the intersection points for
lines or polygon edges similar to the matlab function "POLYXPOLY".

Aim is to find the intersection (Lat,Lon) of two Tracks (Latitude,
Longitude). Also the index of the intersection point is needed.

Any hint which can direct me to an solution is appreciated.

Cheers
Kai
Re: intersection of two tracks(lat,lon) [message #75124 is a reply to message #75069] Thu, 17 February 2011 07:11 Go to previous messageGo to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <ijilrq$t4g$1@news-a.stw-bonn.de>,
Kai Muehlbauer <kai.muehlbauer@uni-bonn.de> wrote:

> Unfortunately, this is only for X,Y-space. What can I do, if the 3rd
> dimension (height) should also be processed?

In 3-D the tracks will probably never actually intercept. You will have to
look for minima in the separation between the tracks.

I suggest you do a brute force solution and find the distance between
all pairs of points. It is of order n1 x n2, where n1 and n2 are the
number of points in each track.

Then sort the results. You might need to provide some human input
into the problem, in case there are multiple local minima. If there
is only a single intersection, it should appear as the global minimum.

Ken Bowman
Re: intersection of two tracks(lat,lon) [message #75127 is a reply to message #75069] Thu, 17 February 2011 07:02 Go to previous messageGo to next message
guillermo.castilla.ca is currently offline  guillermo.castilla.ca
Messages: 27
Registered: September 2008
Junior Member
On Feb 17, 4:22 am, Kai Muehlbauer <kai.muehlba...@uni-bonn.de> wrote:

> Unfortunately, this is only for X,Y-space. What can I do, if the 3rd
> dimension (height) should also be processed?

Then you should have told us that the tracks belong to flying
objects! ;)
I would then, for each intersection detected in 2D, check whether the
two lines have the same z at that point.

Cheers

Guillermo
Re: intersection of two tracks(lat,lon) [message #75136 is a reply to message #75069] Thu, 17 February 2011 00:22 Go to previous messageGo to next message
Kai Muehlbauer is currently offline  Kai Muehlbauer
Messages: 13
Registered: February 2011
Junior Member
Hi all,

Am 16.02.2011 21:39, schrieb kisCA:
> Mabe this could help:
> http://www.astro.washington.edu/docs/idl/cgi-bin/getpro/libr ary09.html?LINT
> Cheers

yes, I used LINT to find the intersection. After that I used MATCH to
find the indices.

Unfortunately, this is only for X,Y-space. What can I do, if the 3rd
dimension (height) should also be processed?

Cheers,
Kai
Re: intersection of two tracks(lat,lon) [message #75144 is a reply to message #75069] Wed, 16 February 2011 12:39 Go to previous messageGo to next message
kisCA is currently offline  kisCA
Messages: 78
Registered: January 2011
Member
Mabe this could help:
http://www.astro.washington.edu/docs/idl/cgi-bin/getpro/libr ary09.html?LINT
Cheers
Re: intersection of two tracks(lat,lon) [message #75213 is a reply to message #75069] Mon, 21 February 2011 22:51 Go to previous message
Kai Muehlbauer is currently offline  Kai Muehlbauer
Messages: 13
Registered: February 2011
Junior Member
Hi all,

Am 21.02.2011 15:05, schrieb Guillermo:
> So the fact that you are still considering the other solution makes
> me curious, what in earth are you tracking??

Uhm, not real tracking, it is actually the intersection of two radar
beams (center of beam).

Cheers
Kai
Re: intersection of two tracks(lat,lon) [message #75232 is a reply to message #75069] Mon, 21 February 2011 06:05 Go to previous message
guillermo.castilla.ca is currently offline  guillermo.castilla.ca
Messages: 27
Registered: September 2008
Junior Member
> Am 17.02.2011 09:22, schrieb Kai Muehlbauer:
>
> Actually I do (as Guillermo suggested) check the heights of the two
> tracks at intersection point. This is sufficiently fast and suits fine.
Then why make it complicated by going for the brute force solution??
The latter would only make sense if your tracks consisted of GPS
waypoints measured say every millisecond. Otherwise the fact that two
waypoints from different tracks are close (i.e., a local minimum in
the distance array) is no guarantee that the tracks actually intersect
(they could run in parallel and be a narrowing in that section).
Conversely, if the tracks are measured at different time lags, or if
the objects have very different speed, an intersection does not need
to translate into a local minimum in the distance array (the waypoints
could be far away from the intersection). So the fact that you are
still considering the other solution makes me curious, what in earth
are you tracking??

Cheers

Guillermo
Re: intersection of two tracks(lat,lon) [message #75238 is a reply to message #75136] Sun, 20 February 2011 23:59 Go to previous message
Kai Muehlbauer is currently offline  Kai Muehlbauer
Messages: 13
Registered: February 2011
Junior Member
Hi all,

Am 17.02.2011 09:22, schrieb Kai Muehlbauer:
> Unfortunately, this is only for X,Y-space. What can I do, if the 3rd
> dimension (height) should also be processed?

my thanks to Guillermo and also Ken for sharing your ideas.

Actually I do (as Guillermo suggested) check the heights of the two
tracks at intersection point. This is sufficiently fast and suits fine.

Also Kens suggestion of a brute force solution finding the distances for
every pair of points is interesting. As I'am not an idl-expert I
appreciate some coding-help at this point. I found that I could use
DISTANCE_MEASURE, but it has only one array as input argument. So I have
to concatenate my two (x,y,z)-tracks and after processing extract the
interesting indices from the output array/matrix. Then I have to sort,
to find the shortest distance (or do some more sophisticated) and
possible local minima.

Cheers,
Kai
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Efficient comparison of array location in two lists
Next Topic: Re: Efficient comparison of array location in two lists

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:12:31 PDT 2025

Total time taken to generate the page: 0.01166 seconds