Commit b06d8c37 authored by Johannes Knoch's avatar Johannes Knoch
Browse files

added missing package name; adjusted CRS of shape files; augmented documentation

parent 9ca1b532
......@@ -8,7 +8,8 @@
#' @param output_format format (character) of output; whether shp (default) or geojson
#'
#' @return ESRI shapefiles/GeoJSON with name: SamplePoints_step_classname.shp/SamplePoints_step_classname.geojson
#' 1) Point Shape/GeoJSON represents pixel that belong to selected habitat type and can be used as reference for further model building
#' 1) Point Shape/GeoJSON represents pixel that belong to selected habitat type and can be used as reference for further model building.
#' ESRI shapefiles have the same CRS as the input raster. GeoJSON files are in the standard CRS of GeoJSON (EPSG:4326).
#'
#'
#' @export
......@@ -60,7 +61,7 @@ writeOutSamples <- function (inPath, step, className, output_format = c("shp", "
if (output_format == "geojson") {
crs_dummy <- sp::proj4string(dummy_sample)
raster::crs(res) <- crs_dummy
res <- sp::spTransform(res, CRS("+proj=longlat +datum=WGS84 +init=epsg:4326"))
res <- sp::spTransform(res, sp::CRS("+init=epsg:4326"))
rgdal::writeOGR(
obj = res,
......@@ -73,8 +74,7 @@ writeOutSamples <- function (inPath, step, className, output_format = c("shp", "
} else {
crs_dummy <- sp::proj4string(dummy_sample)
raster::crs(res) <- crs_dummy
res <- sp::spTransform(res, CRS("+proj=longlat +datum=WGS84 +init=epsg:4326"))
rgdal::writeOGR(
obj = res,
layer = paste("SamplePoints_step_", step, "_", className, sep = ""),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment