[R-sig-Geo] How to translate coordinates from cylindrical to a Lambert Azimuthal Equal Area Projection
ubuntero.9161 at gmail.com
Tue Apr 23 16:40:01 CEST 2013
On Tue, Apr 23, 2013 at 3:30 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> The spTransform function in package:rgdal is the thing for you! Also,
> read up about epsg codes...
Thanks for the hint! Now I know that I need to transform the raster
object from epsg:3035 to epsg:4326, but I have difficulties to turn
this into practice as the documentation sounds somewhat cryptic to me
and I am not sure how to code the desired transformation in R. Could
you provide some example code that might do the transformation?
> Note however that a regular grid in one coordinate system might not
> be a regular grid in another system - the cells might not even line
> up. So, for example, the X coordinate of the bottom left cell which is
> the same as the X coordinate of the top left cell in the original
> coordinate system might not be the same in the transformed coordinate
> system - the projected raster ends up as a trapezium rather than a
That is good to know, but as I just want to use the coordinates for
reference only (i.e. to be able to "navigate" the raster through
Google Earth where I can easily recognize reference points to create
an extent) and not for representation, I think that these issues won't
> To transform a raster from one CRS to another, use projectRaster in
> the raster package, which does the necessary warping to get a regular
> grid in the new system. This will involve some interpolation.
If I understand correctly, projectRaster would work on a RasterLayer
(in contrast to spTransform), but as I couldn't come up with working
code I'd appreciate if you could provide an example using these
> I think your best strategy with your big raster would be to first
> crop it so that when projected it will completely cover the extent of
> your target area. That makes your raster smaller and more manageable.
> Then project that to your target CRS, and you'll get a trapezium
> shape. Crop that to your your target area.
This strategy is perfectly fine, but my struggle is exactly with the
first point, i.e. to crop the big raster to something more manageable.
The raster I'm working with contains vegetation feature classes and
thus I cannot easily recognize/determine the points by visually
examining the huge plot, so I hoped to use GE for navigation and
obtaining coordinates for the crop. Namely the latter procedure called
for the option to transform the coordinates to the projection GE uses.
UBUNTU: a person is a person through other persons.
More information about the R-sig-Geo