struct2geotable
Syntax
Description
creates the GT = struct2geotable(S,coordinateSystemType,fnames)Shape variable of GT by using the
coordinate system type coordinateSystemType and structure array fields
fnames.
specifies options using name-value arguments. For example, specify that coordinates
represent points, lines, or polygons by using the GT = struct2geotable(S,Name=Value)GeometryType
name-value argument.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
When the input structure has latitude-longitude fields and x-y fields, the
struct2geotablefunction creates the geospatial table using the latitude-longitude fields. Create the geospatial table using the x-y fields by specifying thecoordinateSystemTypeandfnamesarguments.When you know that a shapefile contains latitude and longitude coordinates and read the shapefile using the
shapereadfunction, you must specify theUseGeoCoordsargument astrue. Otherwise, the structure array containsXandYfields instead ofLatandLonfields. As a result, thestruct2geotablefunction creates theShapevariable of the geospatial table using planar shape objects such asmappointshapeinstead of geographic shape objects such asgeopointshape.
Version History
Introduced in R2021b
