Main Content

Functions that Read and Write Geospatial Data

The following table lists Mapping Toolbox™ functions that read geospatial data products and file formats and write geospatial data files. Note that the geoshow and mapshow functions and the mapview GUI can read and display both vector and raster geodata files in several formats. Click function names to see their details in the Mapping Toolbox reference documentation. The Type of Coordinates column describes whether the function returns or writes data in geographic ("geo") or projected ("map") coordinates, or as geolocated data grids (which, for the functions listed, all contain geographic coordinates). Some functions can return either geographic or map coordinates, depending on what the file being read contains; these functions do not signify what type of coordinates they return (in the case of shaperead, however, you can specify whether the structure it returns should have X and Y or Lon and Lat fields).

Function

Description

Type of Data

Type of Coordinates

avhrrgoode

Read data products derived from the Advanced Very High Resolution Radiometer (AVHRR) and stored in the Goode Homosoline projection: Global Land Cover Classification (GLCC) or Normalized Difference Vegetation Index (NDVI)

raster

geolocated

avhrrlambert

Read AVHRR GLCC and NDVI data products stored in the Lambert Conformal Conic projection

raster

geolocated

dcwdata

Read selected data from the Digital Chart of the World (DCW)

vector

geo

dcwgaz

Search for entries in the DCW gazette

vector

geo

dcwread

Read a DCW file

vector

geo

dcwrhead

Read a DCW file header

properties

geo

demdataui

GUI for interactively selecting data from various Digital Elevation Models (DEMs)

raster

geo

dteds

List DTED data grid file names for a specified latitude-longitude quadrangle

file names

geo

egm96geoid

Read 15-minute gridded geoid heights from the EGM96 geoid model

raster

geo

fipsname

Read Federal Image Processing Standards (FIPS) names for Topographically Integrated Geographic Encoding and Referencing (TIGER) thinned boundary files

FIPS names and identifiers

geo

georasterinfo

Get information about data files in formats such as Esri Binary Grid, Esri GridFloat, DTED, GeoTIFF, and GPX

raster

map

geo

geotiffinfo

Get information about GeoTIFF files

properties

map

geo

geotiffwrite

Write GeoTIFF file

raster

map

geo

getworldfilename

Derive a world file name from an image file name

file name

geo

map

globedems

List GLOBE data file names for a specified latitude-longitude quadrangle

file names

geo

gshhs

Read Global Self-Consistent Hierarchical High-Resolution Geography (GSHHG) data

vector

geo

gtopo30s

List GTOPO30 data file names for a specified latitude-longitude quadrangle

file names

geo

kmlwrite

Write vector coordinates and attributes to a file in KML format

vector points and attributes

geo

readfk5

Read data from the Fifth Fundamental Catalog of Stars

vector

astro

readgeoraster

Read data in formats such as Esri Binary Grid, Esri GridFloat, DTED, GeoTIFF, and GPX

raster

geo

map

sdtsinfo

Get information about SDTS data set

properties

geo

shapeinfo

Get information about the geometry and attributes of geographic features stored in a shapefile (a set of ".shp", ".shx" and ".dbf" files)

properties

geo

map

shaperead

Read geographic feature coordinates and associated attributes from a shapefile

vector

geo

map

shapewrite

Write geospatial data and associated attributes in shapefile format

vector

geo

map

usgsdems

List USGS digital elevation model (DEM) file names covering a specified latitude-longitude quadrangle

file names

map

vmap0data

Extract selected data from the Vector Map Level 0 (VMAP0) CD-ROMs

vector

geo

vmap0read

Read a VMAP0 file

vector

geo

vmap0rhead

Read VMAP0 file headers

properties

geo

vmap0ui

Activate GUI for interactively selecting VMAP0 data

vector

geo

worldfileread

Read a world file and return a referencing matrix

georeferencing information

geo

worldfilewrite

Export a referencing matrix into an equivalent world file

georeferencing information

geo

The MATLAB® environment provides many general file reading and writing functions (for example, imread, imwrite, urlread, and urlwrite) which you can use to access geospatial data you want to use with Mapping Toolbox software. For example, you can read a TIFF image with imread and its accompanying world file with worldfileread to import the image and construct a referencing matrix to georeference it. See the Mapping Toolbox examples Creating a Half-Resolution Georeferenced Image and Georeferencing an Image to an Orthotile Base Layer for examples of how you can do this.