[Qgis-developer] [Qgis-user] Using/visualizing 3D data (Z values)

Nathan Woodrow madmanwoo at gmail.com
Wed Sep 26 06:38:35 PDT 2012


That's cool.  It would be cool if there was a QGIS plugin that took
the selected features and rendered them in 3D using matplotlib.... :)

- Nathan

On Wed, Sep 26, 2012 at 11:26 PM, gene <martin.laloux at gmail.com> wrote:
> Using a script like:
>
> def select_all(couche):
>     couche.select([])
>     couche.setSelectedFeatures([obj.id() for obj in couche])
>
> macouche = qgis.utils.iface.activeLayer()
> select_all(macouche)
>
> from shapely.wkb import loads
> from shapely.geometry import shape
> lignes = []
> for elem in macouche.selectedFeatures():
>     geom= elem.geometry()
>     wkb = geom.asWkb()
>     lignes.append(loads(wkb))
>     list(lignes.coords)
>
> You have all the elements (x,y and z) to plot your geometry in 3D with
> matplotlib, visvis or others or to use the Python grass.script module to
> create a 3D layer in GRASS
>
>
>
>
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Re-Qgis-user-Using-visualizing-3D-data-Z-values-tp5004272p5004652.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list