[R-sig-Geo] change projection?

Roger Bivand Roger.Bivand at nhh.no
Thu Nov 22 17:47:20 CET 2007


On Thu, 22 Nov 2007, Ingo Holz wrote:

> Hi,
>
> I imported a ESRIAsciiGrid with readGDAL(). The result is a 
SpatialGridDataFrame (SGDF).
>
> The projection of the grid (only the xllcorner, yllcorner ?) is:
> Projection		LAMBERT
> Units			METERS
> Spheroid		BESSEL
> (more details at the end of this email)

You should be able to construct a string to represent this projection 
(which is more likely +proj=lcc than +proj=laea), although I cannot see it 
in the EPSG list as such.

>
> How can I change this to gauss-krueger projection zone 3 (gk3)?
>

This is a different projection, which means that the regular raster cells 
in the input will become irregular polygons in the output in general, and 
you need to warp from one to the other. You can interpolate to a regular 
grid in the output projection using standard interpolation tools.

> I did not specify the projection in the SGDF, how is this done?

proj4string(SGDF) <- CRS("<myprj>")

or if a *.prj file is present, readGDAL() may detect it.

Roger

>
> summary(SGDF):
>
> Closing GDAL dataset handle (nil)... done.
> Object of class SpatialGridDataFrame
> Coordinates:
>      min     max
> x -250000  500000
> y   20000 1020000
> Is projected: NA
> proj4string : [NA]
> Number of points: 2
> Grid attributes:
>  cellcentre.offset cellsize cells.dim
> x           -249500     1000       750
> y             20500     1000      1000
> Data attributes:
>     band1
> Min.   :   812
> ....
>
> There should be a simple way to use library(proj4) to make this transformation?
>
> Are I am right that actually only the "xllcorner, yllcorner"-values are transformed?
>
> Where can I find an easy (and maybe short) introduction to this topic?
>
> Thank you,
> Ingo
>
>
> ######
> Description of Grid ...*
>
> Cell Size (meters)	=	1000.000		Data Type:
> Integer
> Number of Rows	 =	1000		 	Number of Values =		....*
> Number of Columns =		750		 	Attribute Data (bytes) =	...*
>
> BOUNDARY:					STATISTICS:
> Xmin =			 -250000.000		Minimum Value =		...*
> Xmax =		  500000.000		Maximum Value =		...*
> Ymin =			    20000.000		Mean		 =		...*
> Ymax =		1020000.000		Standard Deviation =		...*
>
>
> COORDINATE SYSTEM DESCRIPTION
>
> Projection		LAMBERT
> Units			METERS
> Spheroid		BESSEL
> Parameters:
> 1st standard parallel				50 0 0.000
> 2nd standard parallel				51 0 0.000
> central meridian				9 0 0.000
> latitude of projection's origin			47 0 0.000
> false easting (meters)				0.00000
> false northing (meters)				0.00000
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
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