similar to: Getting polygons from contiguous grid cells having same value in sp

Displaying 20 results from an estimated 1000 matches similar to: "Getting polygons from contiguous grid cells having same value in sp"

2004 Jun 14
1
polygons around clusters of identically valued nodes in levelplot()
I'm looking for a way to plot lines on top of a levelplot(), where the lines are borders between cells of different values. The clines() function provides contours suitable for continuous data. I am dealing with discrete values, spatial clusters of nodes where each cluster has an integer value, and I want to plot the borderlines between these areas. So, in a levelplot having nodes with
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) -
2008 Jul 01
2
Are centre coordinates or upper left corners used of x, y for SpatialPixels?
Dear all, I'm working with satellite images in R and plotting them via the code below. I was wondering whether coordinates (spatial["x"], spatial["y"]) are used as centre coordinates of the pixels in the GRID? In this script; spatial["x"] & spatial["y"] are the centre coordinates of the satellite image pixels. I'm asking this because some
2007 Apr 25
2
levelplot and unequal cell sizes
I am using levelplot() from lattice with grids that have unequal cell sizes. This means that the boundary between two cells is not always half-way between nodes, as levelplot() assumes. The result is that some cell sizes are rendered incorrectly, which can be painfully obvious if using relatively large cells. Is there any work-around? I am using the conditioning capability of lattice and
2008 Nov 12
1
rimage doesn't install on Mac OS X 10.4
Hi, I'm trying to install rimage on a Mac OS X 10.4 machine. I followed the advice in previous R-help threads and got over the hurdles of having the header files in the right places, among other things. But I can't figure out what to do with this error. ice.pnl.gov:/home/waichler<949>system_profiler -detailLevel mini SPSoftwareDataType Software: System Software Overview:
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
2012 Feb 23
1
using shapefiles in adehabitat/ converting shapefile to spatial pixel data frame
Hello I wonder if anybody can help, I am using the package adehabitatHR to estimate the potential distribution of a species using the command "domain" In the example given in the AdehabitatHS manual a map containing elevation information is loaded (class= spatial pixels data frame) as well as the GPS points of the animals being tracked, these are then plotted on each other and
2005 Apr 22
3
Problem with R-2.1.0: install.packages() doesn't work
I installed R-2.1.0 from source on a Linux box running Red Hat Enterprise Linux WS release 4 but install.packages() wouldn't work (see below). When I install R-2.0.1 from RPM on the same system, everything is fine. Version 2.1.0 (2005-04-18), ISBN 3-900051-07-0 . . . > options(CRAN = "http://cran.fhcrc.org/") > install.packages("rgenoud") --- Please select a CRAN
2008 Oct 13
2
Using an image background with graphics
I would like to use a map or aerial photo as a background to plotting solid lines and text, and semi-transparent color contours, in base and lattice graphics. Plot coordinates need to be consistent with the georeferenced background. For example, a color contour plot would have an gray-toned aerial photograph as a background for overprinted semi-transparent color contours of some spatially
2006 Jun 27
3
Possible to get a definition of a function from a package to use without invoking the package?
Hi, I often use the mod() and instring() functions that are available in the clim.pact package. This package has a lot of dependencies, including installation of netCDF, and I haven't yet been able to get library(clim.pact) to work on a Mac OS 10.4.6. A previous request for help with the Mac problem yielded no results, so now I wonder if I could just extract the definitions for the couple
2004 Oct 14
3
Problem with number characters
I am trying to process text fields scanned in from a csv file that is output from the Windows database program FileMakerPro. The characters onscreen look like regular text, but R does not like their underlying binary form. For example, one of text fields contains a name and a number, but R recognizes the number as something other than what it appears to be in plain text. The character string
2006 Jan 14
2
change lattice panel background color
I can't find a way to change just the panel background color in lattice. I would like NA regions in levelplot() to appear black. I've tried the trellis.par.set() stuff, but it it makes the background of the whole graphic black. Thanks, Scott Waichler Pacific Northwest National Laboratory scott.waichler _at _ pnl.gov
2010 Feb 11
2
Using contour3d: axes, plotting to file, with lattice
I am looking for examples of how to plot with contour3d() to a PNG or PDF file, add axes and other elements to the isosurface plot, and use contour3d in conjunction with lattice. Regarding lattice, I'm not necessarily looking for conditioning on the data shown in the isosurface plots, just a way to show multiple plots in one figure and label them. I am new to the packages misc3d and rgl.
2002 Mar 27
2
Vertical bars with barchart()
I would like to create a barchart that has vertical instead of horizontal bars. My goal is something similar to Figure 6.10 (p. 166) in "The Basics of S and S-plus," except for the orientation of the bars. I don't think bwplot() or xyplot() will work. Any suggestions? Scott Waichler Hydrology Group/Environmental Technology Division Battelle Pacific Northwest National Laboratory
2003 Nov 13
1
Can't get Sweave syntax highlighting with Emacs
I can't get Emacs to automatically do syntax highlighting of Sweave files. I have followed Friedrich's suggestion for code to insert into my .emacs file. The complete section from my .emacs file is given below. When I load a *.Snw file, font is white until I press M-x, then the first code and document chunks get highlighted, but not the rest of the file. Latex and Noweb menus are
2002 Feb 06
1
dev.off() prematurely stops xyplot()
I have a script containing an xyplot() to print to a postscript file, followed by dev.off(). When I source the script, the dev.off() seems to cut off the xyplot() execution before it is finished. The resulting postscript file has about the right size, but it appears blank when I try to view it. If I manually execute the xyplot(), then wait for the return of the R prompt before executing
2010 Jan 21
0
sp package - How to join two or more polygons from a SpatialPolygonsDataFrames
I have a SpatialPolygonsDataFrame object (sp package). It contains 40 polygons. Now I want to join some of the polygones. I cannot figure out how to do that? Any ideas? The code below produces a map of Germany and I need to join some counties. library(sp) library(RColorBrewer) # get spatial data for Germany on county level con <- url("http://gadm.org/data/rda/DEU_adm3.RData")
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
2010 Mar 03
2
Screen settings for point of view in lattice and misc3d
I'm making some 3D plots with contour3d from misc3d and wireframe from lattice. I want to view them from below; i.e. the negative z-axis. I can't figure out how to do so. I would like my point of view looking up from below, with the z, y, and x axes positive going away. Can anyone tell me the correct settings for screen to achieve this? Here is what I've found so far:
2006 Apr 20
1
Parallel computing with the snow package: external file I/O possible?
Hello, After getting help to solve part of my problem and some delay on my part, I am posting a more refined version to see if someone can help me further. I am trying to autocalibrate a model in my subject area using the snow and rgenoud packages. I want to use the key function "fn" that is called by genoud() to finalize input, run the model executable, and compute the objective