[R-sig-Geo] newbie rgdal projection problem

Roger Bivand Roger.Bivand at nhh.no
Mon Jan 4 20:37:27 CET 2010


On Mon, 4 Jan 2010, Peter Adler wrote:

> Dear R-sig-geo,
>
> I am new to RGDAL and PROJ4, and am having trouble projecting a raster 
> dataset.
>
> The dataset is a 721 x 721 cell raster of snow cover from the NSIDC. The 
> projection information is here:
> http://nsidc.org/data/atlas/epsg_3408.html
>
> My command:
>
> D=readGDAL("annual_snow_trend_ease.tif",
> p4s="+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +a=6371228 +b=6371228 
> +units=m +no_defs")
>
> gets executed, but is followed by the warning message:
>
> annual_snow_trend_ease.tif has GDAL driver GTiff
> and has 721 rows and 721 columns
> Warning message:
> In readGDAL("annual_snow_trend_ease.tif", p4s = "+init=epsg:3408") :
> GeoTransform values not available


The message is not related to the projection, but to the underlying 
dimensions of the image - it is being read as a 721 by 721 picture, with 
no location of the NW cell, and no cell sizes. This rather suggests that 
the Tiff file is not a GeoTiff, otherwise these values should have been 
present. Are you using the "browse image files" rather than the snow cover 
data (I don't think so)? Omit the p4s= value, and report summary() of the 
imported object - I think you'll see that it has coordinates 0-721 in each 
dimension or some such.

Roger

>
> Using:
>
> D=readGDAL("annual_snow_trend_ease.tif",
> p4s="+init=epsg:3408")
>
> gives the same result.
>
> I am running R 2.10 on a Windows Vista machine. I think I have all the 
> required libraries installed. When I load rgdal, I see:
> Loading required package: sp
> Geospatial Data Abstraction Library extensions to R successfully loaded
> Loaded GDAL runtime: GDAL 1.6.2, released 2009/07/31
> Path to GDAL shared files: C:/PROGRA~1/R/R-210~1.0/library/rgdal/gdal
> Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
> Path to PROJ.4 shared files: C:/PROGRA~1/R/R-210~1.0/library/rgdal/proj
>
> Thanks for your help,
>
> Peter
>
> -- Peter Adler Dept. of Wildland Resources and the Ecology Center 5230 Old 
> Main Utah State University Logan, UT 84322 tel: (435) 797-1021 email: 
> peter.adler at usu.edu http://www.cnr.usu.edu/htm/facstaff/adler-web
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list