From: John H. <jd...@gm...> - 2012-03-08 16:31:06
|
On Thu, Mar 8, 2012 at 10:21 AM, Dharhas Pothina < Dha...@tw...> wrote: > > + one on this issue. One of the big advantages of the nxutils points in > poly is that you could pass it a large numpy array of points and get back a > mask. We found this to be significantly faster than using looping through > the single point in poly algorithms from packages like shapely. Echoing > Jorge's question how would we do this using contains_point(). > One could modify src/_path.cpp to expose a "points_in_path" method so the looping would be done in C++. The underlying work is being done in point_in_path_impl and exposed to python as point_in_path. It would not be too much work to expose a points_in_path method, but we would have to think about what arguments to take and to return. _path.cpp does not currently depend on numpy, and doing things via python list would be slower than what we currently have in nxutils which is array aware. JDH |