DEM: It is a digital model or a three-dimensional representation of the earth's surface, which is usually prepared to show the unevenness of the earth and using height data from sea level. In fact, the digital model displays the elevation and height of the earth by a cellular network.
Each cell (pixel) of this grid is identified with a numerical code that indicates the average height of the surface inside that pixel. In other words, the surface of the earth is considered as digital areas and the height of each cell is stored in the cell itself, and depending on the source from which the DEM is prepared, its accuracy is different.
Accuracy can be named for each cell with height accuracy and spatial accuracy.
The spatial accuracy is related to the size of the side of each cell, the smaller it is, the higher the accuracy, and the height accuracy is the detection of the minimum height in each cell that can be measured and identified by the satellite.
DTM: represents the surface of the earth alone without other effects such as plants and buildings.
It can be said that DTM is a much more comprehensive term and any raster layer that has a third dimension is called DTM.
DTM: It is a set of digital grid whose third dimension value can represent anything except height. For example: it includes pressure map, temperature map, hydrology map and even DSM and DEM.
There is no universal agreement on the use of the terms DEM, or DTM, or DSM.
In most cases, DSM represents the land surface and all features on it, while DTM represents the land surface alone without other features such as plants and buildings.
DEM is often used as a general term for DSM and DTM models, which only represent elevation information and lack additional information about ground surface phenomena. Some other definitions use DEM and DTM in the same sense or consider DEM as a subset of DTM that also shows morphological phenomena.
DEM is used as a general term for DSMs and DTMs in most of the data produced by geological organizations and satellite imagery. Also, all data provided by satellites, aircraft and other flight platforms such as SRTM and Ester sensor installed on Terra satellite are DEM first. It is possible to calculate DTM from high-resolution DSMs with complex algorithms.