You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default PROJ.4 wraps output longitudes in the range -180 to 180. The +over switch can be used to disable the default wrapping which is done at a low level - in pj_inv().
e.g. compare the following in rgdal, which correctly applies +over
# The +over paramater should stop projected coordinates from wrappingrgdal::project(t(as.matrix(c(190, 0))), "+proj=robin")
rgdal::project(t(as.matrix(c(190, 0))), "+proj=robin +over")
This is very useful, for example, in ensuring that Russia appears as a contiguous block where otherwise it would wrap around 180 degrees. In fact maps::map("world") seems to be built that way.
st_transform doesn't appear to support this flag. One consequence is that ggplot2 will happily plot untransformed data outside the "usual" range for a projection, UNLESS you add a coord_sf() at which point it will fail.
I refer to #509, and close here because both issues refer to the fact that sf uses the GDAL interface to PROJ.4, rather than doing projections directly through the PROJ.4 API, as rgdal does.
st_transform gains a parameter, use_gdal, which if FALSE takes a route through lwgeom_transform completely ignoreing GDAL. This allows using +over and +proj=wintri, proj.4 options not honoured/accepted by GDAL.
Quoting proj4:
e.g. compare the following in rgdal, which correctly applies +over
This is very useful, for example, in ensuring that Russia appears as a contiguous block where otherwise it would wrap around 180 degrees. In fact
maps::map("world")
seems to be built that way.st_transform
doesn't appear to support this flag. One consequence is that ggplot2 will happily plot untransformed data outside the "usual" range for a projection, UNLESS you add a coord_sf() at which point it will fail.The text was updated successfully, but these errors were encountered: