Skip to main content
3 of 4
Fixed code block, removed redundant text and formatted post

How to export a dataset with "SpatialPolygonsDataFrame" as a shapefile

How to export spatial datasets in R, such as tornados dataset in GISTools package, as a shapefile with the exact same spatial reference and the exact values?

library(GISTools)

data(tornados)

Desired:

  • "SpatialPolygonsDataFrame" to "shapefile"
  • "(Forced) SpatialPointsDataFrame" to "shapefile"
  • "(Non-Forced) SpatialPointsDataFrame" to "shapefile"
  • "SpatialLinesDataFrame" to "shapefile".
Mokhless
  • 255
  • 1
  • 2
  • 8