[Qgis-developer] Z or M styling in QGIS

RĂ©gis Haubourg regis.haubourg at gmail.com
Tue Jan 3 02:31:04 PST 2017


2017-01-03 5:44 GMT+01:00 Nyall Dawson <nyall.dawson at gmail.com>:

>
>
> 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


Yes I forgot to mention Qt3D. That would be good to know if someone has
already played with it.



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


Thanks for the pointer, That works with that expression on a Marker Line
easily to draw vertical edges. See the screenshot here
http://imgur.com/RPtOjMg



>

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.
>

Wow I just realized that you can combine a geometry generator inside a
marker line. Win!!!

I used that expression, creating a line for each marker with a y
translation using z value:

make_line( translate(point_n(  $geometry,  @geometry_point_num ), 0 ,
-z(point_n($geometry, at geometry_point_num)) ), translate( point_n(
 $geometry,  @geometry_point_num +1  ), 0 ,
-z(point_n($geometry, at geometry_point_num+1))
) )

See http://imgur.com/TlCN7zf


and a video just to underline the immediate feedback when editing :)

https://youtu.be/o_lAeKJhRkg



Thanks again Nyall, QGIS always allows a lot more than we think. So
great....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170103/f79a2e6d/attachment.html>


More information about the Qgis-developer mailing list