Main Content

Supported Geospatial File Formats for Import and Export

This topic shows the geospatial file formats that you can import and export using Mapping Toolbox™. For information about supported file formats that do not contain geospatial information, see Supported File Formats for Import and Export.

Mapping Toolbox enables you to import and export data in raster and vector formats. Raster data stores information as arrays. Vector data stores information as points, lines, and polygons, as well as their nonspatial attributes.

Supported Import Formats

Raster Data

Read a geospatial raster data file by using the readgeoraster function. The readgeoraster function supports these file formats.

  • GeoTIFF (.tif or .tiff)

  • Esri Binary Grid (.adf)

  • Esri ASCII Grid (.asc or .grd)

  • Esri GridFloat (.flt)

  • GRIB (.grb, .grib, .grib2) (since R2023b)

  • DTED (.dt0, .dt1, or .dt2)

  • SDTS (.DDF)

  • USGS DEM (.dem)

  • SRTM Height (.hgt)

  • Vertical Mapper Numeric Grid (.grd)

  • Vertical Mapper Classified Grid (.grc)

  • ER Mapper ERS (.ers)

  • ENVI (.dat)

  • ERDAS IMAGINE (.img)

  • Geospatially referenced JPEG 2000 (.jp2) (since R2023b)

The extension of a file does not always indicate its file format. If you do not know the format of your file, ask your data provider. In some cases, you can read files in supported formats when they have no extensions or have extensions other than the ones listed.

Read an image file that is spatially referenced by a world file by using the imread and worldfileread functions. Read the image file using imread and read the world file using worldfileread. Examples of world file extensions are .tfw, .jpegw, .wld, and .pgw.

Vector Data

Read a geospatial vector data file by using the readgeotable function. The readgeotable function supports these file formats.

  • Esri file geodatabase (.gdb)

  • GeoJSON (.json or .geojson)

  • GPX (.gpx)

  • KML (.kml)

  • KMZ (.kmz) (since R2023b)

  • OpenStreetMap® (.osm, .osm.pbf) (since R2023b)

  • Shapefile (.shp)

Supported Export Formats

Raster Data

Export raster data from the MATLAB® workspace into a GeoTIFF file by using the geotiffwrite function.

Export raster data from the MATLAB workspace into an MBTiles file by using the mbtileswrite function.

Vector Data

Export vector data from the MATLAB workspace into a shapefile or KML file by using one of these methods:

  • Export data into a shapefile by using the shapewrite function.

  • Export data stored in numeric vectors into a KML file by using the kmlwritepoint, kmlwriteline, or kmlwritepolygon function.

  • Export data stored in another representation, such as a geospatial table, into a KML file by using the kmlwrite function.

Tips

  • Data vendors might refer to file formats using different names. For example, vendors might refer to the Esri Binary Grid format as ArcGrid Binary, Esri ArcGIS Binary Grid, or Esri ArcInfo Grid.

  • Data vendors often provide data in multiple formats. If your data is not in a supported format, try getting the data in a different format.

Related Topics