Hello, Is there a way to find points in SpatialPoints which lie inside a given Polygon? -- Kind regards, Antonio Rodriges
On 21/12/11 01:54, Antonio Rodriges wrote:> Hello, > > Is there a way to find points in SpatialPoints which lie inside a given Polygon?You could try: * load package "spatstat" * convert your SpatialPoints object to an object of class "ppp" * convert your polygon to an object of class "owin" * use inside.owin() See vignette("shapefiles") for instructions on how to do the aforementioned conversion. cheers, Rolf Turner
Hello, Maybe this will help: There is "rgeos" package with gContains, gCovers, etc. It is a full implementation of Java Topology Suite http://cran.r-project.org/web/packages/rgeos/rgeos.pdf -- Kind regards, Antonio Rodriges
On 12/20/2011 12:54 PM, Antonio Rodriges wrote:> Hello, > > Is there a way to find points in SpatialPoints which lie inside a given Polygon? >Hi, Take a look at the over function from the sp-package. Paul -- Paul Hiemstra, Ph.D. Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 P.O. Box 201 | 3730 AE | De Bilt tel: +31 30 2206 494 http://intamap.geo.uu.nl/~paul http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770