Skip to content

Commit

Permalink
add multipoint geometry support to Export/Add geometry column. Thanks to
Browse files Browse the repository at this point in the history
Salvatore for investigating issue
  • Loading branch information
alexbruy committed Apr 29, 2012
1 parent a7adf8d commit d3a50e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/fTools/tools/doGeometry.py
Expand Up @@ -974,10 +974,13 @@ def feature_extent( self, ):

def simpleMeasure( self, inGeom, calcType, ellips, crs ):
if inGeom.wkbType() in ( QGis.WKBPoint, QGis.WKBPoint25D ):
pt = QgsPoint()
pt = inGeom.asPoint()
attr1 = pt.x()
attr2 = pt.y()
elif inGeom.wkbType() in ( QGis.WKBMultiPoint, QGis.WKBMultiPoint25D ):
pt = inGeom.asMultiPoint()
attr1 = pt[ 0 ].x()
attr2 = pt[ 0 ].y()
else:
measure = QgsDistanceArea()

Expand Down

0 comments on commit d3a50e8

Please sign in to comment.