Main Content

Vector Data

Analyze and transform point, line, and polygon data

Vector data uses points, lines, polygons, and their non-spatial attributes to describe real-world objects, locations, and events. For example, you can represent a city by using a point, a river by using a line, and a country by using a polygon. The vertices of points, lines, and polygons can be in geographic (latitude-longitude) or projected (x-y) coordinates.


expand all

Geospatial Tables, Tables, and Structures

geotable2tableConvert geospatial table to table
table2geotableConvert table to geospatial table
struct2geotableConvert structure array to geospatial table

Line and Polygon Coordinate Arrays

poly2ccwConvert polygon contour to counterclockwise vertex ordering
poly2cwConvert polygon contour to clockwise vertex ordering
poly2fvConvert polygonal region to patch faces and vertices
polyjoinConvert line or polygon parts from cell arrays to vector form
polymergeMerge line segments with matching endpoints
polysplitConvert line or polygon parts from vector form to cell arrays
closePolygonPartsClose all rings in multipart polygon
removeExtraNanSeparatorsClean up NaN separators in polygons and lines
ispolycwTrue if polygon vertices are in clockwise order
isgeotableDetermine if input is geospatial table
isShapeMultipartTrue if polygon or line has multiple parts
extractfieldField values from structure array

Interpolate Coordinates

interpmDensify latitude-longitude sampling in lines or polygons
intrplatInterpolate latitude at given longitude
intrplonInterpolate longitude at given latitude

Clip Lines and Polygons

maptrimlTrim lines to latitude-longitude quadrangle
maptrimpTrim polygons to latitude-longitude quadrangle
nanclipClip vector data with NaNs at specified pen-down locations
flatearthpolyClip polygon to world limits

Buffer or Reduce Density

buffermBuffer zones for latitude-longitude polygons
reducemReduce density of points in vector data
polyxpolyIntersection points for lines or polygon edges
linecircIntersections of circles and lines in Cartesian plane
circcircIntersections of circles in Cartesian plane


expand all

geopointshapePoint shape in geographic coordinates
geolineshapeLine shape in geographic coordinates
geopolyshapePolygon in geographic coordinates
mappointshapePoint shape in planar coordinates
maplineshapeLine shape in planar coordinates
mappolyshapePolygon in planar coordinates
geopointGeographic point vector
geoshapeGeographic shape vector
mappointPlanar point vector
mapshapePlanar shape vector


Vector Data Representations

Create Geospatial Tables

Geospatial tables contain shapes and attributes for point, line, and polygon data. Import geospatial tables from vector data files, convert tables to geospatial tables, or create geospatial tables from arrays.

Geographic Data Structures

A geographic data structure stores geographic features as elements in a structure array. The structure has fields such as the geometry of the vector feature, and the coordinates of points in the vector.

Modify and Analyze Vector Data

Create and Display Polygons

Display polygons using map or geographic coordinates.

Simplify Vector Coordinate Data

Eliminate visually redundant coordinates to remove unnecessary detail, and to speed and stylize map displays.

Geographic Interpolation of Vectors

Geographic data interpolation infers the value of geographic data at locations between sampled data points.

Vector Intersections

Calculate the intersections of vector data, circles, and rhumb lines.

Related Information