-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from JGCRI/gdal-processing
Deprecating use of rgdal
- Loading branch information
Showing
4 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ Authors@R: c(person("Chris", "Vernon", | |
person("Caleb", "Braun", | ||
email = "[email protected]", | ||
role = "aut"), | ||
person("Kanishka B.", "Narayan", | ||
email = "[email protected]", | ||
role = "aut"), | ||
person("Pacific Northwest National Laboratory", | ||
role = "cph")) | ||
Description: The rgis package facilitates GIS functionality and workflows commonly reprented in propritary and open source GISs. This package does not contain functionality for visulization, but is focsed on geospatial algorithms for analysis, conversion, IO, modification, and workflows of spatial files and data structures. | ||
|
@@ -25,7 +28,6 @@ Imports: | |
doParallel, | ||
foreach, | ||
magrittr, | ||
rgdal, | ||
smoothr, | ||
tibble, | ||
units, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,15 @@ | |
#' | ||
#' @param shp_path character. A full path to the input shapefile with file name and extension | ||
#' @param quiet boolean. | ||
#' @param method tool used to convert to spatial data; either 'sf' or 'rgdal' | ||
#' @param method tool used to convert to spatial data; i.e. 'sf' | ||
#' @return sf object | ||
#' @author Chris R. Vernon ([email protected]) | ||
#' @importFrom sf st_read | ||
#' @importFrom rgdal readOGR | ||
#' @export | ||
import_shapefile <- function(shp_path, quiet = TRUE, method = "sf") { | ||
|
||
if(method == "sf") return(st_read(shp_path, quiet = quiet)) | ||
if(method == "rgdal") return(readOGR(shp_path, verbose = !quiet)) | ||
|
||
} | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.