[Qgis-developer] Z or M styling in QGIS

Nyall Dawson nyall.dawson at gmail.com
Mon Jan 2 20:44:04 PST 2017


On 3 January 2017 at 02:48, Régis Haubourg <regis.haubourg at gmail.com> wrote:
> Hi folks,
> I wish you all a happy new year and best wishes for a winning QGIS3 release!
>
> While working with Z value improvements in QGIS (see [0] ), It became clear
> that we have some room for 3D - 4D styling.
>
> I already have gathered some existing solutions for that:
>
> - Use Matplotlib / plotly external tools to display true 3 D objects even if
> those tools are more "plot" oriented.
> - Add a panel for vertical cuts like Profile tools and others (we have one
> using D3js somewhere, another using a true mapcanvas). This gives a true Z
> value.
> - couple QGIS with a browser - like horao for true 3D
> http://oslandia.github.io/horao/

I'd say the preferred solution would be a 3d viewer using the Qt 3d
framework (http://doc.qt.io/qt-5/qt3d-examples.html). Then it could be
built in as core functionality instead of as a python plugin (or
relying on a js framework). We'd gain lots of benefits to this
approach, including:
- could be used with a multi-canvas view, with a mix of 2d/3d views
- could potentially reuse existing symbology as surface materials
- could do nifty things like embedding an interactive 3d view in a composer
- could potentially replace the globe plugin

>
> I was wondering if a complementary solution could be to improve expression
> generator with some iterators that could loop on vertices and generate
> geometries (so iterators and aggregators such as SQL generate_series /
> aggregate or window function).
> We could then imagine to extend current 2.5 D generator to lines, display
> roof steepness, projects depths with dashed lines and so on.
> Does that sound like a feasible solution? Again, this will point out a point
> around advanced SQL engine vs qgis specific expressions but whatever the
> technical option, I think this could be quite nice.

There's already a lot possible here using geometry generators and the
existing expressions. Eg with a marker line style set to markers on
nodes you can use the  @geometry_point_num variable to pull out the
specific node being rendered.

So something like:
z(point_n($geometry, at geometry_point_num))

Throw that inside some type of data defined override and you can style
a geometry's nodes based on their z value.

A geometry generator using  segments_to_lines and geometry_n can style
a geometries segments based on their z/m values too.

There's a lot more we can do, but styling with z/m is already possible
and I know of a few users who are already doing this.

Nyall







>
> Does that ring any bell to someone working on something similar?
>
> All the best!
>
> [0]
> https://github.com/qgis/QGIS/pull/3905/commits/d2f41ac9024d222ab97db629b237c9bb31e6d2a1
>
>
>
> -----
> ----------------------------------
> Régis Haubourg
> GIS administrator and project manager
> Administrateur de données géographiques et chef de projet SIG
> Agence de l'eau Adour-Garonne
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Z-or-M-styling-in-QGIS-tp5301770.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list