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 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

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

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

readgeoraster

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

raster

geo

map

readgeotable

Read data in formats such as shapefile, GPX, Esri file geodatabase, KML, and GeoJSON

vector

geo

map

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

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 example Georeference an Image to an Orthotile Base Layer for an example of how you can do this.

Related Topics