R : convert a spatial polygon objet to spatial polygon data frame

المشرف العام

Administrator
طاقم الإدارة
My goal is to modify an existing shapefile by merging certain polygons.

After importing the shapefile and using the UnionSpatialPolygons command, I get the polygon outline that I want.

However, this is now a SpatialPolygons object and not a SpatialPolygonsDataFrame, so I'm unable to export it to a shapefile using writeOGR.

How can I get around this problem?

Thanks in advance,

John



أكثر...
 
أعلى