[Qgis-psc] Grant progress report: Add vertical CRS handling to QGIS

Nyall Dawson nyall.dawson at gmail.com
Thu Aug 1 17:37:48 PDT 2024


On Fri, 2 Aug 2024 at 03:23, Régis Haubourg <regis at qgis.org> wrote:

> Wow Nyall. This is huge.
> Thanks for the very clear explanations and the cautious path you took to
> avoid regressions.
>

Thanks for the kind words Régis!

We will have to make some noise in the deodetic and topographic communities
> that QGIS is now fully z aware.


I agree, and it would be fantastic to have eyes on this and more feedback
from domain experts! One thing on my mind is that we should try to be quite
cautious about how we describe this functionality and be explicit about
everywhere in QGIS where vertical datums are respected. (I.e. for vector
and point cloud layers in elevation profiles, identify results and 3d map
views). There's still many places in QGIS where we are using z values
without any handling of vertical transforms, e.g. in all the processing
tools. And then there's all the plugins which may be doing calculations and
analysis based on Z without any consideration of this too 😬. So I'd love
us to take the approach that we always advertise exactly where the
transform is used, just to reduce the risk of someone getting misleading
results from a tool which doesn't support these. (I once worked in an
office where someone messed up a multi-million dollar engineering project
because they incorrectly handled the vertical datum for a bunch of surveyed
elevation points. Fun times. I was just glad it was someone from the
CAD/design team, and not GIS who was responsible! 😅 )

Nyall





> Hats off
> Régis
>
> Le jeu. 1 août 2024, 05:26, Nyall Dawson via QGIS-PSC <
> qgis-psc at lists.osgeo.org> a écrit :
>
>> PSC,
>>
>> I'm writing to provide an update on the grant for QEP 267 -- Add vertical
>> CRS handling to QGIS.
>>
>> This project has been underway since the grant application, with work
>> being slowly "drip-fed" into QGIS over the last year's worth of releases.
>> All work has been done in a step-by-step, atomic approach, to ensure that
>> every little part of it is thoroughly reviewed and that no regressions have
>> been introduced before moving to the next step. This approach was taken to
>> reduce the risk of regressions in our critical transformation code. I've
>> been carefully monitoring the issue tracker after each part is merged (and
>> after each stable release during this time) to watch for any regression
>> reports, and thankfully we've avoided them so far!
>>
>> Work which has been completed to date includes:
>>
>> - As of QGIS 3.34, QGIS can now create and handle vertical and compound
>> CRSes. (Prior to this work QGIS was limited to creation and handling of
>> horizontal CRS only, for various legacy reasons). There are a range of new
>> PyQGIS API calls which make creation of vertical and compound CRS easy, and
>> to make it possible to eg query the vertical component of an existing
>> compound CRS.
>> - In QGIS 3.36 the coordinate reference selection widgets were updated to
>> offer choices of 2d only, compound, or vertical only CRSes. We use these in
>> QGIS itself, but plugins can now also offer users choices of eg "pick a
>> vertical CRS" where ONLY vertical CRSes are offered.
>>  - In QGIS 3.34 coordinate transforms were reworked so that they function
>> correctly with vertical transformation, if both the source and destination
>> CRS have vertical components. (We delegate the actual transformation to
>> PROJ, but QGIS itself no longer gets in the way and forces 2d only
>> transformations!)
>>   - In version 3.38 we introduced a new setting for QGIS projects, for
>> their vertical reference system. Users can control this through project
>> properties, and it's accessible via PyQGIS and via associated expression
>> variables (eg @project_vertical_crs) for use in print layouts.
>> - Similarly, in 3.38 we introduced the API support for map layers to have
>> a vertical CRS. (This was not exposed to users in 3.38 though)
>> - In QGIS 3.40 so far we have exposed the vertical CRS setting for vector
>> layers to users (via the layer properties dialog), allowing users to
>> specify the associated vertical CRS for these layers. The vertical CRS is
>> respected in elevation profile plots, in Identify tool results, and in 3D
>> Map views (assuming the 3D map is created with an associated vertical CRS).
>> - There is an open pull-request for 3.40 to expose the vertical CRS for
>> point cloud layers in a similar way, with the vertical CRS being respected
>> in elevation profiles, identify tool results, and 3D map views
>> - We have open pull requests for 3.40 to show layer vertical CRS
>> information in the layer properties "information" pages, and add expression
>> variables at the layer scope (eg @layer_vertical_crs).
>>
>> While the work conducted to date satisfies the original target
>> deliverables of the grant*, we also accounted for follow ups to this work
>> as user feedback and tickets are submitted. We'll continue to monitor the
>> QGIS issue tracker and mailing lists for these reports, and (where
>> appropriate) will address them in future releases.
>>
>> Kind regards,
>> Nyall
>>
>> * We've gone a little further than the original deliverables here, and
>> have implemented some of the functionality originally identified as "out of
>> scope"! 😁
>>
>>
>>
>>
>>
>>
>>
>>   - QGIS map layers also have individual settings for the vertical
>> reference system. This isn't YET exposed for user control. Before I expose
>> this setting I want to ensure that the layer type correctly uses vertical
>> transforms in the elevation profiles, in 3d views, and in the identify tool
>> z values. This will definitely be done for vector layers in 3.40, (and
>> hopefully the other layer types too)
>> _______________________________________________
>> QGIS-PSC mailing list
>> QGIS-PSC at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/qgis-psc
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20240802/659c9bd7/attachment.htm>


More information about the QGIS-PSC mailing list