read_shape

0th

Percentile

Read shape file

Read an ESRI shape file. Optionally, set the current projection if it is missing.

Usage
read_shape(file, current.projection = NULL, as.sf = FALSE, ...)
Arguments
file
a shape file name (including directory)
current.projection
the current projection of the shape object, if it is missing in the shape file. See get_proj4 for options. Use set_projection to reproject the shape object.
as.sf
should the shape be returned as an sf object?
...
other parameters, such as stringsAsFactors, are passed on to readOGR
Details

This function is a convenient wrapper of rgdal's readOGR. It is possible to set the current projection, if it is undefined in the shape file. If a reprojection is required, use set_projection.

For the Netherlands: often, the Dutch Rijksdriehoekstelsel (Dutch National Grid) projection is provided in the shape file without proper datum shift parameters to wgs84. This functions automatically adds these parameters. See http://www.qgis.nl/2011/12/05/epsg28992-of-rijksdriehoekstelsel-verschuiving/ (in Dutch) for details.

Value

shape object

Aliases
  • read_shape
Documentation reproduced from package tmaptools, version 1.0, License: GPL-3

Community examples

Looks like there are no examples yet.