Mapping Toolbox | ![]() ![]() |
Convert polygon segments from cell array to vector format.
Syntax
Description
[lat,lon] = polyjoin(latcells,loncells) converts polygons from cell array format to vector format. In cell array format, each element of the cell array is a separate polygon. Each polygon may consist of an outer contour followed by holes separated with NaN
s. In vector format, each vector may contain multiple faces separated by NaN
s. There is no distinction between outer contours and holes.
Example
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
See Also
polybool
Perform polygon boolean operations
polycut
Implement polygon branch cuts for holes
polysplit
Extract segments of
NaN
-delimited polygon vectors to cell
arrays
![]() | polybool | polymerge | ![]() |