Skip to content
Prev 28764 / 29559 Next

cannot apply a gridded transformation with sf

One basic problem is that a regression was introduced in PROJ from 7.2.0, 
resolved last week by https://github.com/OSGeo/PROJ/pull/2884, where grid 
transformations ceased to work if the prime meridian was not Greenwich. So 
for PROJ 7.2.0-8.1.1, the closest you can get is:

ptSf_2154_via_CRS84 <- st_transform(st_transform(ptSf_27572, 
crs="OGC:CRS84"), crs=2154)
st_distance(ptSf_2154_via_CRS84, ptSf_2154)
# Units: [m]
#          [,1]
# [1,] 3.777444

through a CRS84 hub using a Helmert transformation, unless you can force 
the pipeline as shown in the sf issue: 
https://github.com/r-spatial/sf/issues/1815
This forcing so far only works on Linux, as the user-writable directory is 
not properly accessed in sf for Windows or macOS yet. You may also use the 
rgdal work-around setting the user-writable directory as shown earlier in 
this thread.

Roger
On Mon, 11 Oct 2021, Roger Bivand wrote: