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 |
---|---|---|---|
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 | |
Read AVHRR GLCC and NDVI data products stored in the Lambert Conformal Conic projection | raster | geolocated | |
List DTED data grid file names for a specified latitude-longitude quadrangle | file names | geo | |
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 |
Get information about GeoTIFF files | properties | map geo | |
Write GeoTIFF file | raster | map geo | |
Derive a world file name from an image file name | file name | geo map | |
List GLOBE data file names for a specified latitude-longitude quadrangle | file names | geo | |
Read Global Self-Consistent Hierarchical High-Resolution Geography (GSHHG) data | vector | geo | |
List GTOPO30 data file names for a specified latitude-longitude quadrangle | file names | geo | |
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 |
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 | |
Read geographic feature coordinates and associated attributes from a shapefile | vector | geo map | |
Write geospatial data and associated attributes in shapefile format | vector | geo map | |
List USGS digital elevation model (DEM) file names covering a specified latitude-longitude quadrangle | file names | map | |
Extract selected data from the Vector Map Level 0 (VMAP0) CD-ROMs | vector | geo | |
Read a VMAP0 file | vector | geo | |
Read VMAP0 file headers | properties | geo | |
Read a world file and return a referencing matrix | georeferencing information | geo | |
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.