Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-17 Thread John Hunter
On Thu, Oct 16, 2008 at 2:28 PM, Rob Hetland <[EMAIL PROTECTED]> wrote: > I did not know that very useful thing. But now I do. This is solid > proof that lurking on the mailing lists makes you smarter. and that our documentation effort still has a long way to go ! FAQ added at http://matplotli

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-17 Thread Stéfan van der Walt
2008/10/16 Rob Hetland <[EMAIL PROTECTED]>: > > On Oct 14, 2008, at 12:56 AM, Stéfan van der Walt wrote: > >> Here is an implementation in Python, ctypes and in weave: >> >> http://mentat.za.net/source/pnpoly.tar.bz2 >> >> Regards >> Stéfan > > This question gets asked about once a month on the mai

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-16 Thread Rob Hetland
On Oct 16, 2008, at 1:54 PM, John Hunter wrote: > It is already in matplotlib > > In [1]: import matplotlib.nxutils as nx > > In [2]: nx.pnpoly > Out[2]: > > In [3]: nx.points_inside_poly > Out[3]: > > but one of should add it to the FAQ! I did not know that very useful thing. But now I do.

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-16 Thread John Hunter
On Thu, Oct 16, 2008 at 1:25 PM, Rob Hetland <[EMAIL PROTECTED]> wrote: > This question gets asked about once a month on the mailing list. > Perhaps pnpoly could find a permanent home in scipy? (or somewhere?) > Obviously, many would find it useful. It is already in matplotlib In [1]: import mat

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-16 Thread Rob Hetland
On Oct 14, 2008, at 12:56 AM, Stéfan van der Walt wrote: > Here is an implementation in Python, ctypes and in weave: > > http://mentat.za.net/source/pnpoly.tar.bz2 > > Regards > Stéfan This question gets asked about once a month on the mailing list. Perhaps pnpoly could find a permanent home i

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Bill Baxter
On Tue, Oct 14, 2008 at 2:56 PM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Hi Matthew > > Here is an implementation in Python, ctypes and in weave: > > http://mentat.za.net/source/pnpoly.tar.bz2 > Thanks! Looks better than what I wrote. --bb __

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Stéfan van der Walt
Hi Matthew Here is an implementation in Python, ctypes and in weave: http://mentat.za.net/source/pnpoly.tar.bz2 Regards Stéfan ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Bill Baxter
On Tue, Oct 14, 2008 at 8:46 AM, Pierre GM <[EMAIL PROTECTED]> wrote: >> 2008/10/13 Mathew Yeates <[EMAIL PROTECTED]> >> >> > Is there a routine in scipy for telling whether a point is inside a >> > convex 4 sided polygon? > > Mathew, > You could use OGR (www.gdal.org) > > Example > -

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Pierre GM
> 2008/10/13 Mathew Yeates <[EMAIL PROTECTED]> > > > Is there a routine in scipy for telling whether a point is inside a > > convex 4 sided polygon? Mathew, You could use OGR (www.gdal.org) Example - import osgeo.ogr as ogr vert = [(0,0),(0,1),(1,1),(1,0)] listvert = [" %s %s" % (x,

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Angus McMorland
2008/10/13 Mathew Yeates <[EMAIL PROTECTED]> > Is there a routine in scipy for telling whether a point is inside a > convex 4 sided polygon? Not specifically in scipy, as far as I know, but there are several supplementary packages that provide this functionality, including matplotlib: http://p

[Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Mathew Yeates
Is there a routine in scipy for telling whether a point is inside a convex 4 sided polygon? Mathew ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion