[R-sig-Geo] decimal places of coordinates get lost - readGDAL
Tim.Haering at lwf.bayern.de
Tim.Haering at lwf.bayern.de
Mon Jul 19 13:39:59 CEST 2010
Hello !
I want to import a raster into R using the readGDAL() function. Unfortunately the coordinates of my raster have decimal places. After importing the file the decimal places get lost. It seems the GDAL rounds the coordinates. Is it possible to read the decimal places?
Here a little example:
The header of my ASCII file:
NCOLS 202
NROWS 201
XLLCENTER 4344198.9375000019
YLLCENTER 5537700.3750000028
CELLSIZE 20.000000
NODATA_VALUE -99999
myraster <- readGDAL("raster.asc")
myraster at coords
x y
[1,] 4344199 5537700
[2,] 4348219 5541700
Thank you.
TIM
-----------------
Tim Häring
Bavarian State Institute of Forestry
Department of Forest Ecology
Hans-Carl-von-Carlowitz-Platz 1
D-85354 Freising
E-Mail: tim.haering at lwf.bayern.de
http://www.lwf.bayern.de
More information about the R-sig-Geo
mailing list