forked from Maschette/SOmap
-
Notifications
You must be signed in to change notification settings - Fork 6
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_crop is being weird #105
Comments
what if you do sf::sf_use_s2(FALSE) then run again? We should bake that into the package |
Yep that fixes it. library(SOmap)
#> Loading required package: raster
#> Loading required package: sp
library(ggplot2)
library(sf)
#> Linking to GEOS 3.9.1, GDAL 3.4.3, PROJ 7.2.1; sf_use_s2() is TRUE
sf::sf_use_s2(FALSE)
#> Spherical geometry (s2) switched off
llproj <-"+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
bigmap<-SOgg(SOmap_auto(x=c(45,145), y=c(-50, -70), input_points = F, input_lines = F, target = llproj))
#> dist is assumed to be in decimal degrees (arc_degrees).
#> although coordinates are longitude/latitude, st_intersection assumes that they are planar
#> dist is assumed to be in decimal degrees (arc_degrees).
#> although coordinates are longitude/latitude, st_intersection assumes that they are planar
bigmap stat_areas <- SOauto_crop(SOproj(SOmap_data$CCAMLR_statistical_areas, target = llproj), x = bigmap, sp = F)
#> Warning in wkt(obj): CRS object has no comment
#> Warning in wkt(obj): CRS object has no comment
#> Warning in spTransform(xSP, CRSobj, ...): NULL target CRS comment, falling back
#> to PROJ string
#> dist is assumed to be in decimal degrees (arc_degrees).
#> although coordinates are longitude/latitude, st_intersection assumes that they are planar
ggplot(data=stat_areas)+geom_sf(fill=NA)+theme_bw() Created on 2022-09-09 with reprex v2.0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SOauto_crop is kind of working but also not, what should be straight lines become really jagged. It also doesn't appear to crop to the right boundary.
Created on 2022-09-09 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: