Re: [R-sig-Geo] RPyGeo Query -- probably easy

2009-12-17 Thread Maarten van Strien
Hi All, I was wondering if anyone has found a solution to the mentioned problem, as I have a similar problem with a query function in RPyGeo. I am trying to use the 'select_analysis' ArcGIS function that uses an sql expression to select certain values/names from a field in an attribute table. Th

Re: [R-sig-Geo] How to crop a shapefile ?

2009-12-17 Thread Roger Bivand
On Thu, 17 Dec 2009, Dan Putler wrote: Hi all, For this particular problem, Dylan Beaudette is probably exactly right. However, I ran into problems using similar tools in OpenJump when we wanted to create a shapefile of a region that we could postal address geocode against (the way the boundary

Re: [R-sig-Geo] How to crop a shapefile ?

2009-12-17 Thread Dan Putler
Hi all, For this particular problem, Dylan Beaudette is probably exactly right. However, I ran into problems using similar tools in OpenJump when we wanted to create a shapefile of a region that we could postal address geocode against (the way the boundary line segments were clipped was a problem

[R-sig-Geo] Beta sp release 0.9-53 with C *Polygon* API

2009-12-17 Thread Roger Bivand
Could I ask list participants who maintain packages depending on sp, or who use sp in intensive ways with *Polygon* objects to consider trying out the forthcoming release: http://spatial.nhh.no/R/Devel/sp_0.9-53.tar.gz # source http://spatial.nhh.no/R/Devel/sp_0.9-53.zip # R 2.10.1 Windows bina

Re: [R-sig-Geo] How to crop a shapefile ?

2009-12-17 Thread Dylan Beaudette
> On Thu, 2009-12-17 at 11:07 +0100, Baptiste Coulmont wrote: > > Hi, > > > > I'm working with R and various shapefiles created by the OpenStreetMap > > project. Those shapefiles (the roads in particular) are quite big. > > > > How can I crop (or "trim", or "prune" those objects -- once in a > > Sp

Re: [R-sig-Geo] How to crop a shapefile ?

2009-12-17 Thread Dan Putler
Hi, I have used the sp pacakge, along with several other tools, to do exactly this (although using road network files from other sources). It can be done entirely within R via sp, and I've written R only code to do it, but found it very slow (someone else on the list may have an idea as to how to

Re: [R-sig-Geo] How to crop a shapefile ?

2009-12-17 Thread Renaud Lancelot
Hi Baptiste, I recently met a similar issue, and ended to the solution described here (unfortunately, it's in French :-)): ftp://ftp.cirad.fr/pub/group-r/groupe-r/Fiches/Foret.pdf It uses point.in.polygon (package sp), and it is adapted to the special case of the shapefile containing polygon

Re: [R-sig-Geo] create nb object

2009-12-17 Thread Roger Bivand
On Thu, 17 Dec 2009, Pete Larson wrote: Roger, OK, I did what you indicated here: xy<-coordinates(fish) test<-knn2nb(knearneigh(xy)) with a summary: summary(test) Neighbour list object: Number of regions: 341 Number of nonzero links: 341 Percentage nonzero weights: 0.2932551 Average number of

Re: [R-sig-Geo] create nb object

2009-12-17 Thread Pete Larson
Roger, OK, I did what you indicated here: xy<-coordinates(fish) test<-knn2nb(knearneigh(xy)) with a summary: summary(test) Neighbour list object: Number of regions: 341 Number of nonzero links: 341 Percentage nonzero weights: 0.2932551 Average number of links: 1 Non-symmetric neighbours list T

Re: [R-sig-Geo] spplot : varying dots for multiple parameters

2009-12-17 Thread Torleif Markussen Lunde
In that case I would produce: pdf("filename.pdf") print(spplot(Insitu_sp, "SPM", parameters as suggested earlier)) dev.off() pdf("filename.pdf") print(spplot(Insitu_sp, "Si", etc)) dev.off() and edit (move legends etc) in Incscape or some other post editing software. That would be the fastest w

[R-sig-Geo] How to crop a shapefile ?

2009-12-17 Thread Baptiste Coulmont
Hi, I'm working with R and various shapefiles created by the OpenStreetMap project. Those shapefiles (the roads in particular) are quite big. How can I crop (or "trim", or "prune" those objects -- once in a SpatialLineDataFrame -- if I need to work not on a national level but on a municipal level

Re: [R-sig-Geo] spplot : varying dots for multiple parameters

2009-12-17 Thread servet ahmet çizmeli
Wow this list is awesome. I have been in lists for a longtime but never saw such a good intentioned support in any other place. Thanks Torleif and everyone else for taking time and producing code for me. Torleif's code creates maps that are close to what I seek to reproduce. The normalization pe

Re: [R-sig-Geo] create nb object

2009-12-17 Thread Roger Bivand
On Wed, 16 Dec 2009, Pete Larson wrote: Hello all, I have a data frame with lat and lon coordinates for some sample areas (not a grid) . I was to create an nb object that I can use with spdep but am unsure as to how to convert it. Does anybody have any ideas? Create a matrix of coordina

Re: [R-sig-Geo] plot shape file using lattice xyplot

2009-12-17 Thread Roger Bivand
On Wed, 16 Dec 2009, Zia Ahmed wrote: Thanks Andrews. It works fine. Nothing wrong with sp plot. I need to plot boundary around of sampling locations. R-script I have written, I used xyplot and levelplot. This look like a two-step question, assuming that you need a line representation of p