in3Utils.geoTrans.inpolygon

inpolygon(X, Y, xv, yv)[source]

For a polygon defined by vertex points (xv, yv), returns a np array of size X with ones if the points (X, Y) are inside (or on the boundary) of the polygon; Otherwise, returns zeros. Usage:

mask = inpolygon(X, Y, xv, yv)

Input:

X, Y: Set of points to check xv, yv: polygon vertex points

Output:

mask: np array of zeros and ones

Octave Implementation [IN, ON] = inpolygon (X, Y, xv, yv)