cobweb-eu / pcapi

Personal Cloud API (PCAPI) is a storage middleware that abstracts access to Cloud Storage providers
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Point in Polygon filter #45

Closed xmichael closed 8 years ago

xmichael commented 8 years ago

Implement point in polygon as a PCAPI filter using the ray-casting method, preferably in pure python (assuming around a dozen SLOC). The call should only return points that are within that polygon. We don't care about corner cases like boundary points.

Example: filter=pip,&pip_point=[1,1]&pip_polygon=[[0,0], [0,2], [2,2], [2,0]]

Note that the arguments are parsable by python's json.loads(str)