[QGIS-Developer] Choose DEM layer as terrain in 3D view using PyQGIS
Abdelghani Tamort
abdel.tmrt at gmail.com
Fri May 3 01:03:19 PDT 2024
Hello Stefanos,
> This looks like a bug on the exporting code. Have you checked the issue
tracker?
You mean issues in the github repo? I've checked there and apparently
nobody has faced this issue before.
> This note is outdated and should be removed. You can access the
Qgs3DMapScene object in python and do an export:
This worked for me, the resulting scene is however the same as the one I
exported using GUI.
I've also just noticed that even if I did specify to set the altitude
clamping to relative to terrain, some buildings seem to sink into the
terrain :
# set altitude clamping to relative to terrain
s.setAltitudeClamping(qgis.analysis.Qgis.AltitudeClamping(2))
[image: image.png]
Cheers,
Abdelghani
On Fri, 3 May 2024 at 00:03, Stefanos Natsis via QGIS-Developer <
qgis-developer at lists.osgeo.org> wrote:
> Hi Abdelghani,
>
> > I've tried to manually export the scene but the results is a bit
> disappointing:
>
> This looks like a bug on the exporting code. Have you checked the issue
> tracker?
>
>
> > Also I've seen that in the python API documentation it is mentioned that
> Qgs3DMapScene is not available. Which means I cannot export the scene using
> pyQGIS?
>
> This note is outdated and should be removed. You can access the
> Qgs3DMapScene object in python and do an export:
> s = Qgs3DMapExportSettings()
> ... # setup your export settings
> iface.mapCanvases3D()[0].scene().exportScene(s)
>
>
> Best,
> Stefanos
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240503/01bcfe95/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1090767 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240503/01bcfe95/attachment-0001.png>
More information about the QGIS-Developer
mailing list