When you specify a referencing vector or a referencing matrix as input, the
viewshed
function issues a warning that it will not accept
referencing vectors or referencing matrices as input in a future release. Use a geographic
raster reference object, specified as a GeographicCellsReference
or GeographicPostingsReference
object, as input instead. Reference objects have
several advantages over referencing vectors and referencing matrices.
Unlike referencing vectors and referencing matrices, reference objects have
properties that document the size of the associated raster, its geographic limits, and
the direction of its rows and columns.
You can manipulate the limits of geographic rasters associated with reference
objects using the geocrop
function.
You can manipulate the size and resolution of geographic rasters associated with
reference objects using the georesize
function.
To update your code, create a geographic reference object.
Create a geographic reference object for a raster of cells by using the georefcells
function.
Create a geographic reference object for a raster of regularly posted samples by
using the georefpostings
function.
Convert from a referencing vector to a geographic reference object by using the
refvecToGeoRasterReference
function.
Convert from a referencing matrix to a geographic reference object by using the
refmatToGeoRasterReference
function.
Once you have created a reference object, replace uses of the referencing vector or
referencing matrix in your code with the reference object.