[R] Excluding coordinates that fall within a circle
Bert Gunter
bgunter.4567 at gmail.com
Fri Jun 17 20:40:45 CEST 2016
...
and adding, perhaps, to what David and Jeff told you:
Let ctr = c(ctr.lat, ctr.long) be the center of a bird colony (this
can be vectorized for many centers).
Then you need to figure out how much change in latitude and longitude
a distance of 500 meters is at that ctr (I think latitudes are easy;
it's longitudes that vary in distance depending on where you. But I
hasten to add that I ain't an expert). You can approximate this by
pretending the latitudes and longitude are perpendicular on a plane
unless you are close to the poles.I strongly suspect there are
functions in geostatistics and/or ecology packages that do this:
search (e.g. web or rseek.org) on "convert distance to latitude and
longitude" or similar (this seemed to yield useful results when I
tried it). Then apply David's (and Jeff's) suggestions.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Jun 17, 2016 at 10:26 AM, Alice Domalik <adomalik at sfu.ca> wrote:
> Hi List,
>
> I'm working with some bird tracking data, and to filter the data set, I need to exclude points taken at the colony.
> I would like to exclude coordinates from within a 500 meter radius of a point centered on the colony.
> However, as an R novice, I'm not sure how to accomplish this.
>
> My df looks like this:
>
> AnimalID Latitude Longitude Datetime
>
> Any suggestions would be greatly appreciated.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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