Skip to content

Commit 976015a

Browse files
author
Sandro Santilli
committedFeb 23, 2016
Fix typmod aware query for topology face layers
followup d8a768f (which was bogus)
1 parent 98713a9 commit 976015a

File tree

1 file changed

+2
-2
lines changed
  • python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview

1 file changed

+2
-2
lines changed
 

‎python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def run(item, action, mainwindow):
125125
sql = u'SELECT face_id, topology.ST_GetFaceGeometry(%s,' \
126126
'face_id)::geometry(polygon, %s) as geom ' \
127127
'FROM %s.face WHERE face_id > 0' % \
128-
(quoteStr(toponame), quoteId(toponame), toposrid)
128+
(quoteStr(toponame), toposrid, quoteId(toponame))
129129
uri.setDataSource('', u'(%s\n)' % sql, 'geom', '', 'face_id')
130130
uri.setSrid(toposrid)
131131
uri.setWkbType(QGis.WKBPolygon)
@@ -142,7 +142,7 @@ def run(item, action, mainwindow):
142142
'topology.ST_GetFaceGeometry(%s,' \
143143
'face_id))::geometry(point, %s) as geom ' \
144144
'FROM %s.face WHERE face_id > 0' % \
145-
(quoteStr(toponame), quoteId(toponame), toposrid)
145+
(quoteStr(toponame), toposrid, quoteId(toponame))
146146
uri.setDataSource('', u'(%s)' % sql, 'geom', '', 'face_id')
147147
uri.setSrid(toposrid)
148148
uri.setWkbType(QGis.WKBPoint)

0 commit comments

Comments
 (0)
Please sign in to comment.