[Numpy-discussion] a good polygon class?

Stéfan van der Walt stefan@sun.ac...
Tue Aug 19 11:49:27 CDT 2008

Hi Mark

2008/8/19 mark <markbak@gmail.com>:
> Hello List -
> I am looking for a good polygon class.
> My main interest it to be able to figure out if a point is inside or
> outside the polygon, which can have any shape (well, as long as it is
> a polygon).
> Any suggestions?

I have optimised Point-in-Polygon code here:


There are three versions: pure Python, ctypes and weave.

A complete library (a NumPy port of Jorg Raedler's polygon lib) is
available as part of my super-resolution library at


or more specifically



More information about the Numpy-discussion mailing list