[Qgis-developer] QgsGeometry python Support for 3D

Marcel Kočíšek marcel.kocisek at gmail.com
Fri Oct 2 08:20:21 PDT 2015


Hello,

QgsGeometr.

I have problem with 3d result of intersection. I intersected 2D line string
with 3d Polygons. Outpu line string is in 3D. But asPolyline() method on
line string return only 2D points, is it possible to return also array with
3D points?

intersection = ingeom.intersection(intersectgeom3d)
intersection.exportToWkt()
MultiLineStringZ ((661937.60191086586564779 7450689.95365050807595253
-142.92612291191284157, 661938.75945464021060616 7450690.25032532215118408
-142.89166069253670344, 661939.00637872866354883 7450690.0285286083817482
-142.8571984731605653),(661940.73400440183468163 7450690.12063561286777258
-142.77241502382031513, 661943.96098366600926965 7450692.29900352284312248
-142.97798754540545474, 661947.30321211228147149 7450696.01777701824903488
-143.18356006699059435, 661951.01053172035608441 7450709.4899490661919117
-143.38913258857573396, 661931.48787549824919552 7450727.02594984602183104
-143.59470511016087357, 661920.89663106424268335 7450726.45807552430778742
-143.80027763174601318, 661905.85660309519153088 7450709.72359474468976259
-144.0058501533311528, 661906.98572132491972297 7450688.54670234303921461
-144.21142267491629241, 661907.22252368263434619 7450688.33399735670536757
-144.41699519650146044))

intersection.asPolyline()
[[(661938,7.45069e+06), (661939,7.45069e+06), (661939,7.45069e+06)],
[(661941,7.45069e+06), (661944,7.45069e+06), (661947,7.4507e+06),
(661951,7.45071e+06), (661931,7.45073e+06), (661921,7.45073e+06),
(661906,7.45071e+06), (661907,7.45069e+06), (661907,7.45069e+06)]]

Is it possible to handle with this? I need list of geometry to make some
changes in this list.

My next question: for what is intersect returned 3D geometry and it is not
possible to handle with this geometry in next code.

-- 
*Marcel Kocisek  *
*ASFAPRA - asfaltérske práce, asfapra at slovanet.sk <asfapra at slovanet.sk>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151002/1da6dfa8/attachment.html>


More information about the Qgis-developer mailing list