[Qgis-psc] Grant progress report: Add vertical CRS handling to QGIS
Nyall Dawson
nyall.dawson at gmail.com
Wed Jul 31 20:26:25 PDT 2024
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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20240801/ae716921/attachment.htm>
More information about the QGIS-PSC
mailing list