[R-sig-Geo] Polygon hole=TRUE not being preserved?

2010-02-25 Thread Don MacQueen
I'm puzzled by an apparent change of @hole from TRUE to FALSE when a Polygon object becomes part of a Polygons object. Here's an example, adapted from ?overlay r2 <- cbind(c(180042, 180545, 180553, 180314, 179955, 179142, 179437, 179524, 179979, 180042), c(332373, 332026, 331426, 330889, 33

Re: [R-sig-Geo] selection a right number in a sequance for a RS filter sampling

2010-02-25 Thread Clint Bowman
If I understand the sequence, you want the odd columns from the odd rows and the even columns from the even rows to "a" and the remainder go to "b". Once you have a transposed matrix, the recipe looks straightforward. Clint -- Clint BowmanINTERNET: cl...@ecy.wa.gov

[R-sig-Geo] selection a right number in a sequance for a RS filter sampling

2010-02-25 Thread gianni lavaredo
dear Researcher Sorry that I know this is not the right email-list and this is a basic help but I am doing a remotesensing filter and I am honest, I have no idea how I can do this. I have a sequance form 1 to 16 > seq(1:16) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 and I wish to sele

[R-sig-Geo] An easy way to extract an irregular volume from a regular SpatialPointsDataFrame

2010-02-25 Thread Mark Connolly
I am interpolating a SpatialGridDataFrame from an irregular volume. I would like to retrieve the data as the shape of the original volume. Any chance there is an easy way to do such a thing? Mark Connolly -- Graduate Student, Master of Science Department of Soil Science North Carolina State

Re: [R-sig-Geo] overlay() in raster package

2010-02-25 Thread Wearn, Oliver
Thanks Kamran, unfortunately I don't think the placement of 'else' has any effect - the same errors arise. To answer the request for more details, here's a self-contained version of what my data pretty much looks like: require(raster) rs <- raster(system.file("external/test.grd", package="raste

[R-sig-Geo] overlay() in raster package

2010-02-25 Thread Wearn, Oliver
Dear all, I'm trying to use the overlay() function in the raster package, but can't get 'if' clauses to work. Can anyone help? I have two rasters, the first of which I would like to modify, depending on the value in the second (a forest cover raster). Specifically, if the value in the first (c