Mapping Toolbox    

Extracting Polygon or Line Segments

It may be difficult to identify line or patch segments once they have been combined into large NaN-clipped vectors. You can separate these polygon or line vectors in their component segments using polysplit. The results is cell arrays in which each element contains a segment. To reverse the results of polysplit, use polyjoin:


  Segments Versus Polygons Merging Line Segments