: Waichler, Scott R; r-help@r-project.org
> Subject: Re: [R] problem with pip2d() from ptinpoly
>
> Apparently it matters whether your polygon is defined clockwise or
> counterclockwise.
>
> A point outside your triangle is recognized ...
> > q2 <- matrix(c(594893.
Apparently it matters whether your polygon is defined clockwise or
counterclockwise.
A point outside your triangle is recognized ...
> q2 <- matrix(c(594893.0,115435.0), ncol=2, byrow=T)
> pip2d(Vertices = verts, Queries = q2)
[1] 1
... and defining the triangle in counterclockwise sense gives
Hi,
pip2d() doesn't seem to work correctly for me. I have a plot of a triangle
that a query point fits inside, but the point is defined as outside the polygon
by pip2d.
library(ptinpoly)
verts <- matrix(c(594891,115309,59,117201,594891,117201), ncol=2, byrow=T)
query <- matrix(c(594885.0
3 matches
Mail list logo