writeshape: Write ESRI shapefile out 'writeshape'

View source: R/Func_GIS.R

writeshapeR Documentation

Write ESRI shapefile out writeshape

Description

Write ESRI shapefile out writeshape

Usage

writeshape(shp, file = NULL, crs = raster::crs(shp))

Arguments

shp

Spatial file

file

file path, without '.shp'.

crs

projection

Examples

library(sp)
library(rgeos)
library(rgdal)
sp1 = readWKT("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))")
raster::crs(sp1) =sp::CRS("+init=epsg:4326")
writeshape(sp1, file=file.path(tempdir(), 'sp1'))
sp2=readOGR(file.path(tempdir(), 'sp1.shp'))
plot(sp2)

SHUD-System/SHUDtoolbox documentation built on Nov. 27, 2024, 5:54 a.m.