[R-sig-Geo] using alpha transparency for lines in spplot

2007-03-21 Thread Michael Sumner
Hello, I'm having trouble with using the alpha channel for transparency with lines with spplot and sp.lines. If I use transparency via the alpha argument to rgb to overplot lines on spplot.grid the transparent colour affects all of the colours in the plot. Example follows. I've put the pdfs a

Re: [R-sig-Geo] help on Polygon(sp)?

2007-03-21 Thread Roger Bivand
On Wed, 21 Mar 2007, Virgilio Gómez-Rubio wrote: > Hi, > > > #errors occurs > > env.lab <- Kenv.label(case_pts,control_pts,splancs_poly, nsim=999, seq > > (0,23000,500)) > > error:v error in erifyclass(X, "ppp") : argument 'X' is not of class > > 'ppp' > > > > Q1: Now that khat(splancs)

Re: [R-sig-Geo] help on Polygon(sp)?

2007-03-21 Thread Virgilio Gómez-Rubio
Hi, > #errors occurs > env.lab <- Kenv.label(case_pts,control_pts,splancs_poly, nsim=999, seq > (0,23000,500)) > error:v error in erifyclass(X, "ppp") : argument 'X' is not of class > 'ppp' > > Q1: Now that khat(splancs) goes fine, why not Kenv.label(splancs)? > From the help, it didn't

Re: [R-sig-Geo] help on Polygon(sp)?

2007-03-21 Thread zhijie zhang
Virgilio Gómez-Rubio, Thanks for your rapid reply. I have got some progress, but still have some problems. #read the data case<-readShapePoints("d:/d/case.shp") control<-readShapePoints("d:/d/control.shp") guichi<-readShapePoly("d:/d/guichi2.shp") #Conversion case_pts <- coordinates(case) control

Re: [R-sig-Geo] help on Polygon(sp)?

2007-03-21 Thread Virgilio Gómez-Rubio
Hi, El mié, 21-03-2007 a las 22:45 +0800, zhijie zhang escribió: > Dear friends, > I have a .shp file of region boundary, and i want to use it as the polygon > in the khat(splancs) function, but it goes wrong. > # khat(pts,poly,s,newstyle=FALSE) > > guichi<-readShapePoly("d:/d/guichi2.shp") #

[R-sig-Geo] help on Polygon(sp)?

2007-03-21 Thread zhijie zhang
Dear friends, I have a .shp file of region boundary, and i want to use it as the polygon in the khat(splancs) function, but it goes wrong. # khat(pts,poly,s,newstyle=FALSE) guichi<-readShapePoly("d:/d/guichi2.shp") # read the shp data of region boundary guichi2<-Polygon(coordinates(guichi), ho

Re: [R-sig-Geo] intersection of two polygons

2007-03-21 Thread Roger Bivand
On Wed, 21 Mar 2007, Stéphane Dray wrote: > I just checked the code and see that my function was not optimal (too > much loops). I think that it can be easily improve and I can try to > write a intersectSpatialPolygons. There is a unionSpatialPolygons in > maptools, I think that an intersect f

Re: [R-sig-Geo] intersection of two polygons

2007-03-21 Thread Stéphane Dray
I just checked the code and see that my function was not optimal (too much loops). I think that it can be easily improve and I can try to write a intersectSpatialPolygons. There is a unionSpatialPolygons in maptools, I think that an intersect function could be also useful. For instance, one th

Re: [R-sig-Geo] Distances between points bounded by a polygon

2007-03-21 Thread Roger Bivand
On Tue, 20 Mar 2007, Andrew Niccolai wrote: > Greetings spatial R users, > > I have a question that is most likely straightforward but I am stuck on this > one! > > I have a set of points that can be of the class "SpatialPoints" or of the > class "ppp" and they reside within a polygon of the cla

Re: [R-sig-Geo] intersection of two polygons

2007-03-21 Thread Roger Bivand
On Tue, 20 Mar 2007, Stéphane Dray wrote: > I have a code that do the job for polylist objects at > http://biomserv.univ-lyon1.fr/~dray/files/softwares/spatialRLQ/spatialrlq.R > > The function uses gpclib and only returns area or binary matrices (1 > intersect, 0 not). It could be easily modify