A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/r-spatial/sf/issues/1983 below:

st_transform does not transform map projection correcttly in some situations · Issue #1983 · r-spatial/sf · GitHub

Describe the bug
st_transform does not transform map projection correcttly in some situations.

To Reproduce

library(sf)
library(ggplot2)
library(rnaturalearth)
wld <- ne_coastline(returnclass = "sf")
wld2 <- st_transform(wld, crs = "+proj=natearth")
ggplot() + 
  geom_sf(data = wld2)

When I use the function of st_transform in sf package to transform map projection from "wgs1984" to "Natural Earth"(https://proj.org/operations/projections/natearth.html), the horizontal line appear on the the high latitudes of the northern hemisphere. The figure shown as follow.

library(sf)
library(ggplot2)
library(rnaturalearth)
wld <- ne_countries(returnclass = "sf")
wld2 <- st_transform(wld, crs = "+proj=natearth +lon_0=110")
ggplot() + 
  geom_sf(data = wld2) +
  theme_bw()

When I transform the Longitude of projection center, I'm getting more inexplicable errors. The figure shown as follow.

Why is that?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4