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

Home » Public Forums » archive » Re: vector layer comparison in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: vector layer comparison in IDL [message #42857 is a reply to message #42824] Thu, 03 March 2005 14:42 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Mark Hadfield wrote:
> function magic_distance_function, x, y, x0, y0, x1, y1
>
> compile_opt DEFINT32
> compile_opt STRICTARR
> compile_opt STRICTARRSUBS
> compile_opt LOGICAL_PREDICATE
>
> d0 = sqrt((x-x0)^2+(y-y0)^2)
> d1 = sqrt((x-x1)^2+(y-y1)^2)
> dp = 2.0*poly_area([x,x0,x1],[y,y0,y1]) / $
> sqrt((x1-x0)^2+(y1-y0)^2)
>
> return, dp > (d0 < d1)
>
> end

Jim Pendleton of RSI has pointed out to me that there is an IDL function
called PNT_LINE that does this.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multiple plotting windows?
Next Topic: Re: Multiple plotting windows?

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

Current Time: Sat Oct 11 22:09:29 PDT 2025

Total time taken to generate the page: 0.80380 seconds