| Mapping Toolbox™ |  |
isShapeMultipart - True, if polygon or line has multiple parts
Syntax
tf = isShapeMultipart(xdata, ydata)
Description
tf = isShapeMultipart(xdata, ydata) returns 1 (true)
if the polygon or line shape specified by xdata and ydata consists
of multiple NaN-separated parts (i.e. has inner
or multiple polygon rings or multiple line segments). The coordinate
arrays xdata and ydata must
match in size and have identical NaN locations.
Examples
isShapeMultipart([0 0 1],[0 1 0])
ans =
0
isShapeMultipart([0 0 1 NaN 2 2 3 3],[0 1 0 NaN 2 3 3 2])
ans =
1
load coast
isShapeMultipart(lat, long)
ans =
1
S = shaperead('concord_hydro_area');
isShapeMultipart( S(1).X, S(1).Y)
ans =
0
isShapeMultipart(S(14).X, S(14).Y)
ans =
1See Also
polysplit
 | ispolycw | | km2deg, nm2deg, sm2deg |  |