[R-sig-Geo] Rotate SpatialPointsDataFrame and convert to raster
Roger Bivand
Roger.Bivand at nhh.no
Wed Sep 2 22:16:39 CEST 2009
On Mon, 31 Aug 2009, Julian Burgos wrote:
> Dear list,
>
> Hopefully this question will not be too basic. I have a relatively large
> dataset (~250000 rows) consisting of lat, long and a data value. The data
> has been collected in a regular grid, but the grid is "tilted". In other
> words, along a row the latitude values increase constantly, and along a
> column the longitude values do the same. The tilt is very slight, but large
> enough to cause problems when trying to convert the SpatialPointsDataFrame
> object holding the data to a SpatialPixels objects. My ultimate objective is
> to convert this data to a raster file and input it to GRASS.
> Any ideas on how to solve this problem? Is is possible to create raster
> images with a "tilted" grid?
Given the format of the input data, I don't think that GMT or GDAL will
help directly. GMT xyz2grd seems to want a non-tilted grid. GDAL's
gdalwarp could re-orient an input tilted raster file, but this isn't what
you have. Have you considered using GRASS directly, with v.in.ascii and
format=point? Then one of the v.surf.* to interpolate to a non-tilted
raster - there are a few more on the GRASS Addons wiki site.
That might be more direct that doing the interpolation in R, although it
would come to the same thing.
Hope this helps,
Roger
> Many thanks,
>
> Julian
>
>
--
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