0

I have a shapefile with terrestrial birds conservation regions (https://birdscanada.org/download/gislab/bcr_terrestrial_shape.zip?_ga=2.173557475.1349516436.1715087042-735583731.1713557857) from the Birds Canada website.

When I plot the data, I see that the Near Islands and the Rat Islands are drawn very far away from the Andreanof Islands.

library(sf)
library(ggplot2)
path.bcr = "~/Downloads/BCR_Terrestrial/BCR_Terrestrial_master_International.shp"
bcr.map = st_read(dsn = path.bcr)

ggplot(bcr.map) + 
  geom_sf(aes(fill=Label), show.legend = FALSE)

enter image description here

How can I ask R to plot the polygons so that the polygons are drawn closer and that there is not a big gap between them?

Note that the distance between the polygons is ok:

bcr.map %>% 
  filter(BCR ==1) %>% 
  st_cast(to = "POLYGON") %>% 
  slice(c(2,79, 80)) %>% 
  st_distance() %>% units::set_units(value = "km")
3
  • 1
    Maybe try another projection, like EPSG:3832 WGS84/PDC Mercator?
    – Pointdump
    Commented May 7 at 14:01
  • 3
    The root cause is that the Near Islands (including Attu of WW2 fame) are on the other side of the antimeridean from US mainland. Which really messes up with the standard Mercator approach. The Chukotka peninsula of Russia suffers from a similar issue. Commented May 7 at 20:46
  • Interesting! So there is no way to fix this with the CRS 4269? The only way is to retroject with another CRS? Commented May 8 at 1:13

1 Answer 1

4

From my point of view, you should be able to handle this by shifting geographical coordinates for a Pacific view making use of sf::st_shift_longitude():

?st_shift_longitude:

All longitudes < 0 are added to 360, to avoid for instance parts of Alaska being represented on the far left and right of a plot because they have values straddling 180 degrees. In general, using a projected coordinate reference system is to be preferred, but this method permits a geographical coordinate reference system to be used.

This is how the result would look like using your data:

bcr.map_shift <- sf::st_shift_longitude(bcr.map)

ggplot(bcr.map_shift) + 
  geom_sf(aes(fill = Label), show.legend = FALSE)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.