On mercredi 13 novembre 2019 13:18:52 CET Grégory Bataille wrote: > Hey Even, > > So I can confirm that this is the issue > On Mac > OGRCT: Selecting transformation +proj=pipeline +step +proj=axisswap > +order=2,1 +step +inv +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 > +y_0=0 +ellps=bessel +step +proj=unitconvert +xy_in=rad +xy_out=deg +step > +proj=axisswap +order=2,1 (Inverse of 3-degree Gauss-Kruger zone 4 + DHDN > to WGS 84 (2) + Inverse of Transformation to WGS84) > > On my linux docker > OGRCT: Selecting transformation +proj=pipeline +step +proj=axisswap > +order=2,1 +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=push +v_3 +step +proj=cart +ellps=WGS84 +step +inv +proj=helmert > +x=598.1 +y=73.7 +z=418.2 +rx=0.202 +ry=0.045 +rz=-2.455 +s=6.7 > +convention=position_vector +step +inv +proj=cart +ellps=bessel +step > +proj=pop +v_3 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step > +proj=axisswap +order=2,1 (Inverse of 3-degree Gauss-Kruger zone 4 + DHDN > to WGS 84 (4) + Inverse of Transformation to WGS84) > > Now this is a problem to me and I don't quite know what to do with it. > > So I have a fully specified dataset, that gives a TOWGS84, that my user has > chosen (properly or not) > Once the dataset is using this representation, I can't have auto projection > because those will/might depend on the application using the dataset. > Currently (most of) my backend processes are in Gdal3 / Proj6 and therefore > (per my understanding), the TOWGS84 might be overriden > However my front end processes only have some proj4 equivalence and will > trust exactly the dataset. > > I'm a bit at a loss to know what I should do. > Should I do a gdalwarp step for gdal to "chose" the best projection and get > a new dataset (with another TOWGS84) that I use internally for alignment, > while giving the client the one he has asked for when he wants to get the > raw dataset? > > Do you have any ideas/recommandations? Is there a way to disable the PROJ6 > auto-selection feature?
This is not a PROJ6 issue, but a GDAL one related to the logic starting at https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrct.cpp#L843 You could try to add a test that if OGRSpatialReference::GetTOWGS84() returns OGRERR_NONE then the resolution to the WKT of the EPSG code is skipped Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
