Documentation

Mapping Toolbox Functions

File Import and Export

Standard File Formats

arcgridread Read gridded data set in Arc ASCII Grid Format
geotiff2mstruct Convert GeoTIFF information to map projection structure
geotiffinfo Information about GeoTIFF file
geotiffread Read GeoTIFF file
geotiffwrite Write GeoTIFF file
sdtsdemread Read data from SDTS raster/DEM data set
sdtsinfo Information about SDTS data set
worldfileread Read world file and return referencing object or matrix
worldfilewrite Write world file from referencing object or matrix
getworldfilename Derive worldfile name from image filename
gpxread Read GPX file
kmlwrite Write geographic data to KML file
kmlwriteline Write geographic line data to KML file
kmlwritepoint Write geographic point data to KML file
makeattribspec Attribute specification from geographic data structure
shapeinfo Information about shapefile
shaperead Read vector features and attributes from shapefile
shapewrite Write geographic vector data structure to shapefile
makedbfspec DBF specification from geographic data structure
imread Read image from graphics file
imwrite Write image to graphics file

Gridded Terrain and Bathymetry Products

demdataui UI for selecting digital elevation data
dted Read U.S. Department of Defense Digital Terrain Elevation Data (DTED)
dteds DTED filenames for latitude-longitude quadrangle
etopo Read gridded global relief data (ETOPO products)
etopo5 Read global 5-min digital terrain data
globedem Read Global Land One-km Base Elevation (GLOBE) data
globedems GLOBE data filenames for latitude-longitude quadrangle
gtopo30 Read 30-arc-second global digital elevation data (GTOPO30)
gtopo30s GTOPO30 data filenames for latitude-longitude quadrangle
satbath Read 2-minute terrain/bathymetry from Smith and Sandwell
tbase Read 5-minute global terrain elevations from TerrainBase
usgs24kdem Read USGS 7.5-minute (30-m or 10-m) Digital Elevation Models
usgsdem Read USGS 1-degree (3-arc-second) Digital Elevation Model
usgsdems USGS 1-degree (3-arc-sec) DEM filenames for latitude-longitude quadrangle

Specific Vector and Gridded Data Products

avhrrgoode Read AVHRR data product stored in Goode Projection
avhrrlambert Read AVHRR data product stored in eqaazim projection
egm96geoid Read 15-minute gridded geoid heights from EGM96
gshhs Read Global Self-Consistent Hierarchical High-Resolution Shoreline
vmap0data Read selected data from Vector Map Level 0
vmap0read Read Vector Map Level 0 file
vmap0rhead Read Vector Map Level 0 file headers
vmap0ui UI for selecting data from Vector Map Level 0

Web Maps

Web Map Service

WebMapServer Web map server object
WMSCapabilities Web Map Service capabilities object
WMSLayer Web Map Service layer object
WMSMapRequest Web Map Service map request object
wmsfind Search local database for Web map servers and layers
wmsinfo Information about WMS server from capabilities document
wmsread Retrieve WMS map from server
wmsupdate Synchronize WMSLayer object with server

Web Map Display

webmap Open web map
wmclose Close web map
wmprint Print web map
wmmarker Display geographic marker on web map
wmline Display geographic line on web map
wmremove Remove overlay on web map
wmcenter Set or obtain web map center point
wmzoom Set or obtain zoom level of web map
wmlimits Set or obtain web map limits

Map Display

Map Layout and Axes

Defining Properties

axesm Define map axes and set map properties
axesmui Define map axes and modify map projection and display properties
clma Clear current map axes
gcm Current map projection structure
getm Map object properties
handlem Handles of displayed map objects
handlem-ui GUI for handles of specified mapped objects
ismap True for axes with map projection
setm Set properties of map axes and graphics objects
showaxes Toggle display of map coordinate axes
tightmap Remove white space around map
usamap Construct map axes for United States of America
worldmap Construct map axes for given region of world
namem Names of graphics objects
tagm Set Tag property of map graphics object

Map Frame

framem Toggle and control display of map frame
ingeoquad True for points inside or on lat-lon quadrangle

Map Graticule

gridm Toggle and control display of graticule lines

Annotations

angl2str Format angle strings
mlabel Toggle and control display of meridian labels
mlabelzero22pi Convert meridian labels to 0-360 degree range
northarrow Add graphic element pointing to geographic North Pole
plabel Toggle and control display of parallel labels
rotatetext Rotate text to projected graticule
scaleruler Add or modify graphic scale on map axes

Vector and Raster Map Display

geoshow Display map latitude and longitude data
grid2image Display regular data grid as image
linem Project line object on map axes
makesymbolspec Construct vector layer symbolization specification
mapshow Display map data without projection
meshm Project regular data grid on map axes
pcolorm Project regular data grid on map axes in z = 0 plane
plotm Project 2-D lines and points on map axes
plot3m Project 3-D lines and points on map axes
surfm Project geolocated data grid on map axes
usamap Construct map axes for United States of America
worldmap Construct map axes for given region of world

3-D Map Display

Shading and Lighting

camposm Set camera position using geographic coordinates
camtargm Set camera target using geographic coordinates
camupm Set camera up vector using geographic coordinates
daspectm Control vertical exaggeration in map display
demcmap Colormaps appropriate to terrain elevation data
lightm Project light objects on map axes
meshlsrm 3-D lighted shaded relief of regular data grid
shaderel Construct cdata and colormap for shaded relief
surflm 3-D shaded surface with lighting on map axes
surflsrm 3-D lighted shaded relief of geolocated data grid

Draping Images on Terrain

surfacem Project and add geolocated data grid to current map axes
zdatam Adjust z-plane of displayed map objects

Contour Maps

clabelm Add contour labels to map contour display
clegendm Add legend labels to map contour display
contourcbar Color bar for filled contour map display
contourcmap Contour colormap and colorbar for current axes
contourm Project 2-D contour plot of map data
contour3m Project 3-D contour plot of map data
contourfm Project filled 2-D contour plot of map data

Thematic Maps

quiverm Project 2-D quiver plot on map axes
quiver3m Project 3-D quiver plot on map axes
scatterm Project point markers with variable color and area
stem3m Project stem plot map on map axes
symbolm Project point markers with variable size

Interaction with Maps

clrmenu Add colormap menu to figure window
gcpmap Current mouse point from map axes
gtextm Place text on map using mouse
inputm Latitudes and longitudes of mouse-click locations
maptool Add menu-activated tools to map figure
maptrim Interactively trim and convert map data from vector to raster format
mapview Interactive map viewer
originui Interactively modify map origin
parallelui Interactively modify map parallels

Data Analysis

Vector Data

bufferm Buffer zones for latitude-longitude polygons
closePolygonParts Close all rings in multipart polygon
extractfield Field values from structure array
flatearthpoly Insert points along date line to pole
interpm Densify latitude-longitude sampling in lines or polygons
intrplat Interpolate latitude at given longitude
intrplon Interpolate longitude at given latitude
isShapeMultipart True if polygon or line has multiple parts
linecirc Intersections of circles and lines in Cartesian plane
polcmap Colormaps appropriate to political regions
polyjoin Convert line or polygon parts from cell arrays to vector form
polymerge Merge line segments with matching endpoints
polysplit Convert line or polygon parts from vector form to cell arrays
reducem Reduce density of points in vector data
removeExtraNanSeparators Clean up NaN separators in polygons and lines
ispolycw True if polygon vertices are in clockwise order
poly2ccw Convert polygon contour to counterclockwise vertex ordering
poly2cw Convert polygon contour to clockwise vertex ordering
poly2fv Convert polygonal region to patch faces and vertices
polybool Set operations on polygonal regions
polyxpoly Intersection points for lines or polygon edges
geopoint Geographic point vector
geoshape Geographic shape vector
mappoint Planar point vector
mapshape Planar shape vector

Raster Data and Representations

map.rasterref.GeographicRasterReference Reference raster to geographic coordinates
map.rasterref.MapRasterReference Reference raster to map coordinates
geoloc2grid Convert geolocated data array to regular data grid
imbedm Encode data points into regular data grid
ltln2val Extract data grid values for specified locations
mapoutline Compute outline of georeferenced image or data grid
resizem Resize regular data grid
limitm Determine latitude and longitude limits of regular data grid
georasterref Construct geographic raster reference object
makerefmat Construct affine spatial-referencing matrix
maprasterref Construct map raster reference object
refmatToGeoRasterReference Referencing matrix to geographic raster reference object
refmatToMapRasterReference Referencing matrix to map raster reference object
refmatToWorldFileMatrix Convert referencing matrix to world file matrix
refvecToGeoRasterReference Referencing vector to geographic raster reference object
worldFileMatrixToRefmat Convert world file matrix to referencing matrix

Conversion Between Vector and Raster Data

mapprofile Interpolate between waypoints on regular data grid
vec2mtx Convert latitude-longitude vectors to regular data grid

Terrain Data Analysis

gradientm Calculate gradient, slope and aspect of data grid
los2 Line-of-sight visibility between two points in terrain
viewshed Areas visible from point on terrain elevation grid

Coordinates, Geodesy, and Projections

Modeling the Earth

wgs84Ellipsoid Reference ellipsoid for World Geodetic System 1984
earthRadius Mean radius of planet Earth
rcurve Ellipsoidal radii of curvature
rsphere Radii of auxiliary spheres
geocentricLatitude Convert geodetic to geocentric latitude
parametricLatitude Convert geodetic to parametric latitude
geodeticLatitudeFromGeocentric Convert geocentric to geodetic latitude
geodeticLatitudeFromParametric Convert parametric to geodetic latitude
axes2ecc Eccentricity of ellipse from axes lengths
majaxis Semimajor axis of ellipse
minaxis Semiminor axis of ellipse
ecc2flat Flattening of ellipse from eccentricity
flat2ecc Eccentricity of ellipse from flattening
ecc2n Third flattening of ellipse from eccentricity
n2ecc Eccentricity of ellipse from third flattening
oblateSpheroid Oblate ellipsoid of revolution
referenceEllipsoid Reference ellipsoid
referenceSphere Reference sphere
map.geodesy.AuthalicLatitudeConverter Convert between geodetic and authalic latitudes
map.geodesy.ConformalLatitudeConverter Convert between geodetic and conformal latitudes
map.geodesy.IsometricLatitudeConverter Convert between geodetic and isometric latitudes
map.geodesy.RectifyingLatitudeConverter Convert between geodetic and rectifying latitudes

Lengths and Angles

deg2rad Convert angles from degrees to radians
rad2deg Convert angles from radians to degrees
degrees2dm Convert degrees to degrees-minutes
degrees2dms Convert degrees to degrees-minutes-seconds
dm2degrees Convert degrees-minutes to degrees
dms2degrees Convert degrees-minutes-seconds to degrees
toDegrees Convert angles to degrees
toRadians Convert angles to radians
fromDegrees Convert angles from degrees
fromRadians Convert angles from radians
km2nm Convert kilometers to nautical miles
km2sm Convert kilometers to statute miles
nm2km Convert nautical miles to kilometers
nm2sm Convert nautical to statute miles
sm2km Convert statute miles to kilometers
sm2nm Convert statute to nautical miles
wrapTo180 Wrap angle in degrees to [-180 180]
wrapTo360 Wrap angle in degrees to [0 360]
wrapToPi Wrap angle in radians to [−pi pi]
wrapTo2Pi Wrap angle in radians to [0 2*pi]
unwrapMultipart Unwrap vector of angles with NaN-delimited parts
str2angle Convert strings to angles in degrees
map.geodesy.isdegree True if string matchesdegree and false if radian
validateLengthUnit Validate and standardize length unit string
unitsratio Unit conversion factors

Great Circles, Geodesics, and Rhumb Lines

azimuth Azimuth between points on sphere or ellipsoid
departure Departure of longitudes at specified latitudes
distance Distance between points on sphere or ellipsoid
gc2sc Center and radius of great circle
gcxgc Intersection points for pairs of great circles
gcxsc Intersection points for great and small circle pairs
meridianarc Ellipsoidal distance along meridian
meridianfwd Reckon position along meridian
reckon Point at specified azimuth, range on sphere or ellipsoid
rhxrh Intersection points for pairs of rhumb lines
track1 Geographic tracks from starting point, azimuth, and range
track2 Geographic tracks from starting and ending points
trackg Great circle or rhumb line defined via mouse input
trackui GUI to display great circles and rhumb lines on map axes

Small Circles, Ellipses, and Spherical Distance

ellipse1 Geographic ellipse from center, semimajor axes, eccentricity, and azimuth
deg2km Convert distance from degrees to kilometers
deg2nm Convert distance from degrees to nautical miles
deg2sm Convert distance from degrees to statute miles
gcxsc Intersection points for great and small circle pairs
km2deg Convert distance from kilometers to degrees
km2rad Convert distance from kilometers to radians
nm2deg Convert distance from nautical miles to degrees
nm2rad Convert distance from nautical miles to radians
rad2km Convert distance from radians to kilometers
rad2nm Convert distance from radians to nautical miles
rad2sm Convert distance from radians to statute miles
scircle1 Small circles from center, range, and azimuth
scircle2 Small circles from center and perimeter
scircleg Small circle defined via mouse input
scirclui GUI to display small circles on map axes
scxsc Intersection points for pairs of small circles
sectorg Sector of small circle defined via mouse input
sm2deg Convert distance from statute miles to degrees
sm2rad Convert distance from statute miles to radians

Zones, Lunes, Quadrangles, and Other Areas

areaint Surface area of polygon on sphere or ellipsoid
areamat Surface area covered by nonzero values in binary data grid
areaquad Surface area of latitude-longitude quadrangle
bufgeoquad Expand limits of geographic quadrangle
geoquadline Geographic quadrangle bounding multi-part line
geoquadpt Geographic quadrangle bounding scattered points
ingeoquad True for points inside or on lat-lon quadrangle
intersectgeoquad Intersection of two latitude-longitude quadrangles
outlinegeoquad Polygon outlining geographic quadrangle

Coordinate Systems

Intrinsic Coordinate Systems

map.rasterref.GeographicRasterReference Reference raster to geographic coordinates
map.rasterref.MapRasterReference Reference raster to map coordinates

Geographic Coordinate Systems

antipode Point on opposite side of globe
mfwdtran Project geographic features to map coordinates
minvtran Unproject features from map to geographic coordinates
newpole Origin vector to place specific point at pole
org2pol Location of north pole in rotated map
projfwd Forward map projection using PROJ.4 map projection library
projinv Inverse map projection using PROJ.4 map projection library
putpole Origin vector to place north pole at specified point
rotatem Transform vector map data to new origin and orientation

Projected Coordinate Systems

Projections and Parameters
defaultm Initialize or reset map projection structure
geotiff2mstruct Convert GeoTIFF information to map projection structure
maplist Available Mapping Toolbox map projections
maps List available map projections and verify names
mfwdtran Project geographic features to map coordinates
minvtran Unproject features from map to geographic coordinates
projlist Map projections supported by projfwd and projinv
vfwdtran Direction angle in map plane from azimuth on ellipsoid
vinvtran Azimuth on ellipsoid from direction angle in map plane
Map Scales and Distortions
clipdata Clip data at +/-pi in longitude, +/-pi in latitude
distortcalc Distortion parameters for map projections
maptriml Trim lines to latitude-longitude quadrangle
maptrimp Trim polygons to latitude-longitude quadrangle
maptrims Trim regular data grid to latitude-longitude quadrangle
mdistort Display contours of constant map distortion
tissot Project Tissot indicatrices on map axes
Universal Transverse Mercator System
utmgeoid Select ellipsoids for given UTM zone
utmzone Select UTM zone given latitude and longitude
utmzoneui Choose or identify UTM zone by clicking map

3-D Coordinate Systems

geodetic2ecef Convert geodetic to geocentric (ECEF) coordinates
ecef2geodetic Convert geocentric (ECEF) to geodetic coordinates
geodetic2aer Geodetic to local spherical AER
aer2geodetic Local spherical AER to geodetic
ecef2aer Geocentric ECEF to local spherical AER
aer2ecef Local spherical AER to geocentric ECEF
geodetic2enu Geodetic to local Cartesian ENU
enu2geodetic Local Cartesian ENU to geodetic
aer2enu Local spherical AER to local Cartesian ENU
enu2aer Local Cartesian ENU to local spherical AER
ecef2enu Geocentric ECEF to local Cartesian ENU
enu2ecef Local Cartesian ENU to geocentric ECEF
ecef2enuv Rotate vector from geocentric ECEF to local ENU
enu2ecefv Rotate vector from local ENU to geocentric ECEF
geodetic2ned Geodetic to local Cartesian NED
ned2geodetic Local Cartesian NED to geodetic
aer2ned Local spherical AER to local Cartesian NED
ned2aer Local Cartesian NED to local spherical AER
ecef2ned Geocentric ECEF to local Cartesian NED
ned2ecef Local Cartesian NED to geocentric ECEF
ecef2nedv Rotate vector from geocentric ECEF to local NED
ned2ecefv Rotate vector from local NED to geocentric ECEF
Was this topic helpful?