[R] Creating polygons from scattered points

R. Michael Weylandt michael.weylandt at gmail.com
Wed Mar 14 14:14:15 CET 2012


This might be a question for the R-SIG-Geo or R-SIG-Ecology lists.

Best,
Michael

On Wed, Mar 14, 2012 at 7:13 AM, Louise Mair <lm609 at york.ac.uk> wrote:
> Hello,
>
> I have a distribution dataset for species consisting of xy coordinates at
> the 1km resolution, with only presence data. So a simplified example of a
> species distribution might be:
>
> y <- rbind(as.integer(rnorm(100,50,20)), as.integer(rnorm(200,100,30)),
> as.integer(rnorm(100,180,15)))
> x <- rbind(as.integer(rnorm(200,50,20)), as.integer(rnorm(200,100,20)),
> as.integer(rnorm(100,200,15)))
> plot(y~x)
>
> I would like to create polygons for each species distribution, where if an
> island is present (as I have tried to show in the example), it would be a
> seperate polygon, and the jagged edges of coastlines etc are maintained. I
> have spent ages trying to find a package that will allow me to convert
> scattered point distributions to polygons but haven't found anything that
> works, the functions I have found require the data already to be in the
> format where the only xy coordinates present are the outline of the
> polygon.
>
> Can anyone please recommend a function I can use here, or suggest a way of
> extracting the outline points? I have tried this manually but cannot seem
> to write a code that will effectively take account of jagged edges and
> islands.
>
> Thanks very much for your help,
>
> Louise.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.



More information about the R-help mailing list