[R-sig-Geo] readGDAL() and HDF5 files
Roger Bivand
Roger.Bivand at nhh.no
Mon Jan 26 10:33:54 CET 2009
On Sun, 25 Jan 2009, Sebastian P. Luque wrote:
> On Sun, 25 Jan 2009 21:35:12 +0100 (CET),
> Roger Bivand <Roger.Bivand at nhh.no> wrote:
>
>> On Sun, 25 Jan 2009, Roger Bivand wrote:
>>> On Sat, 24 Jan 2009, Sebastian P. Luque wrote:
>
>> Hi,
>
>>> If you have the cell centre offset for the lower left cell, then:
>
>>> is.na(ice$band1) <- ice$band1 < 0 vice <- ice$band1 mice <-
>>> matrix(vice, ncol=760, byrow=TRUE) mice1 <- t(mice[1120:1,]) grd <-
>>> GridTopology(c(-4941217, -4941217), c(10000,10000), c(760, 1120))
>
>> With:
>
>> grd <- GridTopology(c(-((760/2)*10000) + 5000, -((1120/2)*10000) +
>> 5000), c(10000,10000), c(760, 1120))
>
>> that is assuming that the input grid is centred at the pole, and that
>> the cell sizes are 10km by 10km, we get much closer, but the whole
>> grid is shifted South. Once we establish the metadata by reverse
>> engineering, setting up your workflow ought to be feasible.
>
> Hi Roger,
>
> Yes, that is correct, and I should've posted this to begin with, from
> OSI-SAF's documents:
Hi,
Using the lower left geographical coordinate:
ll <- c(project(matrix(c(-80.7299, 33.9755), nrow=1), "+init=epsg:3411"))
grd <- GridTopology(ll, c(10000,10000), c(760, 1120))
and so on, I get:
http://spatial.nhh.no/misc/hudson_st.png
which isn't bad. Maybe we need (ll+5000) instead, but it's hard to tell.
The assumption in project() is no datum shift but +ellps=WGS84, so that
might need attention too.
Should we draw these problems to the data providers' attention (it is the
Norwegian Met. Office, and there are R people there too)? Perhaps they
have a FAQ?
Roger
>
>
--
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