Skip to content
Prev 361823 / 398506 Next

Excluding coordinates that fall within a circle

This would be a good question for R-sig-geo.

To do it properly, there would be a few steps:

1. transform from lat/long (units=degrees) to projected coordinate system
(units = meters)

2. find one of the R functions for calculating distances (there are
several)

3. subset the data according to your distance threshold

The sp package provides a lot of the fundamental tools for these kinds of
things.

The spDists() function in the sp package may take care of both steps 1 and
2.

The overhead required to learn R's spatial capabilities can be
significant, but I think will be worth it if you will be needing to do a
lot of spatial manipulations.

-Don