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
Output Arguments
Tips
When the input structure has latitude-longitude fields and x-y fields, the
struct2geotable
function creates the geospatial table using the latitude-longitude fields. Create the geospatial table using the x-y fields by specifying thecoordinateSystemType
andfnames
arguments.When you know that a shapefile contains latitude and longitude coordinates and read the shapefile using the
shaperead
function, you must specify theUseGeoCoords
argument astrue
. Otherwise, the structure array containsX
andY
fields instead ofLat
andLon
fields. As a result, thestruct2geotable
function creates theShape
variable of the geospatial table using planar shape objects such asmappointshape
instead of geographic shape objects such asgeopointshape
.
Version History
Introduced in R2021b