Function Reference


Geospatial Data Import and AccessReaders, writers and associated utilities for geospatial file and data product formats
Vector Map Data and Geographic Data StructuresManipulating polygons, geographic data structures and other vector geodata
Georeferenced Images and Data GridsConstructing, georeferencing, analyzing, and manipulating raster geodata
Map Projections and CoordinatesSpecifying, using, and analyzing map projections and geospatial coordinate transformations
Map Display and InteractionDisplaying geographic objects on maps and interacting with them
Geographic CalculationsPlane, spherical and ellipsoidal geometry
UtilitiesBasic tasks, including time, angle, and distance conversions
Graphical User Interface FunctionsGUI tools for selecting data and directly manipulating the content and appearance of maps

Geospatial Data Import and Access

Standard File FormatsReading and writing vector and raster geodata in widely used exchange formats
Gridded Terrain and Bathymetry ProductsFor reading raster data products distributed in special file formats
Vector Map ProductsFor reading vector data products distributed in special file formats
Miscellaneous Data SetsFor reading other data products distributed in special file formats
GUIs for Data ImportGUIs for browsing data products and selecting areas and objects of interest
File Reading UtilitiesLow-level access functions for text and other data files
Ellipsoids, Radii, Areas, and VolumesGeometric parameters of Earth, planets, Sun, and Moon

Standard File Formats

arcgridreadRead gridded data set in Arc ASCII Grid Format
geotiffinfoInformation about GeoTIFF file
geotiffreadRead georeferenced image from GeoTIFF file
getworldfilenameDerive worldfile name from image filename
kmlwriteWrite geographic data to KML file
makeattribspecAttribute specification from geographic data structure
sdtsdemreadRead data from SDTS raster/DEM data set
sdtsinfoInformation about SDTS data set
shapeinfoInformation about shapefile
shapereadRead vector features and attributes from shapefile
shapewriteWrite geographic data structure to shapefile
worldfilereadRead worldfile and return referencing matrix
worldfilewriteConstruct worldfile from referencing matrix

Gridded Terrain and Bathymetry Products

dtedRead U.S. Department of Defense Digital Terrain Elevation Data (DTED)
dtedsDTED filenames for latitude-longitude quadrangle
etopoRead global 5-min or 2-min digital terrain data
globedemRead Global Land One-km Base Elevation (GLOBE) data
globedemsGLOBE data filenames for latitude-longitude quadrangle
gtopo30Read 30-arc-second global digital elevation data (GTOPO30)
gtopo30sGTOPO30 data filenames for latitude-longitude quadrangle
satbathRead 2-minute terrain/bathymetry from Smith and Sandwell
tbaseRead 5-minute global terrain elevations from TerrainBase
usgs24kdemRead USGS 7.5-minute (30-m or 10-m) Digital Elevation Models
usgsdemRead USGS 1-degree (3-arc-second) Digital Elevation Model
usgsdemsUSGS 1-degree (3-arc-sec) DEM filenames for latitude-longitude quadrangle

Vector Map Products

dcwdataRead selected DCW worldwide basemap data
dcwgazSearch DCW worldwide basemap gazette file
dcwreadRead DCW worldwide basemap file
dcwrheadRead DCW worldwide basemap file headers
fipsnameRead Federal Information Processing Standard (FIPS) name file used with TIGER thinned boundary files
gshhsRead Global Self-Consistent Hierarchical High-Resolution Shoreline
tgrlineRead TIGER/Line data
vmap0dataRead selected data from Vector Map Level 0
vmap0readRead Vector Map Level 0 file
vmap0rheadRead Vector Map Level 0 file headers

Miscellaneous Data Sets

avhrrgoodeRead AVHRR data product stored in Goode Projection
avhrrlambertRead AVHRR data product stored in eqaazim projection
egm96geoidRead 15-minute gridded geoid heights from EGM96
readfk5Read Fifth Fundamental Catalog of Stars

GUIs for Data Import

demdatauiUI for selecting digital elevation data
vmap0uiUI for selecting data from Vector Map Level 0

File Reading Utilities

grepfieldsIdentify matching fields in fixed record length files
readfieldsRead fields or records from fixed-format files
readmtxRead matrix stored in file
spcreadRead columns of data from ASCII text file

Ellipsoids, Radii, Areas, and Volumes

almanacParameters for Earth, planets, Sun, and Moon

Vector Map Data and Geographic Data Structures

Geographic Data StructuresFor updating and obtaining fields from data structures
Data ManipulationFor altering, combining, and analyzing polygon and line data
Utilities for NaN-Separated Polygons and LinesFor structuring vectors defining multiple line or polygon objects

Geographic Data Structures

extractfieldField values from structure array
extractmCoordinate data from line or patch display structure
updategeostructConvert line or patch display structure to geostruct

Data Manipulation

buffermBuffer zones for latitude-longitude polygons
flatearthpolyInsert points along date line to pole
interpmDensify latitude-longitude sampling in lines or polygons
intrplatInterpolate latitude at given longitude
intrplonInterpolate longitude at given latitude
ispolycwTrue if polygon vertices are in clockwise order
nanclipClip vector data with NaNs at specified pen-down locations
poly2ccwConvert polygon contour to counterclockwise vertex ordering
poly2cwConvert polygon contour to clockwise vertex ordering
poly2fvConvert polygonal region to patch faces and vertices
polycutPolygon branch cuts for holes
polymergeMerge line segments with matching endpoints
reducemReduce density of points in vector data

Utilities for NaN-Separated Polygons and Lines

closePolygonPartsClose all rings in multipart polygon
isShapeMultipartTrue, if polygon or line has multiple parts
polyjoinConvert line or polygon parts from cell arrays to vector form
polysplitConvert line or polygon parts from vector form to cell arrays
removeExtraNanSeparatorsClean up NaN separators in polygons and lines

Georeferenced Images and Data Grids

Spatial ReferencingComputing bounds and converting between geographic and raster coordinates for spatially referenced images and grids
Terrain AnalysisComputing slope, aspect, lines of sight, and terrain visibility
Other Analysis/AccessComputing areas and profiles, and selecting subsets of values from data grids
Construction and ModificationConstructing, encoding, seeding, reorienting, and converting data grids
InitializationGenerating data grids containing uniform values

Spatial Referencing

latlon2pixConvert latitude-longitude coordinates to pixel coordinates
limitmDetermine latitude and longitude limits of regular data grid
makerefmatConstruct affine spatial-referencing matrix
map2pixConvert map coordinates to pixel coordinates
mapbboxCompute bounding box of georeferenced image or data grid
mapoutlineCompute outline of georeferenced image or data grid
meshgratConstruct map graticule for surface object display
pix2mapConvert pixel coordinates to map coordinates
pixcentersCompute pixel centers for georeferenced image or data grid
refmat2vecConvert referencing matrix to referencing vector
refvec2matConvert referencing vector to referencing matrix
setltlnConvert data grid rows and columns to latitude-longitude
setpostnConvert latitude-longitude to data grid rows and columns

Terrain Analysis

gradientmCalculate gradient, slope and aspect of data grid
los2Line-of-sight visibility between two points in terrain
viewshedAreas visible from point on terrain elevation grid

Other Analysis/Access

areamatSurface area covered by nonzero values in binary data grid
filtermFilter latitudes and longitudes based on underlying data grid
findmLatitudes and longitudes of nonzero data grid elements
ltln2valExtract data grid values for specified locations
mapprofileInterpolate heights between waypoints on regular data grid

Construction and Modification

changemSubstitute values in data array
encodemFill in regular data grid from seed values and locations
geoloc2grid Convert geolocated data array to regular data grid
imbedmEncode data points into regular data grid
neworigOrient regular data grid to oblique aspect
resizemResize regular data grid
sizemRow and column dimensions needed for regular data grid
vec2mtxConvert latitude-longitude vectors to regular data grid

Initialization

nanmConstruct regular data grid of NaNs
onemConstruct regular data grid of 1s
spzeromConstruct sparse regular data grid of 0s
zeromConstruct regular data grid of 0s

Map Projections and Coordinates

Available Map ProjectionsLists of map projections and characteristics
Map Projection TransformationsForward and inverse map projection functions
Map TrimmingFor trimming lines, polygons, and data grids to latitude-longitude quadrangles
Angles, Scales, and DistortionsComputing directions, angles, and distortions on projected maps
Visualizing Map DistortionsGenerating displays of distortion statistics and Tissot ellipses
UTM SystemSelecting zones and ellipsoids for the Universal Transverse Mercator system
Rotating Coordinates on the SphereReorienting map data by solid-body rotations on the sphere
Trimming and ClippingRemoving and replacing data that extends outside a map frame

For specific map projections, see Map Projections Reference.

Available Map Projections

maplistAvailable Mapping Toolbox™ map projections
mapsList available map projections and verify names
projlistMap projections supported by projfwd and projinv

Map Projection Transformations

mfwdtranProject geographic features to map coordinates
minvtranUnproject features from map to geographic coordinates
projfwd Forward map projection using PROJ.4 map projection library
projinvInverse map projection using PROJ.4 map projection library

Map Trimming

maptrimlTrim lines to latitude-longitude quadrangle
maptrimpTrim polygons to latitude-longitude quadrangle
maptrimsTrim regular data grid to latitude-longitude quadrangle

Angles, Scales, and Distortions

distortcalcDistortion parameters for map projections
vfwdtranDirection angle in map plane from azimuth on ellipsoid
vinvtranAzimuth on ellipsoid from direction angle in map plane

Visualizing Map Distortions

mdistortDisplay contours of constant map distortion
tissotProject Tissot indicatrices on map axes

UTM System

utmgeoidSelect ellipsoids for given UTM zone
utmzoneSelect UTM zone given latitude and longitude

Rotating Coordinates on the Sphere

newpoleOrigin vector to place specific point at pole
org2polLocation of north pole in rotated map
putpoleOrigin vector to place north pole at specified point

Trimming and Clipping

clipdataClip data at +/-pi in longitude, +/-pi in latitude
trimcartTrim graphic objects to map frame
trimdataTrim map data exceeding projection limits
undoclipRemove object clips introduced by clipdata
undotrimRemove object trims introduced by trimdata

Map Display and Interaction

Map Creation and High-Level DisplayTop-level functions that create map axes, project map data onto them, and control symbolization
Vector SymbolizationFunctions that draw symbols for points, lines, and polygons (coordinate lists and geostructs)
Displaying Lines and ContoursLower level line plotting and higher level contour plotting functions
Displaying Patch DataLower-level functions for plotting polygons as patches on map axes
Displaying Data GridsFor mapping regular and geolocated data grids in 2-D and 3-D
Displaying Light Objects and Lighted SurfacesFor mapping regular and geolocated data grids using lighting and shading
Displaying Thematic MapsFor making scatter, quiver, comet, and stem maps
Annotating Map DisplaysFor adding north arrows, graphic scales, text and other annotations to maps
Colormaps for Map DisplaysFor constructing colormaps appropriate for map displays
Interactive Map PositionsFor graphic interaction with data in map axes
Interactive Track and Circle DefinitionFor constructing great and small circles, rhumb lines and other geographic tracks
Graphical User InterfacesGUIs for specific functions and general GUIs for interactive mapping
Map Object and Projection PropertiesFor querying, setting, and modifying map axes objects and properties
Controlling Map AppearanceFor controlling the view and map scale
Clearing Map Displays/Managing VisibilityFor showing, hiding, and removing objects from map axes

Map Creation and High-Level Display

axesmDefine map axes and set map properties
displaymDisplay geographic data from display structure
geoshowDisplay map latitude and longitude data
grid2image Display regular data grid as image
mapviewInteractive map viewer
usamapConstruct map axes for United States of America
worldmapConstruct map axes for given region of world

Vector Symbolization

makesymbolspecConstruct vector layer symbolization specification

Displaying Lines and Contours

contour3mProject 3-D contour plot of map data
contourfmProject filled 2-D contour plot of map data
contourmProject 2-D contour plot of map data
linemProject line object on map axes
plot3mProject 3-D lines and points on map axess
plotmProject 2-D lines and points on map axes

Displaying Patch Data

fill3mProject filled 3-D patch objects on map axes
fillmProject filled 2-D patch objects on map axes
patchesmProject patches on map axes as individual objects
patchmProject patch objects on map axes

Displaying Data Grids

meshmProject regular data grid on map axes
pcolormProject regular data grid on map axes in z = 0 plane
surfacemProject and add geolocated data grid to current map axes
surfmProject geolocated data grid on map axes

Displaying Light Objects and Lighted Surfaces

lightmProject light objects on map axes
meshlsrm3-D lighted shaded relief of regular data grid
shaderelConstruct cdata and colormap for shaded relief
surflm3-D shaded surface with lighting on map axes
surflsrm3-D lighted shaded relief of geolocated data grid

Displaying Thematic Maps

comet3mProject 3-D comet plot on map axes
cometmProject 2-D comet plot on map axes
quivermProject 2-D quiver plot on map axes
scattermProject point markers with variable color and area
stem3mProject stem plot map on map axes
symbolmProject point markers with variable size

Annotating Map Displays

clabelmAdd contour label map contour display
framemToggle and control display of map frame
gridmToggle and control display of map grid
lcolorbarColorbar with text labels
mlabelToggle and control display of meridian labels
mlabelzero22piConvert meridian labels to 0-360 degree range
northarrowAdd graphic element pointing to geographic north pole
plabelToggle and control display of parallel labels
rotatetextRotate text to projected graticule
scalerulerAdd or modify graphic scale on map axes
textmProject text annotation on map axes

Colormaps for Map Displays

contourcmapContour colormap and colorbar current axes
demcmapColormaps appropriate to terrain elevation data
polcmapColormaps appropriate to political regions

Interactive Map Positions

gcpmapCurrent mouse point from map axes
gtextmPlace text on map using mouse
inputmLatitudes and longitudes of mouse-click locations

Interactive Track and Circle Definition

scirclegSmall circle defined via mouse input
sectorgSector of small circle defined via mouse input
trackgGreat circle or rhumb line defined via mouse input

Graphical User Interfaces

clrmenuAdd colormap menu to figure window
colormCreate index map colormaps
coloruiInteractively define RGB color
getseedsInteractively assign seeds for data grid encoding
lightmuiControl position of lights on globe or 3-D map
maptoolAdd menu activated tools to map figure
maptrimInteractively trim and convert map data from vector to raster format
mlayersGUI to control plotting of display structure elements
mobjectsManipulate object sets displayed on map axes
originuiInteractively modify map origin
panzoomPan and zoom on map axes
paralleluiInteractively modify map parallels
qrydataGUI to interactively perform data queries
rootlayrConstruct cell array of workspace variables for mlayers tool
seedmGUI to fill data grids with seeded values
surfdistInteractive distance, azimuth, and reckoning calculations
uimaptbxHandle buttondown callbacks for mapped objects
utmzoneuiChoose or identify UTM zone by clicking map

Map Object and Projection Properties

cart2grnTransform projected coordinates to Greenwich system
defaultmInitialize or reset projection properties to default values
gcmCurrent map projection structure
geotiff2mstructConvert GeoTIFF information to map projection structure
getmMap object properties
handlemHandles of displayed map objects
ismapTrue for axes with map projection
ismappedTrue, if object is projected on map axes
makemappedConvert ordinary graphics object to mapped object
namemDetermine names of valid graphics objects
projectProject displayed map graphics object
restackRestack objects within map axes
rotatemTransform vector map data to new origin and orientation
setmSet properties of map axes and graphics objects
tagmSet Tag property of map graphics object
zdatamAdjust z-plane of displayed map objects

Controlling Map Appearance

axesscaleResize axes for equivalent scale
camposmSet camera position using geographic coordinates
camtargmSet camera target using geographic coordinates
camupmSet camera up vector using geographic coordinates
daspectmControl vertical exaggeration in map display
paperscaleSet figure properties for printing at specified map scale
previewmapView map at printed size
tightmapRemove white space around map

Clearing Map Displays/Managing Visibility

clmaClear current map axes
clmoClear specified graphics objects from map axes
hidemHide specified graphic objects on map axes
showaxesToggle display of map coordinate axes
showmSpecify graphic objects to display on map axes

Geographic Calculations

Geometry of Sphere and EllipsoidDistances, deviations, areas, and curves on the sphere or ellipsoid
3-D CoordinatesFor converting between different 3-D coordinate systems
Ellipsoids and LatitudesFor converting ellipsoid parameters and auxiliary latitudes
Overlaying Geometric ObjectsFor determining if, how, and where points, lines, circles, and areas intersect
Geographic StatisticsFor computing geographic means, standard deviations, and histograms
NavigationFor determining positions, headings, drift, and navigational fixes and way points

Geometry of Sphere and Ellipsoid

antipodePoint on opposite side of globe
areaintSurface area of polygon on sphere or ellipsoid
areaquadSurface area of latitude-longitude quadrangle
azimuthAzimuth between points on sphere or ellipsoid
departureDeparture of longitudes at specified latitudes
distanceDistance between points on sphere or ellipsoid
ellipse1Geographic ellipse from center, semimajor axes, eccentricity, and azimuth
gc2scCenter and radius of great circle
meridianarcEllipsoidal distance along meridian
meridianfwdReckon position along meridian
reckonPoint at specified azimuth, range on sphere or ellipsoid
scircle1Small circles from center, range, and azimuth
scircle2Small circles from center and perimeter
track1Geographic tracks from starting point, azimuth, and range
track2Geographic tracks from starting and ending points

3-D Coordinates

ecef2geodeticConvert geocentric (ECEF) to geodetic coordinates
ecef2lvConvert geocentric (ECEF) to local vertical coordinates
elevationLocal vertical elevation angle, range, and azimuth
geodetic2ecefConvert geodetic to geocentric (ECEF) coordinates
lv2ecefConvert local vertical to geocentric (ECEF) coordinates

Ellipsoids and Latitudes

axes2eccEccentricity of ellipse with given axis lengths
convertlatConvert between geodetic and auxiliary latitudes
ecc2flatFlattening of ellipse with given eccentricity
ecc2nn-value of ellipse with given eccentricity
flat2eccEccentricity of ellipse with given flattening
geocentric2geodeticLatConvert geocentric to geodetic latitude
geodetic2geocentricLatConvert geodetic to geocentric latitude
majaxisSemimajor axis of ellipse given semiminor axis and eccentricity
minaxisSemiminor axis of ellipse given semimajor axis and eccentricity
n2eccEccentricity of ellipse with given n-value
rcurveRadii of curvature of ellipsoid
rsphereRadii of auxiliary spheres

Overlaying Geometric Objects

circcircIntersections of circles in Cartesian plane
gcxgcIntersection points for pairs of great circles
gcxscIntersection points for great and small circle pairs
ingeoquadTrue for points inside or on lat-lon quadrangle
intersectgeoquadIntersection of two latitude-longitude quadrangles
linecircIntersections of circles and lines in Cartesian plane
outlinegeoquadPolygon outlining geographic quadrangle
polyboolSet operations on polygonal regions
polyxpolyIntersection points for lines or polygon edges
rhxrhIntersection points for pairs of rhumb lines
scxscIntersection points for pairs of small circles

Geographic Statistics

combntnsAll possible combinations of set of values
eqa2grnConvert from equal area to Greenwich coordinates
grn2eqaConvert from Greenwich to equal area coordinates
histaHistogram for geographic points with equal-area bins
meanmMean location of geographic coordinates
stdistStandard distance for geographic points
stdmStandard deviation for geographic points

Navigation

crossfixCross-fix positions from bearings and ranges
dreckonDead reckoning positions for track
driftcorrHeading to correct for wind or current drift
driftvelWind or current from heading, course, and speeds
gcwayptsEqually spaced waypoints along great circle
legsCourses and distances between navigational waypoints
navfixMercator-based navigational fix
timezoneTime zone based on longitude
trackTrack segments to connect navigational waypoints

Utilities

Angle ConversionsFor converting angles between different units and encodings
Conversion Factors for Angles and DistancesFunction to compute factor for converting between units of distance and angles
Data PrecisionFor managing data precision
Distance ConversionsFor converting distances between different units and encodings
Image ConversionFunction for changing indexed images to uint8 true-color images
String FormattersFor formatting angles and distances as text suitable for annotations
Longitude or Azimuth WrappingFor forcing angles to lie within specified intervals

Angle Conversions

deg2radConvert angles from degrees to radians
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
fromDegrees Convert angles from degrees
fromRadians Convert angles from radians
rad2degConvert angle units from radians to degrees
str2angleConvert strings to angles in degrees
toDegrees Convert angles to degrees
toRadians Convert angles to radians

Conversion Factors for Angles and Distances

unitsratioUnit conversion factors

Data Precision

epsmAccuracy in angle units for certain map computations
roundnRound numbers to specified power of 10

Distance Conversions

deg2km, deg2nm, deg2smConvert distance from degrees to kilometers, nautical miles, or statute miles
km2deg, nm2deg, sm2degConvert from distance units to degrees
km2nm, km2sm, nm2km, nm2sm, sm2km, sm2nmConvert distance between kilometers and miles
km2rad, nm2rad, sm2radConvert from distance units to radians
rad2km, rad2nm, rad2smConvert distance from radians to kilometers, nautical miles, or statute miles

Image Conversion

ind2rgb8Convert indexed image to uint8 RGB image

String Formatters

angl2strFormat angle strings
dist2strFormat distance strings

Longitude or Azimuth Wrapping

unwrapMultipartUnwrap vector of angles with NaN-delimited parts
wrapTo180Wrap angle in degrees to [-180 180]
wrapTo2PiWrap angle in radians to [0 2*pi]
wrapTo360Wrap angle in degrees to [0 360]
wrapToPiWrap angle in radians to [-pi pi]

Graphical User Interface Functions

Map Definition ToolsSelecting vector and raster data, defining map axes, and projection parameters
Mapping ToolsDisplaying maps, manipulating layers, and querying map objects
Display Manipulation ToolsControlling zoom levels, colormaps, and lighting
Object Property ToolsShowing, hiding, tagging, and clearing objects, and customizing colormaps
Track ToolsPlotting small and great circles, rhumb lines, and other navigational tracks
Map Data Construction ToolsSetting limits, trimming maps, and seeding grid values

Map Definition Tools

axesm, axesmuiDefine map axes and modify map projection and display properties
demdatauiUI for selecting digital elevation data
originuiInteractively modify map origin
paralleluiInteractively modify map parallels
utmzoneuiChoose or identify UTM zone by clicking map
vmap0uiUI for selecting data from Vector Map Level 0

Mapping Tools

maptoolAdd menu activated tools to map figure
maptrimInteractively trim and convert map data from vector to raster format
mapviewInteractive map viewer
mlayersGUI to control plotting of display structure elements
mobjectsManipulate object sets displayed on map axes
qrydataGUI to interactively perform data queries

Display Manipulation Tools

clrmenuAdd colormap menu to figure window
hidem-uiHide specified mapped objects
lightmuiControl position of lights on globe or 3-D map
panzoomPan and zoom on map axes

Object Property Tools

clmoClear specified graphics objects from map axes
coloruiInteractively define RGB color
handlemHandles of displayed map objects
handlem-uiGUI for handles of specified mapped objects
hidemHide specified graphic objects on map axes
property editors GUIs to edit properties of mapped objects
showmSpecify graphic objects to display on map axes
tagmSet Tag property of map graphics object
zdatamAdjust z-plane of displayed map objects

Track Tools

scirclegSmall circle defined via mouse input
scircluiGUI to display small circles on map axes
sectorgSector of small circle defined via mouse input
surfdistInteractive distance, azimuth, and reckoning calculations
trackgGreat circle or rhumb line defined via mouse input
trackuiGUI to display great circles and rhumb lines on map axes

Map Data Construction Tools

colormCreate index map colormaps
seedmGUI to fill data grids with seeded values
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS