r-tmap / tmap

R package for thematic maps
https://r-tmap.github.io/tmap
GNU General Public License v3.0
868 stars 121 forks source link

Regression: error when plotting data with CRS of NA #957

Closed Nowosad closed 3 weeks ago

Nowosad commented 3 weeks ago

This is a new issue (it worked well in the past) detected when updating the geocompr book (https://github.com/geocompx/geocompr/actions/runs/11722690507/job/32652768614)

library(sf)
#> Linking to GEOS 3.12.2, GDAL 3.8.5, PROJ 9.3.1; sf_use_s2() is TRUE
library(tmap)
data("rivers")

# WORKS
tm_shape(rivers) + tm_lines()

# FAILS
st_crs(rivers) = NA
tm_shape(rivers) + tm_lines()
#> Error in if (is_ll) {: missing value where TRUE/FALSE needed