We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when using tiles over long distances they become quite pointy, Is there a way to make them properly curved?
x<-graticule::graticule(lons = c(95, 135, 175),lats = c(-42, -39), tiles = TRUE, proj = raster::projection(Bathy)) SOmap() plot(x, add=TRUE)
The text was updated successfully, but these errors were encountered:
A sad problem with graticule, here's a workaround
curvy_g <- function(lons, lats, proj = NULL, incr = 1) { if (is.null(proj)) stop("'proj' must be supplied") r <- raster::raster(raster::extent(range(lons), range(lats)), ncols = length(lons) - 1, nrows = length(lats) - 1) r[] <- 0 ll_crs <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0" out <- sf::as_Spatial(sf::st_segmentize( spex::polygonize(r), dfMaxLength = incr)) sp::proj4string(out) <- sp::CRS(ll_crs) sp::spTransform(out, proj) } prj <- "+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs" g <- curvy_g(lons = c(95, 135, 175), lats = c(-42, -39), proj = prj ) plot(g)
Set incr to something finer as needed (set to 1-degree by default).
incr
Sorry, something went wrong.
See a better fix coming from #15
No branches or pull requests
when using tiles over long distances they become quite pointy, Is there a way to make them properly curved?
The text was updated successfully, but these errors were encountered: