1

Using PostGIS I'm trying to transform a point coordinate from EPSG:31468 to EPSG:4326 using a proj4-string that I obtained from QGIS "Select Datum Transform" (is it one?):

enter image description here

SQL is of the form geometry ST_Transform(geometry geom, text to_proj);:

SELECT(ST_AsText(ST_Transform(ST_SetSRID(ST_Point(4482649, 5485174), 31468), '+proj=pipeline +step +inv +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +step +proj=hgridshift +grids=BETA2007.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg')));

As the result I'getting this error:

ERROR:  transform_geom: couldn't parse proj4 output string: '+proj=pipeline +step +inv +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +step +proj=hgridshift +grids=BETA2007.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg': unknown projection id
CONTEXT:  SQL function "st_transform" statement 1

What's probably wrong here?

3

What you copied is a whole transformation.

PostGIS wants a CRS definition, not a transformation. It will figure out how to do the transformation between your source CRS and the destination CRS itself.

SELECT 
  ST_AsText(
    ST_Transform(
      ST_SetSRID(
        ST_Point(4482649, 5485174), 
        31468
      ), 
      4326
    )
  )
;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.