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

Home » Public Forums » archive » Already written function to find if a point is within a rectangle?
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: Already written function to find if a point is within a rectangle? [message #79398 is a reply to message #79347] Thu, 23 February 2012 01:34 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Feb 22, 10:25 pm, Jacare Omoplata <walkeystal...@gmail.com> wrote:
>>>> So I need a way to find out if a point ( position of a star ) is
>>>> within a rectangle ( image boundary ). The rectangle edges are not
>>>> strictly horizontal or vertical.
>
>>> You talk about coordinates in RA and dec. So are the images really
>>> rectangular? It seems to me that the real problem is that you need to
>>> deal with spherical geometry.
>
>> Not only that, but an "image boundary" will be projection-dependent
>> [*].  For small images it probably won't matter much, but there will
>> always be an edge case that gets you later.
>
> I'm thinking of making polygons with a large number of edges, instead
> of rectangles, with every data point at the edge of a FITS file as a
> vertex. That would minimize the projection error, right?

That helps. Special care is probably need around the poles though.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: calling ANSYS Fluent from IDL
Next Topic: Youtube

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

Current Time: Wed Oct 08 14:57:10 PDT 2025

Total time taken to generate the page: 0.00358 seconds