Skip to content

shaperead

geometry · scripts/geometry/shaperead.m

SHAPEREAD  Read vector features from an ESRI shapefile.
  S = SHAPEREAD(FILENAME) returns a struct array with fields Geometry,
  BoundingBox, X, and Y (MATLAB R2026a Mapping Toolbox shape struct).
  BoundingBox is 2-by-2 [minX minY; maxX maxY].  PolyLine Geometry is
  'Line'.  Multipart polygons/lines separate parts with NaN in X/Y.

  S = SHAPEREAD(..., 'UseGeoCoords', true) renames X/Y to Lon/Lat.
  Attribute DBF columns are not read (Attributes must be false).

  Supported shape types: Point (1), PolyLine (3), Polygon (5).
  GitLab nexus#2098 (golden-map-vector).