[R-sig-Geo] gIntersection - Input geom 0 is invalid
Milan Cisty
milan.cisty at stuba.sk
Sun Jan 25 13:55:02 CET 2015
Thanks Lyndon, but in my case it did not help. I find simple solution suitable
in my case here:
http://gis.stackexchange.com/questions/93096/how-to-perform-a-true-gis-clip-of-polygons-layer-using-a-polygon-layer-in-r
originally I had:
podnyDruh=gIntersection(textura, zavlahaJTSK)
which produce error, but when I run it this way, it run OK:
podnyDruh=gIntersection(textura, zavlahaJTSK, byid=TRUE)
On Sat, 24 Jan 2015 20:22:10 +0100
"Milan Cisty" <milan.cisty at stuba.sk> wrote:
>Dear list members.
>I tried intersection of two SpatialPolygonsDataFrames and I get following
>error:
> > podnyDruh=gIntersection(textura, zavlahaJTSK)
>Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly,
>"rgeos_intersection") :
> TopologyException: Input geom 0 is invalid: Self-intersection at or near
>point -536834.52051807998 -1210383.10809479 at -536834.52051807998
>-1210383.10809479
>I believe, that there is refered error in data (in geom 0), but I would like
>to
>ask if there is not possible some workaround this (I want to do more
>intersections). When I made shp files it was possible to accomplish
>intersection in ArcGIS, so maybe there is some trick how to accomplish it also
>in R. Referred error in geom 0 is not in area of my interest.
>I am not sending data because I do not think its necessary, but I can if it
>could help.
>Thanks,
>Milan
More information about the R-sig-Geo
mailing list