从 EPSG:4326 转换为 EPSG:3857 会大大增加经度和纬度数字

Transforming from EPSG:4326 to EPSG:3857 massively inflates longitude and latitude numbers

我下载了一张世界地图,想将其从默认的 CRS (EPSG:4326) 更改为 Tableau 和 Google 地图 (EPSG: 3857).出于某种原因,当我尝试转换时,经度和纬度数字变得膨胀。

例如,(-95.160, -95.102) 变为 (-10593226.108, -10586797.584)

library(rnaturalearth)
library(dplyr)
library(sf)

target_crs <- st_crs(3857)

# Use the United States as an example
US <- ne_countries(scale = 10, type = "countries", returnclass = "sf") %>%
  filter(admin == "United States of America") %>%
  select(admin, geometry) 

head(US)

#Simple feature collection with 1 feature and 1 field
#Geometry type: MULTIPOLYGON
#Dimension:     XY
#Bounding box:  xmin: -179.1435 ymin: 18.90612 xmax: 179.7809 ymax: 71.4125
#CRS:           +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
#                     admin                       geometry
#1 United States of America MULTIPOLYGON (((-95.16057 4...

# Now attempt to transform the CRS
US <- st_transform(US, target_crs)

head(US)

#Simple feature collection with 1 feature and 1 field
#Geometry type: MULTIPOLYGON
#Dimension:     XY
#Bounding box:  xmin: -19942160 ymin: 2143886 xmax: 20013120 ymax: 11544810
#Projected CRS: WGS 84 / Pseudo-Mercator
#                     admin                       geometry
#1 United States of America MULTIPOLYGON (((-10593226 6...

请注意 xmin、ymin、xmax、ymax 值的巨大变化。我不确定是什么原因造成的。

3857 以米为单位,4326 以度为单位。你离彼得岛很近吗?

如果需要,您可以在这里测试坐标:https://epsg.io/map#srs=3857&x=-10093891.770199&y=-10709420.049722&z=12&layer=streets