Efficient extraction of all sub-polygons generated by self-intersecting features in a MultiPolygon

后端 未结 3 1821
孤街浪徒
孤街浪徒 2021-02-03 23:05

Starting from a shapefile containing a fairly large number (about 20000) of potentially partially-overlapping polygons, I\'d need to extract all the sub-polygons originated by i

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 00:01

    This has now been implemented in R package sf as the default result when st_intersection is called with a single argument (sf or sfc), see https://r-spatial.github.io/sf/reference/geos_binary_ops.html for the examples. (I'm not sure the origins field contains useful indexes; ideally they should point to indexes in x only, right now they kind of self-refer).

提交回复
热议问题