Main Content


(Removed) Read data from SDTS raster/DEM data set

sdtsdemread has been removed. Use readgeoraster instead. For more information, see Compatibility Considerations.


[Z, R] = sdtsdemread(filename)


[Z, R] = sdtsdemread(filename) reads data from an SDTS DEM data set. Z is a matrix containing the elevation values. R is a referencing matrix. NaNs are assigned to elements of Z corresponding to null data values or fill data values in the cell module.

filename can be the name of the SDTS catalog directory file (*CATD.DDF) or the name of any of the other files in the data set. filename can include the directory name; otherwise filename is searched for in the current directory and the MATLAB® path. If any of the files specified in the catalog directory are missing, sdtsdemread fails.


Elevation values can be imported with sdtsdemread from DEMs that use the SPRE Raster Profile (in use since January, 2001) as well as from older SDTS DEM data sets. Under this profile, elevations can be encoded either as 32-bit floating-point numbers (when their units are “decimal meters”), or as 16-bit integers (when units are “feet” or “meters”). The output class from sdtsdemread for both types of elevation encoding is double.

Version History

Introduced before R2006a

expand all

R2023b: Removed

The sdtsdemread function, which returns a referencing matrix, has been removed. Instead, use the readgeoraster function, which returns a raster reference object. Reference objects have several advantages over referencing matrices.

  • Unlike referencing matrices, reference objects have properties that document the size of the associated raster, its limits, and the direction of its rows and columns. For examples of reference object properties, see GeographicCellsReference and MapPostingsReference.

  • You can manipulate the limits of rasters associated with reference objects using the geocrop or mapcrop functions.

  • You can manipulate the size and resolution of rasters associated with reference objects using the georesize or mapresize functions.

  • Most functions that accept referencing matrices as input also accept reference objects.

To update your code, change instances of the function name sdtsdemread to readgeoraster and specify an extension for the data file. The readgeoraster function returns data using the native data type embedded in the file. Return a different data type by specifying the 'OutputType' name-value pair.

[Z,R] = readgeoraster(filename,'OutputType','double');

The readgeoraster function does not automatically replace missing data with NaN values. If your data set uses large negative numbers to indicate missing data, replace them with NaN values using the standardizeMissing function.

[Z,R] = readgeoraster(filename);
info = georasterinfo(filename);
m = info.MissingDataIndicator;
Z = standardizeMissing(Z,m);