Skip to content

Error in st_transform on Ubuntu (Error in CPL_transform(x, crs, aoi, pipeline, reverse):) #1419

@RemkoDuursma

Description

@RemkoDuursma

With a routine st_transform I get the following error on Ubuntu 18

Error in CPL_transform(x, crs, aoi, pipeline, reverse) :
  OGRCreateCoordinateTransformation() returned NULL: PROJ available?
In addition: Warning message:
In CPL_transform(x, crs, aoi, pipeline, reverse) :
  GDAL Error 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.

Reproducible example:

data <- structure(list(adres_key = "abcde", centroide = structure(list(
    structure(c(5.48118574362483, 51.441978759039), class = c("XY", 
    "POINT", "sfg"))), class = c("sfc_POINT", "sfc"), precision = 0, bbox = structure(c(xmin = 5.48118574362483, 
ymin = 51.441978759039, xmax = 5.48118574362483, ymax = 51.441978759039
), class = "bbox"), crs = structure(list(input = "EPSG:4326", 
    wkt = "GEOGCRS[\"WGS 84\",\n    DATUM[\"World Geodetic System 1984\",\n        ELLIPSOID[\"WGS 84\",6378137,298.257223563,\n            LENGTHUNIT[\"metre\",1]]],\n    PRIMEM[\"Greenwich\",0,\n        ANGLEUNIT[\"degree\",0.0174532925199433]],\n    CS[ellipsoidal,2],\n        AXIS[\"geodetic latitude (Lat)\",north,\n            ORDER[1],\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        AXIS[\"geodetic longitude (Lon)\",east,\n            ORDER[2],\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n    USAGE[\n        SCOPE[\"unknown\"],\n        AREA[\"World\"],\n        BBOX[-90,-180,90,180]],\n    ID[\"EPSG\",4326]]"), class = "crs"), n_empty = 0L)), row.names = 1L, sf_column = "centroide", agr = structure(c(adres_key = NA_integer_), .Label = c("constant", 
"aggregate", "identity"), class = "factor"), class = c("sf", 
"data.frame"))

library(sf)
st_transform(data, 28992)  # no projections seem to work

The above works fine on my (windows) laptop, but not on our Ubuntu 18 server.

I updated sf (0.9.4 - the dev version, also tested 0.9.3).

On loading sf I get : GEOS (3.6.2), GDAL (2.2.3), PROJ (4.9.3).

These are the most recent packages on Ubuntu 18.04.1 (according to apt-get install).

A very similar issue was posted here (so).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions