  Dear List Members,

I discovered a strange behaviour of the function writeRaster in ther 
raster package. Having a *.img or *.tiff file with a projected extend 
object like this,

##############################################################
class       : RasterLayer
filename    : H://test_neu.img
nrow        : 7371
ncol        : 8251
ncell       : 60818121
min value   : 0
max value   : 254
projection  : +proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m 
+no_defs +towgs84=0,0,0
*extent      : 298785, 546315, 4509585, 4730715  (xmin, xmax, ymin, ymax)
resolution  : 30, 30  (x, y)*
##############################################################

alway causes a wrong projection and associated coordinates when writing 
to a envi file with the function call:

##############################################################
writeRaster(bb2,"test_neu_2",format="ENVI",NAflag=0,overwrite=TRUE)
##############################################################

class       : RasterLayer
filename    : H://test_neu_2.envi
nrow        : 7371
ncol        : 8251
ncell       : 60818121
min value   : 1
max value   : 254
projection  : +proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m 
+no_defs +towgs84=0,0,0
*extent      : 0, 8251, -7371, 0  (xmin, xmax, ymin, ymax)
resolution  : 1, 1  (x, y)*
##############################################################

Writing any other file works fine.
Can anybody give an explanation/solution for this problem? Very great 
thanks in advance for your help.

Best regards

Carsten

	[[alternative HTML version deleted]]

