[R-sig-Geo] gdal error

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Tue Jan 19 10:47:18 CET 2021


On Tue, 19 Jan 2021, Roger Bivand wrote:

> On Tue, 19 Jan 2021, Nicolas Saby wrote:
>
>>  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

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

>>
>>  I checked the proj package with the command apt-cache show proj-bin, I got
>>  this. I think I have 2 packages installed
>
> With only 7.2.1 installed, I see:
>
>>  library(sp)
>>  CRS(SRS_string='EPSG:4326')
> CRS arguments: +proj=longlat +datum=WGS84 +no_defs
>>  cat(wkt(CRS(SRS_string='EPSG:4326')), "\n")
> 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
>
>>
>>  Package: proj-bin
>>  Source: proj
>>  Priority: optional
>>  Section: science
>>  Installed-Size: 470
>>  Maintainer: Debian GIS Project <pkg-grass-devel using 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 using lists.ubuntu.com>
>>  Original-Maintainer: Debian GIS Project
>>  <pkg-grass-devel using 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
>> 
>> 
>> 
>
>

-- 
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 using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list