[R-sig-Geo] Fwd: Cut map
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Tue Aug 19 15:55:26 CEST 2014
On 08/19/2014 03:29 PM, Fabiana garcia papani wrote:
> ---------- Forwarded message ----------
> From: Fabiana garcia papani <fgarciapapani at gmail.com>
> Date: 2014-08-19 10:23 GMT-03:00
> Subject: Cut map
> To: r-sig-geo at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140819/82a2fe67/attachment.bin>
More information about the R-sig-Geo
mailing list