search for: spsample

Displaying 17 results from an estimated 17 matches for "spsample".

Did you mean: upsample
2008 Feb 17
1
random location in polygons sp spsample splancs csr
Dear all, I had to place points at random, one in each of larger number of polygons (actually in objects of class 'SpatialPolygonsDataFrame' , see sp library), and tried first to do it using spsample (from sp). Surprisingly, every 5-15 trials, the output was a NULL value. The doc says that ' this may occur when trying to hit a small and awkwardly shaped polygon in a large bounding box with a small number of points', but in my case, the shapes were not really awkward, and the boundin...
2009 Jul 14
1
Error when sampling from SpatialLines
...to sample locations from a network file. Reading in nor plotting is a problem, however when I am trying to sample from the file I get the following message:   nwlim<-readShapeLines("C:/Limburg_nwshape", proj4string=CRS("+init=epsg:31300")) plot(nwlim)   randacc<-spsample(nwlim,n=1000,"random") Error in function (classes, fdef, mtable)  :   unable to find an inherited method for function "coordinates", for signature "numeric"     I found a similar error message in the archives, where prof. dr. Bivand indicated to try to use re...
2008 Jul 26
2
Spatial Sample
Hi! How can I make a spatial sample? Can someone recommend theorical books and materials for this? -- Raphael Saldanha UFJF - Brazil [[alternative HTML version deleted]]
2009 Nov 18
0
Effective measurement of point-polygon distance
...10,15,17,15,10,10) )))))) w2 <- SpatialLines(list(Lines(list(Line(cbind( c(65,67,76,68,65), c(30,29,24,22,30) )))))) # Test points: x = c(5, 7, 35, 28) y = c(60, 70, 90, 85) xy <- SpatialPoints(cbind(y,x)) distance <- rep(NA, 4) for (i in 1:4){distance[i] <- min(spDistsN1(coordinates(spsample((w1), n=50, type = "regular")), coordinates(xy[i,]), longlat=T))} for (i in 1:4){distance[i] <- min(spDistsN1(coordinates(spsample((w2), n=50, type = "regular")), coordinates(xy[i,]), longlat=T))} distance # What I need, is a for-loop (or something similar) that goes through...
2012 Feb 09
1
sample points - sp package
When I make a sample in sp, for example a random samping of 5 points in dataset1: sample.dataset1=spsample(dataset1, n = 5, "random") I have a sp object for the selected sampling... My question is : How can I extract from dataset2 the points & data for the coordinates(sample.dataset1) ? The dataset2 would be an object with the same area and coordinate system, but I would like to extract...
2012 Feb 22
1
How can I save plot()/points() using SHP files into KML format?
...reciated! Thanks in advance for any help. Gabe # Initialize pseudo random number generator set.seed(700124) # Read vector representation of the map Kasur <- readOGR("Kasur3.shp", layer = "Kasur3") # Plot points png("Kasur.png") plot(Kasur) points(spsample(Kasur, n=100, type='random'), col='red', pch=0, cex=0.5) dev.off() -- View this message in context: http://r.789695.n4.nabble.com/How-can-I-save-plot-points-using-SHP-files-into-KML-format-tp4412220p4412220.html Sent from the R help mailing list archive at Nabble.com.
2006 Oct 25
1
library loading errors (PR#9317)
...ror in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'sp' methods for export not found: bbox, coordinates, coordinates<-, coordnames, coordnames<-, gridded, polygons, polygons<-, dimensions, [, transform, overlay, plot, recenter, spplot, spsample, summary Error: package 'sp' could not be loaded >
2008 Aug 05
4
LIDAR Problem in R (THANKS for HELP)
...80, alpha=c(0, 45, 90, 135))) v = variogram(log(Z)~X+Y, subground, cutoff=1800, width=80, alpha=c(135, 45)) v.fit = fit.variogram(v, vgm(psill = 1, model="Gau", range=1800, nugget= 0, anis=c(135, 0.5))) plot(v, v.fit, plot.nu=F, pch="+") # create the new grid new.grid <- spsample(subground, type="regular", cellsize=c(1,1)) gridded(new.grid) <- TRUE fullgrid(new.grid) <- TRUE new.grid a grid #using Universal Kriging subground.uk = krige(log(Z)~X+Y, subground, new.grid, v.fit, nmax=40) #ERROR
2009 Jun 18
1
Stratified random sampling?
Rers: What is the preferred library/function for doing stratified random sampling from a dataset, given I want to control the number of samples (rather than the proportion of samples) per strata? Thanks! --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The Barn, Room
2012 Jan 06
2
Spatial data, rpoispp, using window with fixed radius?
Dear All, I was searching through the spatstat manual in order to find a function to simulate a Poisson pattern only within a fixed radius (circular moving window) around individual points. If points are distributed heterogeneously over a large area this may help to only assess deviation from CSR within the window and thus does not require additional information on a covariate. I could not find
2009 Jan 02
0
Spatial Data Analysis in R [was: Basic Question about use of R]
...ional noise fields.) >> I have become interested in the following type of problem: >> (1) select , say, 1000 random locations within the continental United >> States; > > This could be as simple as using the runif function, but more likely > you'll want to look at sp::spsample, or for more advanced tools see > the spsurvey and spatstat packages. > >> (2) characterize (statistically) the probabilities of: >> (a) distance to the nearest paved road; >> (b) elevation above sea level; >> (c) (?) ownership (public or private); etc. > >...
2009 Jan 02
1
Basic Question about use of R
Dear Sirs: I am not yet a user of R. My background includes the use of (Turbo) Pascal for scientific analysis of underwater acoustics problems (e.g. sound ray tracing and array gain in directional noise fields.) I have become interested in the following type of problem: (1) select , say, 1000 random locations within the continental United States; (2) characterize (statistically) the
2005 Jun 17
0
New CRAN package sp: classes and methods for spatial data
...types (e.g. points and grids, matrices, data.frames) + coordinates(x), which returns the spatial coordinates of x + bbox(x), returns the coordinates bounding box of x + overlay, to query the value of e.g. points in polygons or grid (essentially does a point-in-polygon or point-in-raster cell) + spsample, for random sampling methods over a spatial domain. An additional package (spproj) provides coordinate reference system transformation (projection and re-projection) using the PROJ.4 library [2]. Others (will) provide interfaces to GRASS 6 and gdal. A good deal of work has also gone into providin...
2005 Jun 17
0
New CRAN package sp: classes and methods for spatial data
...types (e.g. points and grids, matrices, data.frames) + coordinates(x), which returns the spatial coordinates of x + bbox(x), returns the coordinates bounding box of x + overlay, to query the value of e.g. points in polygons or grid (essentially does a point-in-polygon or point-in-raster cell) + spsample, for random sampling methods over a spatial domain. An additional package (spproj) provides coordinate reference system transformation (projection and re-projection) using the PROJ.4 library [2]. Others (will) provide interfaces to GRASS 6 and gdal. A good deal of work has also gone into providin...
2013 Apr 24
2
How to make a raster image in R from my own data set
Hi R-user, I was trying to make a raster map with WGS84 projection in R, but I could not make it. I found one data set in Google that data is almost the same format as of mine. I wanted to make a raster map of temperature with 1 degree spatial resolution for the global scale. I could make it in GIS software but I do have many variables (to be many raster images) and ultimately I am importing them
2013 Dec 22
3
generacion aleatoria de coordenadas
Hola a todos He estado trabajando con el paquete osmar y funciona muy bien.Puede alguien decirme donde encontrar informacion o algun script para generar una lista con N pares de puntos (longitud/latitud) aleatorios o siguiendo una funcion determinada dentro del marco de coordenadas definido por corner_bbox(left, bottom, right, top) para despues plotearlos. saludos eloy ortiz -- Este
2007 Aug 14
3
diffusing GIS data in maps
Hi- I am trying to find a way to diffuse GIS data on a European map. I have a dataset consisting of particular locations scattered across Europe, along with magnitude and value information. I can plot these as discrete points with something like the following: "geocode" is a dataframe with four columns: LAT; LONG; MAGNITUDE;VALUE. library(maps) library(mapdata)