[PROJ] Question about the “triangulation-based transformations”
Even Rouault
even.rouault at spatialys.com
Wed May 3 05:39:25 PDT 2023
Le 03/05/2023 à 14:23, Franz-Benjamin Mocnik a écrit :
> Dear PROJ list members,
>
> I hope I may ask here a question about the use of “triangulation-based transformations”, which are implemented in PROJ. It is my aim to use it with QGIS, but the problem seems to lie with the way I approach PROJ.
>
> I have created a file according to your specifications documented as part of PROJ:
> http://datastore.franz-benjamin.net/my-projection-mlB4gBJk.json
> It transforms EPSG:4326 coordinates to coordinates in some new coordinate system. I have now the following questions:
>
> (1) The following command works well:
> ====================================
>> echo 2 1 | src/cct -z0 -t0 +proj=tinshift +file=/Users/franz-benjamin/Downloads/my-projection.json
> 225850.4491 123074.6957 0.0000 0.0000
> ====================================
>
> (2) The following does not work:
> ====================================
>> src/proj +proj=tinshift +file=/Users/franz-benjamin/Downloads/my-projection.json
Yes, this is expected. "proj" is a historical utility that works only
with map projections, not fancier transformations like tinshift. You
need to use cct for that.
> Rel. 8.1.1, September 1st, 2021
> <proj>:
> can't initialize operations that take non-angular input coordinates
> program abnormally terminated
> ====================================
> I have also tried it with the most current version, and it does not work either. Any idea?
>
> (3) In QGIS (v3.20.2), I go to Settings->Options to then enter a user defined CRS with the Proj String “+proj=tinshift +file=/Users/franz-benjamin/Downloads/my-projection.json”. When I press validate, it says:
> ====================================
> This proj projection definition is not valid:
> proj_create: invalid value for file
> ====================================
> This QGIS version uses PROJ 8.1.1, hence the choice of the PROJ version in (2). Any idea why it does not work?
Yes, QGIS requires PROJ.4 strings of CRS. The tinshift operation is to
define a transformation between 2 CRS, not to define a CRS.
You can use tinshift in QGIS but this is more complicated than that. You
need to define in proj.db a transformation between 2 CRS using tinshift,
and then QGIS should be able to use that transformation. Examples of how
to define such transformations are in
https://github.com/OSGeo/PROJ/blob/master/data/sql/other_transformation_custom.sql
You'll also need to add records to define your new CRS. Cf
https://github.com/OSGeo/PROJ/blob/master/data/sql/projected_crs.sql if
it is a projected CRS.
>
> (4) I am unsure about which “output_crs” to specify in the my-projection.json file because I am using my own CRS. I just set it to “EPSG:3395” to use *some* CRS, but also “My CRS” and “EPSG_4326” do not work. Any idea what I should enter here?
The new CRS you'll define
>
>
> I tried many different options, parameters, google searches, etc. but could not find any way to make it work under QGIS. Do you have some idea of what I am doing wrong? I would really be thankful if you could push me in the right direction. Thank you! I have tried for two days but could not find any solution.
>
> Thank you in advance for your appreciated help!
>
> Kind regards,
> Franz-Benjamin
>
> --
> Dr Franz-Benjamin Mocnik
> Assistant Professor
>
> Faculty of Geo-Information Science and Earth Observation (ITC), University of Twente
> PO Box 217, Drienerlolaan 5, 7500 AE Enschede, the Netherlands
> Gebouw Langezijds 19, Hallenweg 8, 7522 NH Enschede, the Netherlands (visiting)
>
> room 1344
> phone +31 53 489-9360
> www.mocnik-science.net
> franz-benjamin.mocnik at utwente.nl
> mail at mocnik-science.net
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the PROJ
mailing list