Dear R-sig-geo members,
I wonder if any of you have suggestions about how to import and use
rasters with a spectral Gaussian T62 CRS in R. I'm not very familiar
with this coordinate system (commonly used for climate models), and I
haven't been able to discover tools for dealing with them in
Hi All,
I'm verifying coefficients generated with GSTAT kriging with external
drift using GLS. The coefficients match absolutely perfectly. The range
also matches perfectly. But there is a big difference in what GLS gives
as the output for the nugget. Can anyone explain why this is?
Zev
Hi!
I use spTransform to reproject:
class(eugrd025)
[1] SpatialGrid
attr(,package)
[1] sp
projection(eugrd025)
[1] +proj=longlat +ellps=WGS84
eugrd025EFDC - spTransform(eugrd025,
CRSobj=CRS(projection(eugrd025EFDC_SPDF)))
projection(eugrd025EFDC)
[1] +proj=laea +lat_0=52 +lon_0=10
spTransform cannot reproject a grid - this will (usually) requires
destructive resampling of the data to a completely new grid. There are
functions in the raster package to do this: projectRaster.
I think this would work, but there may be important details that you
will need to investigate:
Ah, sorry that was completely wrong. I think this is right, but still untested:
raster.eugrd025 - raster(eugrd025)
pr - projectExtent(raster.eugrd025, projection(eugrd025EFDC_SPDF))
eugrd025EFDC - projectRaster(raster.eugrd025, pr)
On Fri, Jul 2, 2010 at 1:46 AM, Michael Sumner
Hi!
Are you sure that the *spTransform *method can be applied to a SpatialGrid
object? I think it only works for SpatialPoints, SpatialLines and
SpatialPolygons.
If you are working with rasters, perhaps you should use the function
*projectRaster
*from the package raster.
I hope it helps...
Isa.
I forgot to mention the first time, spTransform will not reproject a
grid but it will coerce the grid to points and then return reprojected
versions of those. That's why Agustin sees the class change from grid
to points.
You can see this in the method definitions for SpatialGrid/PixelDataFrame,
The general idea is that for changing the projection of a raster you
provide the input RasterLayer and a Raster object with the spatial
parameters (projection, extent, resolution) to which it should be
transformed. For the latter, you can use the RasterLayer that you want
to project the input data
Hi Zev,
it seems that gls returns the relative nugget rather than the absolute
returned by gstat:
1.30231/(1.413246+1.30231)
[1] 0.479574
Could that be? I'm quite surprised results are that similar, doesn't gls
use REML to fit variograms?
Best wishes from a vivid geostat 2010,
On 07/01/2010
Thank you all for your ideas.
Please note though that the goal is to create a raster as a reference
object for running resample().
The original data is a high resolution raster in EPSG 3035 (Br) that I
want to resample
to a lon,lat grid of 0.25 deg resolution (Frankly, I'm astonished that
such a
10 matches
Mail list logo