Friday, 18 November 2016

Is there a way to get Z value from 3D multipoint shapefile in QGIS?


Is there a way to get Z value/height/altitude from 3D multipoint shapefile in QGIS? All I found is way through SpatiaLite or PostGIS as explained here:


http://faunaliagis.wordpress.com/2013/08/14/transfer-3d-shapefiles-z-values-to-the-table-of-attributes/


But conversion multipoint to point using Vector/Geometry tools/Multipart to singlepart drops the Z value. I opened DB manager, select DB and run SQL command in SQL window:


update tablename set columnname = st_z(st_pointn(geom,1)


In my case:


update lidar_pts set z= st_z(st_pointn(GEOMETRY,1))

First there was missing ")" at the end, second: no such column: geom. So I changed it to "GEOMETRY" which end up running but all z values become Null.


Is there a better/other way in QGIS 2? Or at least is there a way to convert multipoint to point directly in SpatiaLite so it will keep z geometry?



Answer



From my understanding the current version of QGIS does not have 3D capabilities. You would have do, as you stated, 3D work in PostGIS or Spatialite. There may be a method to do the 3D functions you are inquiring about in Grass, which has a QGIS plugin.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...