Skip to content

Commit

Permalink
Fixes issue ecohealthalliance#35
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Czapanskiy committed May 30, 2020
1 parent 648430e commit 9e8118a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/raster-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ setMethod('raster', signature(x='sf'),
ext <- raster::extent(bb)
r <- raster::raster(ext, ...)

r@crs <- CRS(attr(x[[attr(x, "sf_column")]], "crs")[["proj4string"]])
r@crs <- CRS(attr(x[[attr(x, "sf_column")]], "crs")$proj4string)
if (!missing(origin)) {
raster::origin(r) <- origin
r <- raster::extend(r, 1)
Expand Down

0 comments on commit 9e8118a

Please sign in to comment.