Commit 26a4661b authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Let's use crs instead of proj4string

parent e737766e
......@@ -149,7 +149,8 @@ model_opt_r <- function(k,
pbtn1 <-
as.data.frame(cbind(classes[d1], matrix(p1, ncol = 2)))
sp::coordinates(pbtn1) <- c("V2", "V3")
sp::proj4string(pbtn1) <- sp::proj4string(pbt)
#sp::proj4string(pbtn1) <- sp::proj4string(pbt)
crs(pbtn1) <- crs(pbt)
poly <- rgeos::gBuffer(spgeom = pbtn1,
width = buffer,
......@@ -212,7 +213,8 @@ model_opt_r <- function(k,
pbtn2 <-
as.data.frame(cbind(classes[d2], matrix(p2, ncol = 2)))
sp::coordinates(pbtn2) <- c("V2", "V3")
sp::proj4string(pbtn2) <- sp::proj4string(pbt)
#sp::proj4string(pbtn2) <- sp::proj4string(pbt)
crs(pbtn2) <- crs(pbt)
poly <- rgeos::gBuffer(spgeom = pbtn2,
width = buffer,
......
......@@ -92,7 +92,8 @@ multi_Class_Sampling <- function(in.raster,
input_raster <- in.raster
area <- as(raster::extent(in.raster), 'SpatialPolygons')
area <- sp::SpatialPolygonsDataFrame(area, data.frame(ID = 1:length(area)))
sp::proj4string(area) <- sp::proj4string(in.raster)
#sp::proj4string(area) <- sp::proj4string(in.raster)
crs(area) <- crs(in.raster)
col <- colorRampPalette(c("lightgrey",
"orange",
......
Supports Markdown
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