[R-sig-Geo] SpatialGridDataFrame Help
Roger Bivand
Roger.Bivand at nhh.no
Thu Aug 26 15:07:30 CEST 2010
On Thu, 26 Aug 2010, dkod wrote:
>
> Roger
>
> Thank you for your quick and helpful response.
>
> I now have image/plot() working. I need some help in how to go from
> rectangular grid representation to a mercator (or other) projection. Since
> my source grid is 2 degree long/lat based, I'd like to use a projection.
>
>
> How do I get a proper projection? Here's the line I used:
>
> gr_sp <- SpatialGrid(grid=grd, proj4string = CRS(as.character(NA)))
No, much more work needed. If the input is in decimal degrees,
geographical coordinates, and a known datum, you must warp (interpolate)
to a planar projection. You might do this by projecting the input as a
SpatialPointsDataFrame from +proj=longlat and known +datum to your target
projection, then interpolate using your chosen interpolator to a grid
defined in the target projection. A grid in geographical coordinates will
effectively never be a grid in projected coordinates.
Roger
>
> Sorry for such a basic question.
>
>
>
--
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