Main Content

Vector Data

Analyze and transform point, line, and polygon data


closePolygonPartsClose all rings in multipart polygon
extractfieldField values from structure array
interpmDensify latitude-longitude sampling in lines or polygons
intrplatInterpolate latitude at given longitude
intrplonInterpolate longitude at given latitude
isShapeMultipartTrue if polygon or line has multiple parts
linecircIntersections of circles and lines in Cartesian plane
circcircIntersections of circles in Cartesian plane
maptrimlTrim lines to latitude-longitude quadrangle
maptrimpTrim polygons to latitude-longitude quadrangle
reducemReduce density of points in vector data
removeExtraNanSeparatorsClean up NaN separators in polygons and lines
nanclipClip vector data with NaNs at specified pen-down locations
buffermBuffer zones for latitude-longitude polygons
flatearthpolyClip polygon to world limits
ispolycwTrue if polygon vertices are in clockwise order
poly2ccwConvert polygon contour to counterclockwise vertex ordering
poly2cwConvert polygon contour to clockwise vertex ordering
poly2fvConvert polygonal region to patch faces and vertices
polyboolSet operations on polygonal regions
polyshape2-D polygons
polyxpolyIntersection points for lines or polygon edges
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
updategeostructConvert line or patch display structure to geostruct
cart2grnTransform projected coordinates to Greenwich system
grn2eqaConvert from Greenwich to equal area coordinates
eqa2grnConvert from equal area to Greenwich coordinates


geopointGeographic point vector
geoshapeGeographic shape vector
mappointPlanar point vector
mapshapePlanar shape vector


Vector Geodata

Vector geodata consists of sequentially ordered pairs of geographic (latitude, longitude) or projected (x,y) coordinate pairs.

Inspect and Display Vector Map Data

This example shows how to display vector data on a map, and how to print to screen the coordinates of points in the vector data.

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.

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.