1

gDifference2 つのポリゴンの間で実行しようとしていますが、エラーが発生しました。

Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, "rgeos_intersection") : TopologyException: Input geom 0 is invalid: Self-intersection at or near point. 

だから私はこれをしました:

polygone1 <- gBuffer(polygone1, byid=TRUE, width=0)
polygone2 <- gBuffer(polygone2, byid=TRUE, width=0)
res <- gDifference(polygone1, polygone2)

しかし、今は別のエラーが発生しています:

Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td, "rgeos_difference") : 
  TopologyException: EdgeRing::computePoints: found null Directed Edge

これを修正する方法はありますか?ArcGIS の Erase 関数でまったく同じことを行うと、まったく問題なく動作します。

4

0 に答える 0