Closed as not planned
Description
I found a problem with rendering a world map with a very specific rotation (I was just trying to animate a rotating globe)
I expected any valid integer value of lon0 in my crs string of this form to work:
coord_sf(crs = "+proj=ortho +lat_0=0 +lon_0=27")
but it fails with that specific string, while succeeding with other similar values
library(ggplot2)
library(rnaturalearth)
library(sf)
#> Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE
world <- ne_countries(scale = "medium", returnclass = "sf")
world_plot <- ggplot(data = world) +
geom_sf(fill = "lightblue", color = "gray") +
theme_void()
# This works
world_plot + coord_sf(crs = "+proj=ortho +lat_0=0 +lon_0=26.9")
# So does this
world_plot + coord_sf(crs = "+proj=ortho +lat_0=0 +lon_0=27.1")
# But this fails with "Error in `grid.Call.graphics"
world_plot + coord_sf(crs = "+proj=ortho +lat_0=0 +lon_0=27.0")
#> Error in grid.Call.graphics(C_path, x$x, x$y, index, switch(x$rule, winding = 1L, : Invalid graphics path
Created on 2024-11-10 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
No labels