[Qgis-developer] [Qgis-user] Using/visualizing 3D data (Z values)
gene
martin.laloux at gmail.com
Wed Sep 26 05:24:25 PDT 2012
The problem is that Shapely is based on GEOS and GEOS isn't a 3D library at
all. *The z of the geometries are not considered during any spatial
operations but you can use matplotlib to represent the 3D geometry*
>>> from shapely.geometry import Point
>>> p = geometry.Point(1,2,3)
>>> list(p.coords)
[(1.0, 2.0, 3.0)]
>>> p.has_z
True
>>> p.z
3.
*and wkt et wkb formats do not recognize the z value*
>>> p.wkt
'POINT (1.0000000000000000 2.0000000000000000)'
*The geo_interface format (GeoJson), yes*
>>> from shapely.geometry import mapping, shape
>>> p.__geo_interface__
{'type': 'Point', 'coordinates': (1.0, 2.0, 3.0)}
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Re-Qgis-user-Using-visualizing-3D-data-Z-values-tp5004272p5004608.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
More information about the Qgis-developer
mailing list