Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOauto_map mask not working #43

Open
Maschette opened this issue May 10, 2019 · 5 comments
Open

SOauto_map mask not working #43

Maschette opened this issue May 10, 2019 · 5 comments
Assignees

Comments

@Maschette
Copy link

It seems to be hating life, I think it is something to do with it hating on the trim_background

library(SOmap)
#> Loading required package: raster
#> Warning: package 'raster' was built under R version 3.5.3
#> Loading required package: sp
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-05-10 by the reprex package (v0.2.1)

@mdsumner
Copy link
Member

mdsumner commented Jun 1, 2019

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 #48

@mdsumner
Copy link
Member

mdsumner commented Jun 2, 2019

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.

@Maschette
Copy link
Author

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.

@mdsumner
Copy link
Member

mdsumner commented Jun 2, 2019

Workin' on it!

@Maschette
Copy link
Author

Here is an example of what a desired outcome may look like
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants