[R-sig-Geo] Fwd: GDAL Error 1: PROJ: proj_create_from_database: cannot build geodeticCRS 4326
Andres Diaz Loaiza
m@d|@z| @end|ng |rom gm@||@com
Fri Sep 10 12:56:12 CEST 2021
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 (<mucuqui using gmail.com>)
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 using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Andrés D.
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list