Displaying 20 results from an estimated 1000 matches similar to: "data from SpatialGridDataFrame"
2010 Sep 23
2
hdf-files
Dear All,
I have data in HDF file format and would like to read it into R.
I have tried the package hdf5 without success.
Any ideas and suggestions??
Kind regards,
Katrin
--
Katrin Fleischer
Vrije Universiteit Amsterdam
Faculty of Earth and Life Sciences
Subdepartment Hydrolgy and Geo-Environmental Sciences
Room E-360
De Boelelaan 1085
1081 HV AMSTERDAM
Tel: +31 20 59 87391
2010 Jul 23
1
calculate slope of line
Dear All,
I fear that this is a really easy question but I do seem to go around in
circles..
I have 2 points on a plot and would like to calculate the slope of the
line drawn through these 2 points.
that cant be so hard?!
Thank you in advance,
Katrin
--
Katrin Fleischer
Vrije Universiteit Amsterdam
Faculty of Earth and Life Sciences
Subdepartment Hydrolgy and Geo-Environmental Sciences
Room
2008 Oct 15
2
apply model predictions over larger area with predict()
Dear all,
I have built glm models based on presences/absences and a number of
predictor maps and would like to compute habitat suitability based on
the modelled coefficients.
I thought this is pretty straight forward and wanted to use predict()
and supply the new data in a data frame, with one column for each
predictor.
However, I do get an error msg warning me that the number of rows for
2008 Sep 24
1
looping through variables
Hello everyone,
I have the following problem:
My analysis includes many predictor variables (>50) in the form of
raster maps (asc), but I am trying to avoid having to type all their
names over and over again in the analysis (e.g. for vectorisation, for
deletion of NA's, etc.)
So ideally I would like to store them in some way that their names
only have to be typed once and can always
2008 Jul 15
1
code reduction (if anyone feels like it)
# I am sure that I could be more efficient than this but how? Thanks in
advance.
#GPS in Decimal Degrees in the form longitude latitude
RM215 <- matrix(c(-82.1461363, 33.5959109), nrow=1)
SC <- matrix(c(-82.025888, 33.606454), nrow=1)
RM202 <- matrix(c(-81.9906723, 33.5027653), nrow=1)
RM198 <- matrix(c(-81.926823, 33.4634678), nrow=1)
HC <- matrix(c(-81.920505, 33.46192), nrow=1)
2007 Jan 17
1
sp: proj4string has no impact
Hi all,
I'm faced with a problem applying the sp package: The projection argument in
readShapePoly(Shapefile,proj4string="CRS class argument")
e.g.: CRS("+proj=aea +lat_1=46 +lat_2=73 +lat_0=60 +lon_0=84 +x_0=0
+y_0=0 +ellps=clrk66 +units=m +no_defs")
doesn't have any impact on the plotted object. I also tested the simple
example:
xy = cbind(x = 2 * runif(100) -
2006 Apr 25
3
persp plot increasing 'x' and 'y' values expected
hello,
i do the following in order to get an persp-plot
x<-c(2,2,2,2,2,2,3,3,3,3)
y<-c(41,41,83,83,124,166,208,208,208,208)
z<-c(90366,90366,92240,92240,92240,96473,100995,100995,100995,100995)
x<-data$x
y<-data$y
z<-matrix(data$z,length(y),length(x))
persp(x,y,z, col="gray")
but i always get the error message increasing 'x' and 'y' values
expected,
2012 Oct 18
1
spTransform longlat to utm
Dear all,
I am trying to project my LongLat-maps to a plane.
The ultimate purpose is to do a search of points in vicinity of other points using overlay-commands (sp) with radius in km.
I am applying spTransform (package rgdal) and it gives my some curious results.
An example.
Let's take a point lying somewhere in Germany, zone=32U
x <- 8.968735
y <- 49.454735
After conversion I
2012 Mar 14
1
How to extend a slot of a class?
Hej hej,
is there a way to extend the SpatialPointsDataFrame data slot?This is the structure of an object of it:> str(coord)
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
..@ data :'data.frame': 214 obs. of 2 variables:
.. ..$ location.long: num [1:214] -79.8 -79.8 -79.8 -79.8 -79.8 ...
.. ..$ location.lat : num [1:214] 9.16 9.16 9.16
2005 Jun 09
1
Using transform on spproj package.
Hi,
I'm trying to use transform my mercator locations into utm but I'm doing
something wrong because only x is transformed ... see
> xy.sp
SpatialPoints:
loni lati
[1,] -8.85 38.16
[2,] -9.19 37.99
[3,] -9.11 37.97
[4,] -9.06 38.15
[5,] -9.03 37.87
[6,] -9.14 37.81
[7,] -9.09 37.70
[8,] -8.95 37.45
[9,] -9.17 37.37
[10,] -9.00 37.34
Coordinate Reference
2011 Jan 06
1
Cross validation for Ordinary Kriging
ear ALL,
The last part of my thesis analysis is the cross validation. Right now I am
having difficulty using the cross validation of gstat. Below are my commands
with the tsport_ace as the variable:
nfold <- 3
part <- sample(1:nfold, 69, replace = TRUE)
sel <- (part != 1)
m.model <- x2[sel, ]
m.valid <- x2[-sel, ]
t<- fit.variogram(v,vgm(0.0437, "Exp", 26, 0))
cv69
2012 Jun 05
2
Converiting longitude/latitude to utm
Dear all,
I have been trying to convert coordinates from longitude/latitude to utm
but I got an error. As soon as the longitude coordinate is greater than 90,
I get the folloowing error message: "error in pj_transform: latitude or
longitude exceeded limits"
Here is what I did:
SP<-SpatialPoints(cbind(126.59,-14.30),proj4string=CRS("+proj=longlat"))
2010 Oct 12
2
Memory limit problem
Dear List,
I am trying to?plot?bathymetry contours around the Hawaiian Islands using the
package rgdal and PBSmapping.? I have run into a memory limit when trying to
combine two fairly small objects using cbind().? I have increased the memory to
4GB, but am being told I can't allocate a vector of size 240 Kb.? I am running R
2.11.1 on a Dell Optiplex 760 with Windows XP.? I have pasted
2013 Apr 24
1
extract function extracting only NA values
Hello,
I have five raster files in ASCII format. With four of them I have no
problem extracting values based on a set of X and Y coordinates.
Unfortunately with one of the files all I managed to extract is NA
values. To verify the problem I have opened the raster with ArcMap and
there are no NA values where I am extracting. I have also plotted the
spatial point class on top of the raster in
2010 Jul 02
2
S4 classes and debugging - Is there a summary?
Dear all,
I'm getting more and more frustrated with the whole S4 thing and I'm
looking for a more advanced summary on how to deal with them. Often I
get error messages that don't make sense at all, or the code is not
doing what I think it would do. Far too often inspecting the code
requires me to go to the source, which doesn't really help in easily
finding the bit of code
2012 Apr 07
1
rgeos - gBuffer, width by z-value
Dear list!
I have problem with buffer size (width) in package rgeos. I would like to expand given geometry (points) to specified width based on the z value from attribute table. Here is example:
point <- data.frame(x=c(10,20), y=c(10, 10), z = c(2,7))
point_shp <- SpatialPointsDataFrame(point[,1:2],point)
plot(point_shp, xlim = c(0,30), ylim = c(0,20))
plot(gBuffer(point_shp, width = 5,
2005 Oct 09
1
libsmbclient - detect own workgroup
Hi,
I would like to know if there's a way to detect the workgroup of my own server with libsmbclient.
With earlier versions than 3.0.20 it was possible to use smbctx->workgroup after the context was initialized.
Since 3.0.15pre2 or so its always "WORKGROUP". Am I missing something?
Regards, Gerd Fleischer
______________________________________________________________
2008 Jul 15
2
POSIXct extract time
RM215.sp <- SpatialPoints(RM215, proj4string=CRS("+proj=longlat
+datum=WGS84"))
d060101 <- as.POSIXct("2006-01-01", tz="EST")
study_seq <- seq(from=d060101, length.out=761, by="days")
up.215 <- sunriset(RM215.sp, study_seq, direction="sunrise",
POSIXct.out=TRUE)
down.215 <- sunriset(RM215.sp, study_seq, direction="sunset",
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
2013 Jan 27
1
lapply and SpatialGridDataFrame error
Hi all, I have a set of 54 files that I need to convert from ASCII grid
format to .shp files to .bnd files for BayesX.
I have the following R code to operate on those files:
library(maptools)
library(Grid2Polygons)
library(BayesX)
library(BayesXsrc)
library(R2BayesX)
readfunct <- function(x)
{
u <- readAsciiGrid(x)
}
modfilesmore <- paste0("MaxFloodDepth_", 1:54,