inpolygon

in = inpolygon(x, y, polygon)

or

in = inpolygon(point, polygon)

keywords: GMT, Julia, point in polygon

Returns in indicating if the query points specified by x and y are inside of the polygon area defined by:

  • polygon: a GMTdatset defining the polygon or a Mx2 matrix of reals that should have the first and last elements equal.

  • point: a Mx2 matrix or a two elements vector with the x and y point coordinates. Depending on the number of query points in point, we return either an Int or a Vector{Int}.

Returns:

  • in = 1

  • on = 0

  • out = -1

Reference

See Also

inwhichpolygon