[R-sig-Geo] Incorrect result of gDisjoint in rgeos?
zbynek.janoska at centrum.cz
zbynek.janoska at centrum.cz
Tue Feb 26 11:59:02 CET 2013
Hello,
I have encountered strange results, when using Geometry Relationship tools
in rgeos package.
I have set of lines and points and want to check, which point lies on which
line.
The results, which I obtain using rgeos tools, are incorrect, however.
For example, I have point 59 and line 63.
Point 59 is endpoint of this line:
> coordinates(point[59,])
x y
point -641291.2 -1115435
> coordinates(line[63,])[[1]][[1]][1,]
[1] -641291.2 -1115435.2
> coordinates(line[63,])[[1]][[1]][1,] == coordinates(point[59,])
x y
point1 TRUE TRUE
But rgeos sees them as disjoint geometries
> gDisjoint(line[63,],point[59,])
[1] TRUE
Point 59 was initialy created by taking first vertex of line 63, and there
was no rounding used, therefore I dont think this error is due to rounding
error.
Also both lines and points have the same coordinate system.
I can not seem to find the explanation, does anyone have any suggestion?
Thanks,
Zbynek
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Incorrect-result-of-gDisjoint-in-rgeos-tp7582819.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list