Skip to content
Prev 28096 / 29559 Next

rgdal: About the new gdal3 and proj >=6 condition

On Fri, 29 May 2020, Patrick Schratz wrote:

            
Do you mean http://spatial.nhh.no/R/rgdal/? Please do say what you mean. 
If your browser blocks http: rather than https:, that is your choice. I 
imagine that it silently inserts an "s".
If PROJ 7.0.1 is properly installed, the header will be in 
$prefix/include. If your packager put all the headers somewhere else, use 
the command argument:

$ ls /usr/local/include/proj*
/usr/local/include/proj_api.h           /usr/local/include/proj.h
/usr/local/include/proj_constants.h 
/usr/local/include/proj_symbol_rename.h
/usr/local/include/proj_experimental.h

/usr/local/include/proj:
common.hpp               crs.hpp    metadata.hpp
coordinateoperation.hpp  datum.hpp  nn.hpp
coordinatesystem.hpp     io.hpp     util.hpp

You should not need to know. What does pkg-config proj --cflags say (once 
you've set PKG_CONFIG_PATH, of course.
In your earlier post, you negected to say that you used the necessary 
configure argument. The error message says that you did not use it. Please 
report back when you have done so. Futher, I quote from your message: "It 
further causes complete breakage for people relying on the homebrew 
package manager on macOS since current versions are gdal v2.2.4 and proj 
7.0.1." Please accept that I pay attention to what you write.
Getting things right may be painful; GDAL 2 with PROJ 7 is wrong, because 
it mixes two incompatible metadata storage systems. Migrating all users to
GDAL >= 3 & PROJ >= 6 is a matter of urgency to avoid silent positional 
error of about 125m, or about 4 satellite image cells. See the vignette 
here 
http://rgdal.r-forge.r-project.org/articles/CRS_projections_transformations.html 
and this r-spatial blog https://www.r-spatial.org/r/2020/03/17/wkt.html.

I am not willing to let silent error creep in because some people find it 
inconvenient to avoid the problem. Both sf and sp/rgdal are covering your 
backs even if it feels rough. We've already helped dozens of maintainers 
of reverse dependencies future-proof their users from the consequences of 
changes made in PROJ and GDAL, where we have also contributed to making 
the transition easier by exposing helper functions in their APIs, which we 
use.

I expect you to be able to CMD check a tarball from the commmand line, no 
more than that, to report back, and to try to grasp that these external 
software components are really important and completely non-trivial.

Roger