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

Home » Public Forums » archive » Re: point inside polygon
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: point inside polygon [message #11506 is a reply to message #11494] Wed, 01 April 1998 00:00 Go to previous message
wmc is currently offline  wmc
Messages: 117
Registered: February 1995
Senior Member
In article C0684CDB@oma.be, Philippe Peeters <philp@oma.be> writes:
> Does anybody knows of an IDL function to test whether a given point is
> inside a polygon?

I needed to solve this recently (in a mapping context). The solution I came up
with works but its not elegant: use poly_fill to actually draw your polygon
(in a pixmap not the screen window if you prefer), then read off the pixel value
of your point to see if its in or out.

This is grotesquely inelegant, but its very simple and it works. I can
post the code if you're interested. A better solution
would be to look at polyfill and see how it does the fill... but sadly
polyfill seems to be one of the few routines not written in IDL.

- William

---
William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Volume Size
Next Topic: Re: Three questions

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

Current Time: Wed Oct 08 17:50:51 PDT 2025

Total time taken to generate the page: 0.00189 seconds