Open Maschette opened 5 years ago
library(SOmap)
#> Loading required package: raster
#> Loading required package: sp
#> Registered S3 methods overwritten by 'ggplot2':
#> method from
#> [.quosures rlang
#> c.quosures rlang
#> print.quosures rlang
SOauto_map(x=c(10,60), y=c(-40,-70), mask=T)
#> Loading required namespace: rgeos
SOauto_map(x=c(10,60), y=c(-40,-70), mask=T, trim_background = FALSE)
Created on 2019-06-01 by the reprex package (v0.2.1)
See https://github.com/AustralianAntarcticDivision/SOmap/pull/48
Refactoring automap has convinced me that trim_background
and mask
don't belong in the function, they should be separate tools. The fundamental problem is that there isn't always a trivial input extent that's in longlat - if you input projected data it doesn't have a straightforward rectangular extent - so an independent function that creates one, and SOmask()s data is a better way forward.
I have no objections to it being a seperate function. However, it would be good to either have it callable from SOauto_map, or if you want to be fancy have it be able to be called with a pipe.
Workin' on it!
Here is an example of what a desired outcome may look like
It seems to be hating life, I think it is something to do with it hating on the trim_background
Created on 2019-05-10 by the reprex package (v0.2.1)