[R-sig-Geo] Fwd: GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS 4326
Roger Bivand
Roger@B|v@nd @end|ng |rom nhh@no
Fri Sep 10 15:35:26 CEST 2021
On Fri, 10 Sep 2021, Edzer Pebesma wrote:
> I would say this indicates a broken installation of PROJ on your system, or
> you have more than one instance (and different versions) of PROJ installed.
I agree. The PROJ version used to install rgdal is not the same as the
version with which proj.db was shipped, leading to the SQL error. Refer to
https://github.com/r-spatial/sf/#multiple-gdal-geos-andor-proj-versions-on-your-system
for ideas on disambiguating.
Roger
>
> On 10/09/2021 12:20, Anna Mujal Colilles wrote:
>> Hi,
>>
>> I am a new R user trying to transform lat-lon data to utm. I've been doing
>> so in two different ways and both give me the same error. My machine is a
>> Linux Ubuntu 18.04 system.
>>
>> The first way I wanted to transform them was:
>> sp <-
>> SpatialPoints(df[,c("longitude","latitude")],proj4string=CRS("+init=epsg:4326
>> +proj=longlat
>> +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0 "))
>> sp2<-spTransform(sp, CRS("+proj=utm +zone=33 +datum=WGS84 +units=m
>> +no_defs
>> +ellps=WGS84 +towgs84=0,0,0"))
>>
>> the second option was
>> sf_sample <- sf::st_as_sf(coord_sample, coords = c("longitude",
>> "latitude"), crs = 4326)
>>
>> However, I keep having the same problem over and over again related to the
>> crs init 4326
>>
>> Warning message:
>> In CPL_crs_from_input(x) :
>> GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS
>> 4326: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code,
>> prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name,
>> area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE
>> auth_name = ? AND code = ?: no such column: publication_date
>>
>> can anyone help me please?
>>
>> Thank you,
>>
>> Anna
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
--
Roger Bivand
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
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