AustralianAntarcticDivision / SOmap

Southern Ocean round maps
https://australianantarcticdivision.github.io/SOmap/
24 stars 6 forks source link

SOplot deal with the dateline #47

Closed Maschette closed 2 years ago

Maschette commented 5 years ago

It would be great if we could make SOauto_map work out how to deal with 0-360 lat long.

raymondben commented 5 years ago
if (any(y > 180)) stop("You muppet!")
Maschette commented 5 years ago

It is actually a SOplot issue not SOautomap

Maschette commented 2 years ago
library(SOmap)
#> Loading required package: raster
#> Loading required package: sp
#this works fine: 
SOmap_auto(x=c(175, -175), y=c(-60, -50))
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> Warning in image.default(x = x, y = y, z = value, useRaster = useRaster, :
#> unsorted 'breaks' will be sorted before use
#So does this 
SOplot(x=c(178, -175), y=c(-50, -60), col=2)
#> No projection provided, assuming longlat


#this works fine: 
SOmap_auto(x=c(175, 200), y=c(-60, -50))
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> Warning in image.default(x = x, y = y, z = value, useRaster = useRaster, :
#> unsorted 'breaks' will be sorted before use
#So does this 
SOplot(x=c(178, 200), y=c(-50, -60), col=2)
#> No projection provided, assuming longlat

Created on 2021-11-16 by the reprex package (v2.0.1)

Maschette commented 2 years ago

This issue has been resolved by magic