knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(tissot)
library(rnaturalearth)
library(sf)
library(rgeos)

Plot on unprojected data

w <- ne_countries(scale = "medium", returnclass = "sf")
w_geom = st_geometry(w)
unprojected = tissot(5)
# plot(w_geom,axes = TRUE, graticule = TRUE)
plot(unprojected, col = "red")

Project on web mercator

x = unprojected
st_crs(x) <- st_crs(3857)
plot(w_geom,axes = TRUE, graticule = TRUE)
plot(x,col = "red")

Project on Eckert-IV

# eckert-IV
eckert <- st_transform(x,"+proj=eck4 +ellps=WGS84 +datum=WGS84 +units=m")
w_eck <- st_transform(w_geom,st_crs("+proj=eck4 +ellps=WGS84 +datum=WGS84 +units=m"))
plot(w_eck,axes = TRUE, graticule = TRUE)
plot(eckert,col = "red")

Project on "Equal Earth"

equal_earth = st_transform(x,8857)
w_ea <- st_transform(w_geom,8857)
plot(w_ea,axes = TRUE, graticule = TRUE)
plot(equal_earth,col = "red")


JaFro96/tissot documentation built on Dec. 18, 2021, 12:29 a.m.