Re: [R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread Alexandre Villers
Hi, Someone with a better knowledge of errors like this one might more helpful. But as a a first start, check the structure of of coords and dat objects ( to see whether there was a mistake while reading coords.txt and dem.txt... for example headers, or separator issues), then make sure they are o

Re: [R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread Edzer Pebesma
SpatialPixelsDataFrame() tries to figure out how the points you feed it with are layed out on a grid structure. Small errors, possibly from rounding (you're reading from ascii) may cause it to go slightly wrong, and not give you the grid you'd like. As you probably know the grid at which "coor

[R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread fsantos
Dear R-Geo users, I am trying to create a SP objects using SpatialPixelsDataFrame. Next I can see the code: > proj <- '+proj=lcc +ellps=WGS84 +lat_0=0 +lat_1=30 +lat_2=60 +lon_0=-4.75' > coords <- read.table("coords.txt") > dat<- read.table("dem.txt") > test <- SpatialPixelsDataFrame(points=c