I have a table (tbl1
) containing POINT geometries in EPSG:27700 (British National Grid).
SELECT id, ST_AsText(geom) as geom FROM tbl1;
=
id | geom
------+--------
1 | POINT(363179.79 176400.12)
2 | POINT(333743.58 159668.54)
3 | POINT(375287 162596)
4 | POINT(340283.42 172058.76)
However I receive an error when I try to transform the CRS to 3857 (or 4326). Example:
SELECT ST_TRANSFORM(geom, 3857) as geom
FROM tbl1;
or
SELECT ST_TRANSFORM(ST_SetSRID(geom, 27700), 3857) as geom
FROM tbl1;
Both result in this error:
ERROR: could not form projection (PJ) from 'srid=27700' to 'srid=3857'
SQL state: XX000
Additional context:
PostgreSQL version: 13
PostGIS version:
SELECT postgis_full_version();
=
POSTGIS="3.1.1 3.1.1" [EXTENSION] PGSQL="130" GEOS="3.9.1-CAPI-1.14.1" SFCGAL="1.3.8" PROJ="7.1.1" GDAL="GDAL 3.2.1, released 2020/12/29 GDAL_DATA not found" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)" TOPOLOGY RASTER
There are other similar questions on GIS SE but none with answers or as detailed as this.
GDAL_DATA not found
returned by your querySELECT postgis_full_version();
.