Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graticule error when projecting world map to laea #198

Closed
hadley opened this issue Jan 31, 2017 · 2 comments
Closed

Graticule error when projecting world map to laea #198

hadley opened this issue Jan 31, 2017 · 2 comments

Comments

@hadley
Copy link
Contributor

hadley commented Jan 31, 2017

library(sf)
#> Linking to GEOS 3.5.0, GDAL 2.1.2, proj.4 4.9.3
library(maps)

world1 <- sf::st_as_sf(map('world', plot = FALSE, fill = TRUE))
world2 <- st_transform(world1, "+proj=laea +y_0=0 +lon_0=155 +lat_0=-90 +ellps=WGS84 +no_defs")

plot(world2, graticule = st_crs(4326), axes = TRUE)
#> Warning in min(lat): no non-missing arguments to min; returning Inf
#> Warning in max(lat): no non-missing arguments to max; returning -Inf
#> Error in seq.default(bb[2], bb[4], length.out = ndiscr): 'from' cannot be NA, NaN or infinite
edzer added a commit that referenced this issue Jan 31, 2017
@edzer
Copy link
Member

edzer commented Jan 31, 2017

This now works; leave out the axes=TRUE part, as long/lat axes don't make sense here.

map

@edzer
Copy link
Member

edzer commented Jan 31, 2017

(but note the missing meridian!)

edzer added a commit that referenced this issue Feb 1, 2017
@edzer edzer closed this as completed Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants