MATLAB: Is it possible to make ‘geostruct2’ without using SHAPEREAD

geostruct2MATLABshaperead

I would like to make 'geostruct2' data structure without using SHAPEREAD.

Best Answer

This enhancement has been incorporated in Release 2008a (R2008a). For previous product releases, read below for any possible workarounds:
There is no standard way to make 'geostruct2' data structure without using SHAPEREAD. As a workaround, one can create a 'geostruct2' data structure as in the following example:
S = struct('Geometry','Line','BoundingBox',[0 0;3 3],'X',[1 2 2 1 1],'Y',[1 1 2 2 1]);
figure,mapshow(S)
The above code makes a 'geostruct2' data structure S for a polygonal object.