Skip to content

Winding Number

4 messages · Roger Bivand, Clint Bowman, Tim Keitt

#
On Fri, 2 Apr 2004, Clint Bowman wrote:

            
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?

  
    
#
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:

            

  
    
#
Clint,

Could you please report back to the r-sig-geo list on how you got this 
done so that others can benefit?

Roger
On Fri, 2 Apr 2004, Clint Bowman wrote:

            

  
    
#
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: