希望在R中相交两个LINESTRING。
nc1 = st_read(shp_file_1)
nc2 = st_read(shp_file_2)
以上步骤成功,shapefile可以加载到R中。
res= st_intersects(nc1, nc2)
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, :
Evaluation error: IllegalArgumentException: point array must contain 0 or >1 elements.
所以,如何解决?谢谢。
我检查了shapefile nc1,发现每个特征只有LINESTRING
,每个特征只有1点。