[PROJ] Is there a difference in the definition of a projection between postgis 2 and 3 ?

Rhea rhea.moubarak at gmail.com
Tue Sep 5 03:19:01 PDT 2023


hello,

I am using this definition for my projection on both postgis 2 and postgis 3 so i can use it in my st_transform() function:

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 932001, 'IGNF' , 320002101 , '+proj=lcc +nadgrids=ntf_r93.gsb,null +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs' , 'PROJCS["Lambert I",GEOGCS["Nouvelle Triangulation Française Paris grades",DATUM["NTF",SPHEROID["Clarke 1880 IGN",6378249.2000,293.4660210000000,AUTHORITY["IGNF","ELG010"]],TOWGS84[-168.0000,-60.0000,320.0000,0,0,0,0],AUTHORITY["IGNF","REG002"]],PRIMEM["Paris",2.337229167,AUTHORITY["IGNF","LGO02"]],UNIT["grad",0.01570796326794897],AXIS["Longitude",EAST],AXIS["Latitude",NORTH],AUTHORITY["IGNF","NTFP"]],PROJECTION["Lambert_Conformal_Conic_1SP",AUTHORITY["IGNF","PRC0101"]],PARAMETER["semi_major",6378249.2000],PARAMETER["semi_minor",6356515.0000],PARAMETER["latitude_of_origin",49.500000000],PARAMETER["central_meridian",0.000000000],PARAMETER["scale_factor",0.99987734],PARAMETER["false_easting",600000.000],PARAMETER["false_northing",200000.000],UNIT["metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["IGNF","LAMB1"]]’);
This projection 932001 corresponds to Lambert Zone 1 corrected with the IGN grid.
This is the function where im using this projection :

select st_astext(st_transform(st_setsrid(st_point(398845.80866241, 6822815.8927889), 2154), 932001))
On our PostgreSQL 10 / PostGIS 2.x machine, i am getting this: 

POINT(347762.11171084 87364.0318659853)
While in PostgresQL 13 / PostGIS 3.x, i am getting this (result which is incorrect):

POINT(347200.5307476731 637506.2948565462)
Result of the query select postgis_full_version(); on our 2 environments:

PostgreSQL 10 : POSTGIS="2.4.7 r17330" PGSQL="100" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.3.2, released 2018/09/21" LIBXML="2.9.1" LIBJSON="0.11" RASTER


PostgresSQL 13 : POSTGIS="3.1.8 c5ebc1f" [EXTENSION] PGSQL="130" GEOS="3.10.3-CAPI-1.16.1" PROJ="8.2.1" LIBXML="2.9.7" LIBJSON="0.13.1" LIBPROTOBUF="1.3.0" WAGYU="0.5.0 (Internal)” TOPOLOGY
I tried using fr_ign_ntf_r93.tif instead of the ntf_r93.gsb but it didnt work, i got the same results.
I tried verifying that the ntf_r93.gsb or the  fr_ign_ntf_r93.tif are located in usr/share/proj/ directory and they do but yet im getting the same results.
can anyone help me please?
Thank you so much !


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20230905/bed87334/attachment-0001.htm>


More information about the PROJ mailing list