[R-sig-Geo] Spatial join/intersection in R

Tom Philippi teph|||pp| @end|ng |rom gm@||@com
Wed May 1 07:15:46 CEST 2019


Roozbeh--

What do you want to have happen with those points? Given the units in your
figure, you could unambiguously assign them to the upper-right by adding a
small value (0.000001) to both the X and Y coordinates of your points.
Whether that is a sensible thing to do depends on what your data are.

How or why do the points fall exactly on your polygon boundaries?  What
process puts them exactly on the polygon (grid cell) boundaries?  It
appears your polygon boundaries are a grid at multiples of 0.05, although
not all potential cells in a rectangle are shown.  Are there many other
points not on polygon boundaries not shown in your figure, or are points
only along grid lines?  If the latter, does it make sense to assign them to
_polygons_ rather than line segments?

If you're doing a sample draw or measuring locations with only a few
decimal points of accuracy, and generating your polygon boundaries at exact
multiples of 0.05, then it might make sense to shift all of your points +
1/10th of your point location resolution so that their coordinates never
fall on polygon boundaries.  There _might_ be situations where instead of
always adding (shifting up and right), you should randomly add or subtract
in each direction for each point, but I'm stuck viewing this as points in
sTomample units so I can't think of such a case.

Tom
.

On Tue, Apr 30, 2019 at 7:18 PM Roozbeh Valavi <
rvalavi using student.unimelb.edu.au> wrote:

> Dear members,
>
> I want to do a spatial join/intersection in R. The problem is that some of
> my points are lying exactly at the border of the adjacent polygons (see the
> figure attached). So these points are either falling in both or none of the
> polygons! Is there any way to avoid this?
>
> Thanks in advance.
> Roozbeh
>
>
> [image: image.png]
>
>
>
> --
> *Roozbeh Valavi*
> PhD Candidate
> The Quantitative & Applied Ecology Group <http://qaeco.com/>
> School of BioSciences | Faculty of Science
> The University of Melbourne, VIC 3010, Australia
> Mobile: +61 423 283 238
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20190430/6e7783d8/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 27322 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20190430/6e7783d8/attachment.png>


More information about the R-sig-Geo mailing list