Members of this list may be interested in http://www.vividsolutions.com/jts/jtshome.htm. There is a C++ port asw well by the postgis folks.
Tim On Fri, 2004-04-02 at 12:29, Clint Bowman wrote: > Roger, > > Thanks for your reference. Since I can get the polygon coordinates (and > have the coordinates of my sites, I can cobble together a function that > will do the trick. > > Again, thanks, > > Clint > > On Fri, 2 Apr 2004, Roger Bivand wrote: > > > On Fri, 2 Apr 2004, Clint Bowman wrote: > > > > > I have shapefiles for the state climatic divisions for the United States > > > and read.shape brings them in wonderfully. Now I wish to run through a > > > list of several thousand observation sites to find out in which division > > > each is located. I figure that I can compute the winding number for each > > > site and be done. However a search doesn't find any references and I > > > can't find a winding number function among the map/tools/stats. I have > > > the code for an efficient C++ but was expecting that it would already be > > > implemented as an R function > > > > > > Since I haven't used the map/tools/stats collection before, I suspect I'm > > > overlooking the function and would be thankful for a pointer. > > > > > > > This is work in progress - where all good ideas and contributions will be > > welcome. If you look on http://sourceforge.net/projects/r-spatial/, you > > will see an "alpha" package called "sp", which already has a > > point-in-polygon facility, but which may not scale up to the kinds of data > > volumes you have, but which invites a spatial query (match polygon?) > > function between a SpatialDataFrame with point coordinates and a > > SpatialDataPolygons object (sometime). This is only as source packages so > > far, so Windows binaries are not yet available. > > > > I have used the splancs package inout() function before, trying the points > > coordinate matrix on each polygon in turn; splancs is available as a > > Windows binary. This ought to be less "rough at the edges", and in time > > will be. The immediate solution is to use splancs, but this will not work > > if the Shapes have multiple polygons. There is a more specialised list for > > these kinds of questions in addition to r-help: > > > > https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo > > > > and since yesterday (thanks to Jonathan Baron), its archives are also > > searchable from: > > > > http://finzi.psych.upenn.edu/search.html > > > > This question hasn't come up there, but maybe we could move further > > discussion there - posting only for subscribers? > > > > > TIA > > > > > > Clint > > > > > > > > > > -- Timothy H. Keitt Section of Integrative Biology University of Texas at Austin http://www.keittlab.org/ ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html