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 mailing list.

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

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 in

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

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]: built-in function pnpoly In [3]: nx.points_inside_poly Out[3]: built-in function points_inside_poly but one of should add it to the FAQ! I

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

2008-10-14 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 snarf Thanks! Looks better than what I wrote. --bb ___

[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

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:

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,y) for

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 - import osgeo.ogr

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