Re: [R-sig-Geo] Fwd: GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS 4326
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@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.biv...@nhh.no https://orcid.org/-0003-2392-6140 https://scholar.google.no/citations?user=AWeghB0J&hl=en ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] Fwd: GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS 4326
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. 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@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Edzer Pebesma Institute for Geoinformatics Heisenbergstrasse 2, 48151 Muenster, Germany Phone: +49 251 8333081 ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] Fwd: GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS 4326
Hi Anna, Indeed, I bet it is a problem with the CRS definition. Have you tried to follow this example: https://www.rdocumentation.org/packages/rgdal/versions/1.5-23/topics/spTransform-methods . If you post a replicable example perhaps (the data) I can have a look. Cheers, Andres El vie, 10 sept 2021 a las 12:20, Anna Mujal Colilles () escribió: > 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@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > -- Andrés D. [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] Fwd: GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS 4326
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@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo