Re: [R] basic spatial query

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Mon, 28 Jan 2008 11:41:12 +0000 (UTC)

 <jgarcia <at> ija.csic.es> writes:

>
> Hello;
> Please coud you advise me of a simple way to select points (x,y
> coordinates) that fall within a polygon.
> I've got a set of polygons, each one defined by an arbitrary number of
> points, and several points inside each polygon.
> I know this is simple with a GIS, but I'd rather do it inside R.

If your data are geographical, please see ?"overlay-methods" in the sp package. You may also choose to follow up this question on the R-sig-geo list. There are also ways of doing this at a lower level (without creating sp objects first) in at least the splancs package, say if the data are not geographical.

Roger  

> Thanks and best regards,
> Javier
> -----
>
> ______________________________________________
> R-help <at> r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 28 Jan 2008 - 11:44:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jan 2008 - 12:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive