Hi,


I have a RasterStack detm composed of a dem and a dtm.

I wanted to apply the difference between dem and dtm so as to get the
elevation.

But I got the following message (in French):
Erreur dans result[, i] <- readBin(raster@file@con, what = dtype, n =
ncols, :
le nombre d'objets à remplacer n'est pas multiple de la taille du
remplacement
De plus : Messages d'avis :
1: fermeture de la connexion inutilisée 4
(C:/DOCUME~1/MATHIE~1.RAJ/LOCALS~1/Temp/R_raster_tmp/raster_tmp_310457192102.gri)

2: fermeture de la connexion inutilisée 3
(C:/DOCUME~1/MATHIE~1.RAJ/LOCALS~1/Temp/R_raster_tmp/raster_tmp_79244111022.gri)

Also, I got an error message telling me I had low disk space...

Here is the complete code:

> dem <- unstack(detm)[[1]]

> dtm <- unstack(detm)[[2]]
> elev <- dem - dtm
(the above message)
> ncell(dem)==ncell(dtm)
[1] TRUE
> extent(dem)==extent(dtm)
[1] TRUE
> res(dem)==res(dtm)
[1] TRUE TRUE

Does anyone see where the problem is?


Thanks in advance,

Mathieu

	[[alternative HTML version deleted]]

