Crop for SpatialPolygonsDataFrame

后端 未结 4 1056
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 09:21

I have two SpatialPolygonsDataFrame files: dat1, dat2

extent(dat1)
class       : Extent 
xmin        : -180 
xmax        : 180 
ymin        : -9         


        
4条回答
  •  广开言路
    2020-12-01 09:53

    You cannot use crop on sp polygon objects. You will need to create a polygon representing the bbox coordinates of dat2 and then can use gIntersects in the rgeos library.

    Edit: This comment was in relation to the version available in 2012 and this is no longer the case.

提交回复
热议问题