geoloc2grid
Convert geolocated data array to regular data grid
Syntax
[Z,R] = geoloc2grid(lat,lon,A,cellsize)
Description
[Z,R] = geoloc2grid(lat,lon,A,cellsize)
converts the
geolocated data array A
, given geolocation points in
lat
and lon
, to produce a regular data grid,
Z
, and the corresponding raster reference object
R
. cellsize
is a scalar that specifies the width and
height of data cells in the regular data grid, using the same angular units as
lat
and lon
. Data cells in Z
falling outside the area covered by A
are set to
NaN
.
Examples
Tips
geoloc2grid
provides an easy-to-use alternative
to gridding geolocated data arrays with imbedm
.
There is no need to preallocate the output map; there are no data
gaps in the output (even if cellsize
is chosen
to be very small), and the output map is smoother.