On 08/19/2014 03:29 PM, Fabiana garcia papani wrote:
> ---------- Forwarded message ----------
> From: Fabiana garcia papani <fgarciapap...@gmail.com>
> Date: 2014-08-19 10:23 GMT-03:00
> Subject: Cut map
> To: r-sig-geo@r-project.org
> 
> 
> I have a regular grid of points. I have a border. How to determine only the
> points inside  the border?

# assuming points is SpatialPoints and border is SpatialPolygons, then

# Determine which points:

require(sp)
which(!is.na(over(points, border)))

# Select them:

points[border,]


> 
>       [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to