Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix typmod aware query for topology face layers
followup d8a768f (which was bogus)
  • Loading branch information
Sandro Santilli committed Feb 23, 2016
1 parent 98713a9 commit 976015a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -125,7 +125,7 @@ def run(item, action, mainwindow):
sql = u'SELECT face_id, topology.ST_GetFaceGeometry(%s,' \
'face_id)::geometry(polygon, %s) as geom ' \
'FROM %s.face WHERE face_id > 0' % \
(quoteStr(toponame), quoteId(toponame), toposrid)
(quoteStr(toponame), toposrid, quoteId(toponame))
uri.setDataSource('', u'(%s\n)' % sql, 'geom', '', 'face_id')
uri.setSrid(toposrid)
uri.setWkbType(QGis.WKBPolygon)
Expand All @@ -142,7 +142,7 @@ def run(item, action, mainwindow):
'topology.ST_GetFaceGeometry(%s,' \
'face_id))::geometry(point, %s) as geom ' \
'FROM %s.face WHERE face_id > 0' % \
(quoteStr(toponame), quoteId(toponame), toposrid)
(quoteStr(toponame), toposrid, quoteId(toponame))
uri.setDataSource('', u'(%s)' % sql, 'geom', '', 'face_id')
uri.setSrid(toposrid)
uri.setWkbType(QGis.WKBPoint)
Expand Down

0 comments on commit 976015a

Please sign in to comment.