Main Content

Raster Data

Georeference, analyze and transform gridded data

Raster data, also known as data grids, stores map data as matrices. Regular data grids require a reference object that describes the sampling and location of the data points. Geolocated data grids explicitly identify the latitude and longitude coordinates of all rows and columns.

Functions

expand all

Reference Objects and Latitude-Longitude Grids

georefcellsReference raster cells to geographic coordinates
georefpostingsReference raster postings to geographic coordinates
refmatToGeoRasterReferenceConvert referencing matrix to geographic raster reference object
refvecToGeoRasterReferenceConvert referencing vector to geographic raster reference object
geoloc2gridConvert geolocated data array to regular data grid

Analyze and Manipulate Data

geointerpInterpolation for geographic raster
georesampleResample geographic raster (Since R2025a)
geocropCrop geographic raster
georesizeResize geographic raster
mergetilesMerge adjacent raster tiles (Since R2024a)
containsDetermine if geographic or map raster contains points
geopeaksGenerate synthetic data set on sphere
imbedmEncode data points into regular data grid
filtermFilter latitudes and longitudes based on underlying data grid
findmLatitudes and longitudes of nonzero data grid elements
changemReplace values in array
encodemFill in regular data grid from seed values and locations

Reference Objects

maprefcellsReference raster cells to map coordinates
maprefpostingsReference raster postings to map coordinates
refmatToMapRasterReferenceConvert referencing matrix to map raster reference object

Analyze and Manipulate Data

mapinterpInterpolation for planar map raster
mapresampleResample planar map raster (Since R2025a)
mapcropCrop planar map raster
mapresizeResize planar map raster
mergetilesMerge adjacent raster tiles (Since R2024a)
containsDetermine if geographic or map raster contains points
mapoutlineOutline of georeferenced image or data grid
changemReplace values in array
encodemFill in regular data grid from seed values and locations
georasterref(Not recommended) Create geographic raster reference object
maprasterref(Not recommended) Create map raster reference object
refmatToWorldFileMatrixConvert referencing matrix to world file matrix

Objects

GeographicCellsReferenceReference raster cells to geographic coordinates
GeographicPostingsReferenceReference raster postings to geographic coordinates
MapCellsReferenceReference raster cells to map coordinates
MapPostingsReferenceReference raster postings to map coordinates

Topics

Introduction to Raster Data

  • Raster Geodata
    Raster geodata represents map data in matrix format.
  • Georeferenced Raster Data
    Each element of georeferenced raster data corresponds to a defined quadrangle of territory on a planet.

Regular Data Grids

Geolocated Data Grids

  • Geolocated Data Grids
    A geolocated data grid is defined by three matrices giving latitude and longitude coordinates and indices associated with the mapped region.
  • Geographic Interpretations of Geolocated Grids
    The dimensions of a map matrix and associated latitude and longitude matrices determines the interpretation of the geographic map data.

Featured Examples