[R-sig-Geo] Creating grid from xyz file
p.hiemstra at geo.uu.nl
Thu Aug 27 09:30:53 CEST 2009
Mehdi Khan wrote:
> Sorry about that, this is what I did:
> wald<-read.table ("C:/Documents and Settings/MK/My Documents/USGS/R
> names(wald)<- "LON"
> names(wald)<- "LAT"
> names(wald)<- "vs30"
> coordinates(wald)<- c("LON", "LAT")
> gridded(wald)<- TRUE
> suggested tolerance minimum: 0.125000000000666
> Error in points2grid(points, tolerance, round, fuzz.tol) :
> dimension 1 : coordinate intervals are not constant
This error suggests that the data in california.xyz is actually not on a
regularly spaced grid.
> note: this is the same data frame I asked a question about last week.
> There is also a grid file available but it seems extremely difficult
> to get it to read in R. ideas?
> On Wed, Aug 26, 2009 at 1:19 PM, Paul Hiemstra <p.hiemstra at geo.uu.nl
> <mailto:p.hiemstra at geo.uu.nl>> wrote:
> Mehdi Khan schreef:
> Hello everyone, I have a table with 2 columns containing
> coordinates (lat, long) and one column containing attribute
> data. This is a
> data frame object which I would like to convert into a grid
> object. It is
> the 7.3 mb "california" file on this page:
> I tried to use the "gridded" command, but it did not work for
> my data. Is
> there any other method? Thank you!
> Mehdi Khan
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch <mailto:R-sig-Geo at stat.math.ethz.ch>
> How exactly did you try the gridded command. Please be specific.
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
More information about the R-sig-Geo