[R-sig-Geo] spplot - polygons with colored borderlines

2009-05-26 Thread Ingo Holz
colored polygons and colored borders? Thank you, Ingo On Tue, 26 May 2009, Ingo Holz wrote: > Hi, > > I am using function spplot (library sp) to plot polygons: > > spplot(SPDF, "var", col.regions=topo.colors(100)) > > SPDF is a SpatialPolygonsDataFrame > > S

[R-sig-Geo] spplot - polygons with colored borderlines

2009-05-26 Thread Ingo Holz
Hi, I am using function spplot (library sp) to plot polygons: spplot(SPDF, "var", col.regions=topo.colors(100)) SPDF is a SpatialPolygonsDataFrame Some of my polygons are very small and you can not see the color of the polygon (only the black borderlines). I could use spplot(as(SPDF,

[R-sig-Geo] spplot() - "grouping variable"

2008-09-26 Thread Ingo Holz
Hi, I use spplot to display the values of a SpatialPointsDataFrame. spplot(SPDF[,"var1"], col.regions=rainbow(100), pch =16) I have different types of locations (forests, pastures, etc) and would like to change the "point character" (pch) according to this "grouping variable". Is this or so

[R-sig-Geo] subregion of a SpatialGridDataFrame

2008-02-06 Thread Ingo Holz
Hi, this sounds like a stupid question, however: I have a SpatialGridDataFrame (SGDF) and want to cut a rectangular subregion from this SGDF to a new sub-region-SGDF. Is it possible to define a new bounding-box with two points and cut the subregion out of the SGDF? Ingo __

Re: [R-sig-Geo] cbind(SGDFone, SGDFtwo)

2007-12-20 Thread Ingo Holz
Sorry, I deleted one of the grids ... ;-) I will redo the analysis later and come back with the result of all.equal(getGridTopology(a), getGridTopology(b)) However, before I deleted the Grid I checked getGridTopology() for the two SGDF separately. They were the same! I solved the problem

[R-sig-Geo] cbind(SGDFone, SGDFtwo)

2007-12-20 Thread Ingo Holz
Hi, I want to use cbind to combine two SpatialGridDataFrames. SGDFone <- cbind(SGDFone, SGDFtwo) SGDFone and SGDFtwo resulted from the same SGDF they are copies like SGDFone <- SGDF; SGDFtwo <- SGDF. Only the dataframe part has been modified. However, using cbind() I get the error message

[R-sig-Geo] index a SpatialGridDataFrame

2007-12-19 Thread Ingo Holz
Hi, I would like to add data to a SpatialGridDataFrame (SGDF) in a loop. Something like for (i in 1:20){ SGDF[,,i] <- sgdf[,,1] } # sgdf is a SpatialGridDataFrame which is modified in the loop I get the error message that it is not possible to index an object of type S4.

[R-sig-Geo] overlay(SpatialPolygonsDataFrame, SpatialPointsDataFrame)

2007-12-13 Thread Ingo Holz
Hi, I have a SpatialPolygonsDataFrame (SPolyDF) and a SpatialPointsDataFrame(SPoiDF). The SPolyDF is a (very) large set of polygons (some 30.000) and the SPoiDF is actually a grid of some 60.000 points. I would like to use overlay(SPolyDF, SPoiDF) to get the information of the Polygon in a

[R-sig-Geo] change projection?

2007-11-22 Thread Ingo Holz
Hi, I imported a ESRIAsciiGrid with readGDAL(). The result is a SpatialGridDataFrame (SGDF). The projection of the grid (only the xllcorner, yllcorner ?) is: Projection LAMBERT Units METERS SpheroidBESSEL (more details at the end of this email) Ho

[R-sig-Geo] spplot(), SpatialGridDataFrame

2007-11-19 Thread Ingo Holz
Hi, I have a SpatialGridDataFrame and want to plot it with spplot(). Is it possible to plot only the grids that have a special value (eg. 312)? If it is not possible to do this with spplot() how would it be done with plot()? Thanks, Ingo ___ R-si

[R-sig-Geo] semi-transparent layer with image()

2007-11-16 Thread Ingo Holz
Hi, is there an easier way to get a semi-transparent grey-palette? plot(1:90, 1:90, pch=16, cex=2, col="red") points(1:90, 1:90, pch=16, cex=2, col=rgb(t(col2rgb(grey(90:1/90))), alpha=100, maxColorValue=255)) windows() does support semi-transparent colours Thanks, Ingo [[alternat

[R-sig-Geo] semi-transparent layer with image()

2007-11-16 Thread Ingo Holz
Hi, I have two objects of "class image" (a list of x, y, z coordinates, where z is a matrix and x and y are row names / col names). I would like to overlay one of this images on top of the other. As a semi- transparent overlay. Is this possible using function image()? I suppose I could set

[R-sig-Geo] readAsciiGrid (maptools) 2

2007-11-13 Thread Ingo Holz
Hi again, OK, it is not a problem of readAsciiGrid (maptools)! However: x <- 3539000.5 : 354.5 ## OK, readAsciiGrid adds .5 to the coordinates length(x) x[1:10] min(x) ## OK, this is the rounded value summary(x) ## I still do not understand th

[R-sig-Geo] readAsciiGrid (maptools)

2007-11-13 Thread Ingo Holz
Hi, I have an ESRI-Ascii-Grid file which looks like this: ncols 1001 nrows 1001 xllcorner 3539000 yllcorner 5379000 cellsize 1 NODATA_value - 766,65 766,65 766,67 766,69 766,7 766,72 766,74 766,76 766,78 766,8 766,83 I imported this file as.image with readAsciiGrid(): kachel1 <- readAsc

[R-sig-Geo] spplot -> sp.layout -> sp.text - only one "text" at the same time?

2007-11-11 Thread Ingo Holz
Hi, I am using spplot() and want to label points in the produced map by using sp.layout. SPolyDF = a SpatialPolygonsDataFrame SPointsDF = a SpatialPointsDataFrame Something like this: l1 <- list("sp.text", coordinates(SPointsDF[,1]), SPointsDF[["Name"]][1]) spplot(SPolyDF[, "Name"], sp.l

Re: [R-sig-Geo] spplot legends for each subplot

2007-11-10 Thread Ingo Holz
Hi, it only happens using png(). It does not if I *.emf, *.jpg or *.bmp. A simple reproducable example (from the print.trellis help file): ## outfile <- ".../outfile.png" ### ... = your output directory p11 <- histogram( ~ height | voice.part, data = singer, xlab="Hei

Re: [R-sig-Geo] spplot legends for each subplot

2007-11-09 Thread Ingo Holz
ED]> Subject: Re: [R-sig-Geo] spplot legends for each subplot To: [EMAIL PROTECTED] Cc: Ingo Holz <[EMAIL PROTECTED]>, r-sig-geo@stat.math.ethz.ch Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I fully agree with Roger's comm

[R-sig-Geo] spplot legends for each subplot

2007-11-08 Thread Ingo Holz
Hi, is it possible to have different legends for each subplot in a figure produced by spplot() ? Thanks, Ingo ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] change a value in the dataframe of a SPDF

2007-11-07 Thread Ingo Holz
Hi, I changed a specific value in the dataframe of a SpatialPolygonsDataFrame in the following way: SPDF[["Name"]][1] <- 1 This needed a very long time (about 10 seconds). I have two questions: Is there a faster way to do it? Why did it need that much time like I did it? Thank you,