Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

polyjoin

Convert line or polygon parts from cell arrays to vector form

Syntax

[lat,lon] = polyjoin(latcells,loncells)

Description

[lat,lon] = polyjoin(latcells,loncells) converts polygons from cell array format to column vector format. In cell array format, each element of the cell array is a vector that defines a separate polygon.

Examples

latcells = {[1 2 3]'; 4; [5 6 7 8 NaN 9]'};
loncells = {[9 8 7]'; 6; [5 4 3 2 NaN 1]'};
[lat,lon] = polyjoin(latcells,loncells);
[lat lon]

ans =
     1     9
     2     8
     3     7
   NaN   NaN
     4     6
   NaN   NaN
     5     5
     6     4
     7     3
     8     2
   NaN   NaN
     9     1

Tips

A polygon may consist of an outer contour followed by holes separated with NaNs. In vector format, each vector may contain multiple faces separated by NaNs. There is no structural distinction between outer contours and holes in vector format.

Introduced before R2006a

Was this topic helpful?