Skip to content
Back to formatted view

Raw Message

Message-ID: <A30E66E6-767B-48BB-ABE0-2D1E6AB2A79C@exeter.ac.uk>
Date: 2009-02-05T14:51:36Z
From: Baptiste Auguie
Subject: maptools: Test if point is in polygon
In-Reply-To: <be0315fb0902050521h7f97bdf0pe64dc8f817c6998d@mail.gmail.com>

I don't know about the maptools package but one general way to do this  
would be to compute the convex hull (?chull)  of the augmented set of  
points and test if the point belongs to it.

Hope this helps,

baptiste



On 5 Feb 2009, at 13:21, Aleksandr Andreev wrote:

> In R's maptools package, is there a built-in function to test if a
> given point is "inside" a given polygon on the map?  The map was
> loaded from an ESRI Shapefile. The point's latitude and longitude are
> known.
>
> Thank you!
>
> Aleks
>
> --
> ------------------------
> Aleksandr Andreev
> Fulbright Fellow
> Graduate School of Management
> St Petersburg State University
>
> ______________________________________________
> 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.

_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag