isinterior
Description
returns a logical array whose elements are inpoly
= isinterior(shape
,querypoint
)1
(true
)
when the corresponding geographic or planar points in querypoint
are in
the polygon shape
. A point is in the polygon shape
if it is either inside a solid region or on one of the boundaries.
[
returns an additional logical array whose elements are inpoly
,onboundary
] = isinterior(shape
,querypoint
)1
(true
) when the corresponding points are on a boundary of the polygon
shape
.
Examples
Input Arguments
Output Arguments
Tips
If your polygon shape is in planar coordinates (a
mappointshape
object) and your query points are in geographic coordinates, first project the points by using theprojfwd
function. Then, create a point shape from the projected coordinates by using themappointshape
function.
Version History
Introduced in R2022a