search for: spatialpixelsdataframe

Displaying 18 results from an estimated 18 matches for "spatialpixelsdataframe".

2008 Apr 17
1
spatialpixelsdataframe
I have a spatialpixelsdataframe containing bathymetry data. Is it possible to save this as something similar to the meuse.grid so it can be loaded without having to run the spatial interpolation each time the script is called? I don't see a straightforward method in the sp documentation.
2008 Jul 01
2
Are centre coordinates or upper left corners used of x, y for SpatialPixels?
...re packages use the upper left corner of a pixel as a reference. require(sp) # --> Create GRID and image in R S <- SpatialPoints(cbind(spatial["x"], spatial["y"]), proj4string = proj) SP <- SpatialPixels(S, proj4string = proj, tolerance = 5e-07) GRID <- SpatialPixelsDataFrame(points = SP , tolerance = 5e-07, data = spatial[columnname]) proj4string(GRID) <- proj gridded(GRID) nr <- 30 zaxis <- c(0.7, 1) plot(as(GRID, "Spatial"), axes=T) title(main = paste(" Day ",dy[i,1], " Year ",dy[i,2], sep="&quo...
2008 Aug 07
0
3d kriging et al
...rface (I've made a 2-d grid of ground surface values), reverse the log-transformation, and ultimately estimate the total mass of hydrocarbons in the soil. Here's what I've gathered from the supporting documentation: - need to cast the 3-d expected concentration values into sp's SpatialPixelsDataFrame class in order to make any irregular subsets of the rectangular grid. - subsetting the grid probably involves use of "[ ...]" Here's my code so far: library(RODBC) library(gstat) options(digits = 10) channel = odbcDriverConnect("") sqlTables(channel) PAHdata <- sqlF...
2009 Mar 08
0
image2GRID
Hi all, i have a SpatialPixelsDataFrame object, which is a result of kriging in R. What i would like to do is to convert this object to image (geoTiff) so that i could use it in Gis application. I have tried using this image2Grid function but it doesen't work. Here is the code : im<-image(pCir) #pCir is the SpatialPixelsDataFr...
2012 Jul 12
2
trellis margin sizes in absolute units
...vice region is for the plot region. That is my general idea. My question is, is it possible to achieve that full control with trellis graphics? I have tried with the *.paddings parameters, but it seems to me that the margins are still larger than I have set them. Here is my example code: (mp is a SpatialPixelsDataFrame) xlim <- c(.96*bbox(mp)[1, 1], 1.02*bbox(mp)[1, 2]); ylim <- c(.992*bbox(mp)[2, 1], 1.005*bbox(mp)[2, 2]); b <- 1; t <- 2; # b, t : should be bottom and top figure margins l <- 1; r <- 6; # l, r : should be left and right figure margins asp <- mapasp(data=mp, xlim=xlim, ylim=y...
2010 Oct 19
1
Problems with a specific calculate.
...;m 25 and I'm working on the Meteorological Investigation team from Balearic Islands. I had contact to you because I have a problem: I done a file for every day since 1912 about precipitation. That file has the following structure: > str(Ast) Loading required package: sp Formal class 'SpatialPixelsDataFrame' [package "sp"] with 7 slots ..@ data :'data.frame': 499105 obs. of 2 variables: .. ..$ PRECIP.pred: num [1:499105] 0.000536 0.000536 0.000536 0.000536 0.000536 ... .. ..$ PRECIP.var : num [1:499105] 1.90e-05 1.90e-05 1.90e-05 1.90e-05 1.90e-05 ... ..@ coords.nr...
2010 Jun 25
1
variograms and kriging
...soil.dat) <- ~ x+y gridded(soil.dat) <- TRUE Warning messages: 1: In points2grid(points, tolerance, round, fuzz.tol) : grid has empty column/rows in dimension 1 2: In points2grid(points, tolerance, round, fuzz.tol) : grid has empty column/rows in dimension 2 class(soil.dat) [1] "SpatialPixelsDataFrame" attr(,"package") [1] "sp" > bbox(soil.dat) min max x 476819 575981 y 2785749 2948128 > soil.dat[1:3,] suggested tolerance minimum: 0.165318957771788 Error in points2grid(points, tolerance, round, fuzz.tol) : dimension 1 : coordinate intervals are not...
2006 Jan 10
0
new gstat version
...zn.kri1) # "new-style", using SpatialPointsDataFrame's: coordinates(meuse) = c("x", "y") # promote meuse to SpatialPointsDataFrame coordinates(meuse.grid) = c("x", "y") # promote to SpatialPointsDataFrame gridded(meuse.grid) = TRUE # promote to SpatialPixelsDataFrame zn.kri2 = krige(log(zinc)~1, meuse, meuse.grid, v) spplot(zn.kri2[1]) + provides a generic idw for inverse distance interpolation (calling sequence identical to krige) INCOMPATIBLE CHANGE: the krige generic is krige(formula, locations, ...) based on the class of argument 2 (locations)...
2009 Aug 04
1
asc class object - how to get positions (coordinates) for a given raster ID?
In a raster asc object, I'd like to take the positions (x and y coordinates) for a given "pixel" ID. Any idea about how to do this? _______________ Paulo E. Cardoso [[alternative HTML version deleted]]
2006 Jan 10
0
new gstat version
...zn.kri1) # "new-style", using SpatialPointsDataFrame's: coordinates(meuse) = c("x", "y") # promote meuse to SpatialPointsDataFrame coordinates(meuse.grid) = c("x", "y") # promote to SpatialPointsDataFrame gridded(meuse.grid) = TRUE # promote to SpatialPixelsDataFrame zn.kri2 = krige(log(zinc)~1, meuse, meuse.grid, v) spplot(zn.kri2[1]) + provides a generic idw for inverse distance interpolation (calling sequence identical to krige) INCOMPATIBLE CHANGE: the krige generic is krige(formula, locations, ...) based on the class of argument 2 (locations)...
2009 Aug 16
1
How to use your own data in gstat and sp?
This seems pretty basic, but I can't get any data to work except for the documented examples. When the goal is to get to SpatialPixels, here is what I see... > x <- runif(10,1,10) > y <- runif(10,1,10) > z <- rnorm(10,0,1) > MyData <- as.data.frame(cbind(x,y,z)) > library(gstat) > coordinates(MyData) <- ~x + y > gridded(MyData) <- TRUE suggested
2014 Jun 15
0
Problem with converting a list of grids to a list of polygons
Hi. For a spatial analysis (its visualization) I need to produce a map of conditions and traits. When I used SpatialPixelsDataFrame (sp package) my grid cells were regular and between each row was a small gap, which is not only messy but incorrect. So I generated the coords of each grid from the centroids in order to elongate the cells manually (or does anybody know another way to solve this?). But I got stuck when I tried to...
2007 Dec 12
1
How to plot the grid figure using R?
Now I have the forest plot data with x, y locations, and I measured the DBH for every indivicuals. The data looks like that: x=runif(100,0,100) y=runif(100,0,100) dbh=runif(100,1,100) rdata=data.frame(x,y,dbh) > rdata[1:5,] x y dbh 1 99.5354145 1.412844 34.10112 2 0.8259361 87.737036 39.12914 3 6.5678613 65.699032 22.55990 4 67.2987881 72.053877 45.83978 5 2.2491372
2006 Mar 21
1
Getting polygons from contiguous grid cells having same value in sp
I have been using the sp package to deal with gridded data. I would like to know how to extract the vertices (x,y) of polygons that outline areas of like-valued cells in a grid. Here is a simple 3x3 grid: 2 2 1 1 2 1 1 1 3 x <- c(1,1,1,2,2,2,3,3,3) # define a 3 x 3 array of points y <- c(1,2,3,1,2,3,1,2,3) h <- SpatialPoints(cbind(x,y)) # make these an sp object of the points
2008 Dec 10
2
exporting rast from R to GRASS
Hi, everybody! i created a imagem by kriging using geoR package. I imported points from GRASS("zn", after converted to geodata "zn_geo"), the border "zn_border" and a raster mask. Then i interpolated the points by kriging and created a raster image. Now, i need export this image back to GRASS to use it in the module r.mapcalc. I can't do it. I tried use
2010 Apr 07
1
kriging problem - very urgent
Hi everybody, I have a longitude vector and a latitude one. Associated to these coordinates, i have a matrix with some data at some coordinates but not all. Lon <- seq(136.025,144.975,0.05) Lat <- rev(seq(-66.975,-65.525,0.05)) dim(z) <- c(Lon,Lat) And i have tried to apply to these data a kriging function. But first i need to reshape these 3 variables to have a dataframe
2011 Feb 09
0
adehabitatMA, LT, HR and HS version 0.1
...estimation methods have been homogenized and return classes compliant with the classes of the package sp: - the functions kernelUD, kernelbb, BRB and kernelkc all return objects of class "estUDm", which are lists of objects of class "estUD". The class estUD extends the class SpatialPixelsDataFrame. - the function clusthr and LoCoH return objects of class "MCHu", which are lists of SpatialPolygonsDataFrame - the function mcp returns a SpatialPolygonsDataFrame * home range estimation methods now take objects of class SpatialPoints as arguments * objects of class "ltraj"...
2011 Feb 09
0
adehabitatMA, LT, HR and HS version 0.1
...estimation methods have been homogenized and return classes compliant with the classes of the package sp: - the functions kernelUD, kernelbb, BRB and kernelkc all return objects of class "estUDm", which are lists of objects of class "estUD". The class estUD extends the class SpatialPixelsDataFrame. - the function clusthr and LoCoH return objects of class "MCHu", which are lists of SpatialPolygonsDataFrame - the function mcp returns a SpatialPolygonsDataFrame * home range estimation methods now take objects of class SpatialPoints as arguments * objects of class "ltraj"...