I have customized the EPSG 38599. Its proj4text is as follows:

+proj=pipeline +step +proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +a=6378137 +b=6356752.314 +units=m +no_defs +step +proj=helmert +convention=coordinate_frame +x=-74.45 +y=-339.8231 +s=1.0009 +theta=34.82

Tried the following command but got error

  ST_AsText(ST_Transform(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
    743265 2967450,743265.625 2967416,743238 2967416))',38599),4326)) As wgs_geom

ERROR: could not form projection (LWPROJ) from 'srid=38599' to 'srid=4326'

Runnning postgis_full_version(); gives the following output

POSTGIS="3.3.2 4975da8" [EXTENSION] PGSQL="120" GEOS="3.9.0-CAPI-1.16.2" PROJ="7.2.1" LIBXML="2.9.10" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY

Operation System Information(CentOS 7)

But I am effective in other versions:

POSTGIS="3.0.2 2fb2a18" [EXTENSION] PGSQL="120" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 5.2.0, September 15th, 2018" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.3.1" WAGYU="0.4.3 (Internal)"

I am very confused.

  • Did you insert it in the spatial_ref_sys table? Take a look at gis.stackexchange.com/questions/239807/… . To check if it is added to the table run this: SELECT * FROM public.spatial_ref_sys WHERE auth_srid=38599 Dec 13, 2022 at 7:21
  • @Fardin Esmaeili, Thank you very much for your answer. I have already inserted srid=38571 into the table---spatial_ref_sys, as shown below: |srid|auth_name|auth_srid|srtext|proj4text| |38599|EPSG|38599|38599|+proj=pipeline +step +proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +a=6378137 +b=6356752.314 +units=m +no_defs +step +proj=helmert +convention=coordinate_frame +x=-74.45 +y=-339.8231 +s=1.0009 +theta=34.82| , I think it is not the question of inserting tables. Thank you very much for your answer. I wish you a happy day.
    – threecat
    Dec 13, 2022 at 7:31
  • I got the solution from here >github.com/OSGeo/PROJ/issues/3507. I used the st_transformpipeline function. I haven't figured out the relationship between the parameters yet, but I think if I want to use four parameters like mine, this may be the answer.
    – threecat
    Dec 16, 2022 at 5:48


Your Answer

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

Browse other questions tagged or ask your own question.