Skip to content

gdal error

6 messages · Nicolas Saby, Roger Bivand

#
Dear all,

I recently updated my  linux system. I am running R 4.0.3

Since this update, I get this error with the CRS function:

CRS(SRS_string='EPSG:4326')
proj_create: SQLite error on SELECT name, type, coordinate_system_auth_name, coordinate_system_code, datum_auth_name, datum_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM geodetic_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name
proj_create: SQLite error on SELECT name, type, coordinate_system_auth_name, coordinate_system_code, datum_auth_name, datum_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM geodetic_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name
Error in CRS(SRS_string = "EPSG:4326") : NA

I checked the proj package with the command apt-cache show proj-bin, I got this. I think I have 2 packages installed

Package: proj-bin
Source: proj
Priority: optional
Section: science
Installed-Size: 470
Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Architecture: amd64
Version: 7.2.0-1~focal0
Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.0), libproj19 (>= 7.2.0), libstdc++6 (                >= 5.2)
Filename: pool/main/p/proj/proj-bin_7.2.0-1~focal0_amd64.deb

Package: proj-bin
Architecture: amd64
Version: 6.3.1-1
Priority: extra
Section: universe/science
Source: proj
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Original-Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org                                                                             >
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 319
Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.0), libproj15 (>= 6.2.1), libstdc++6 (                >= 5.2)
Filename: pool/universe/p/proj/proj-bin_6.3.1-1_amd64.deb
Task: ubuntustudio-video, ubuntustudio-publishing, ubuntustudio-photography, ubu                                                                             ntustudio-graphics


Thank you
Nicolas

[Logo-Signature-INRAE]

Bdat.gissol.fr

Nicolas Saby
Chef de projet en information statistique
https://orcid.org/0000-0001-8964-1194



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20210119/fd926c15/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2660 bytes
Desc: image001.png
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20210119/fd926c15/attachment.png>
#
On Tue, 19 Jan 2021, Nicolas Saby wrote:

            
With only 7.2.1 installed, I see:
CRS arguments: +proj=longlat +datum=WGS84 +no_defs
GEOGCRS["WGS 84 (with axis order normalized for visualization)",
     DATUM["World Geodetic System 1984",
         ELLIPSOID["WGS 84",6378137,298.257223563,
             LENGTHUNIT["metre",1]],
         ID["EPSG",6326]],
     PRIMEM["Greenwich",0,
         ANGLEUNIT["degree",0.0174532925199433],
         ID["EPSG",8901]],
     CS[ellipsoidal,2],
         AXIS["geodetic longitude (Lon)",east,
             ORDER[1],
             ANGLEUNIT["degree",0.0174532925199433,
                 ID["EPSG",9122]]],
         AXIS["geodetic latitude (Lat)",north,
             ORDER[2],
             ANGLEUNIT["degree",0.0174532925199433,
                 ID["EPSG",9122]]]]

You are probably right that your two proj-bin (and other proj) ununtu 
packages are confusing each other. There should be one only, and rgdal 
(and sf) should be re-installed from source to pick up the correct unique 
version.

Hope this clarifies,

Roger

  
    
#
On Tue, 19 Jan 2021, Roger Bivand wrote:

            
Clarification:

Some field names in proj.db (the SQLite database containing the CRS 
specifications) changed with EPSG v10, introduced from PROJ 7.2.0, 
compared to earlier EPSG database versions and PROJ versions. So you need 
to ensure not only that proj-bin is unique, but that all the proj-* are 
the same version, and that rgdal is installed against that version of 
PROJ. GDAL also needs to be installed against that version. Code in R 
packages conditions on the declared version of PROJ in the PROJ binary. 
Please see 
https://cran.r-project.org/web/packages/rgdal/vignettes/CRS_projections_transformations.html 
which contains code for examining proj.db using RSQLite.

Roger

  
    
#
Yes, thanks it clarifies. 
I need now to find how to uninstall the older version of proj-bin
I have already tried sudo apt remove package_name but it did not fixed the pb
Many thanks

-----Message d'origine-----
De?: Roger Bivand <Roger.Bivand at nhh.no> 
Envoy??: mardi 19 janvier 2021 10:17
??: Nicolas Saby <nicolas.saby at inrae.fr>
Cc?: r-sig-geo at r-project.org
Objet?: Re: [R-sig-Geo] gdal error
On Tue, 19 Jan 2021, Nicolas Saby wrote:

            
With only 7.2.1 installed, I see:
CRS arguments: +proj=longlat +datum=WGS84 +no_defs
GEOGCRS["WGS 84 (with axis order normalized for visualization)",
     DATUM["World Geodetic System 1984",
         ELLIPSOID["WGS 84",6378137,298.257223563,
             LENGTHUNIT["metre",1]],
         ID["EPSG",6326]],
     PRIMEM["Greenwich",0,
         ANGLEUNIT["degree",0.0174532925199433],
         ID["EPSG",8901]],
     CS[ellipsoidal,2],
         AXIS["geodetic longitude (Lon)",east,
             ORDER[1],
             ANGLEUNIT["degree",0.0174532925199433,
                 ID["EPSG",9122]]],
         AXIS["geodetic latitude (Lat)",north,
             ORDER[2],
             ANGLEUNIT["degree",0.0174532925199433,
                 ID["EPSG",9122]]]]

You are probably right that your two proj-bin (and other proj) ununtu packages are confusing each other. There should be one only, and rgdal (and sf) should be re-installed from source to pick up the correct unique version.

Hope this clarifies,

Roger
--
Roger Bivand
Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
#
Le chargement a n?cessit? le package : sp
rgdal: version: 1.5-19, (SVN revision 1092)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
Path to GDAL shared files: /usr/share/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 6.3.1, February 10th, 2020, [PJ_VERSION: 631]
Path to PROJ shared files: /usr/share/proj
Linking to sp version:1.4-4
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.

----------------
I have uninstall and reinstall proj, sf and rgdal

But it is still not possible to pick up the latest version of PROJ... should be 7.2 instead of 6.3

Thanks

-----Message d'origine-----
De?: Nicolas Saby 
Envoy??: mardi 19 janvier 2021 11:25
??: 'Roger.Bivand at nhh.no' <Roger.Bivand at nhh.no>
Cc?: r-sig-geo at r-project.org
Objet?: RE: [R-sig-Geo] gdal error

Yes, thanks it clarifies. 
I need now to find how to uninstall the older version of proj-bin I have already tried sudo apt remove package_name but it did not fixed the pb Many thanks

-----Message d'origine-----
De?: Roger Bivand <Roger.Bivand at nhh.no> Envoy??: mardi 19 janvier 2021 10:17 ??: Nicolas Saby <nicolas.saby at inrae.fr> Cc?: r-sig-geo at r-project.org Objet?: Re: [R-sig-Geo] gdal error
On Tue, 19 Jan 2021, Nicolas Saby wrote:

            
With only 7.2.1 installed, I see:
CRS arguments: +proj=longlat +datum=WGS84 +no_defs
GEOGCRS["WGS 84 (with axis order normalized for visualization)",
     DATUM["World Geodetic System 1984",
         ELLIPSOID["WGS 84",6378137,298.257223563,
             LENGTHUNIT["metre",1]],
         ID["EPSG",6326]],
     PRIMEM["Greenwich",0,
         ANGLEUNIT["degree",0.0174532925199433],
         ID["EPSG",8901]],
     CS[ellipsoidal,2],
         AXIS["geodetic longitude (Lon)",east,
             ORDER[1],
             ANGLEUNIT["degree",0.0174532925199433,
                 ID["EPSG",9122]]],
         AXIS["geodetic latitude (Lat)",north,
             ORDER[2],
             ANGLEUNIT["degree",0.0174532925199433,
                 ID["EPSG",9122]]]]

You are probably right that your two proj-bin (and other proj) ununtu packages are confusing each other. There should be one only, and rgdal (and sf) should be re-installed from source to pick up the correct unique version.

Hope this clarifies,

Roger
--
Roger Bivand
Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
#
On Tue, 19 Jan 2021, Nicolas Saby wrote:

            
The sf README contains some install instructions:

https://github.com/r-spatial/sf

Possibly you are not using ubuntugis-unstable? I only ever install from 
source, to keep control of what I actually have installed, but both PROJ 
and GDAL now take much longer to compile.

Roger