Skip to content
Permalink
Browse files

Fix typmod aware query for topology face layers

followup d8a768f (which was bogus)
  • Loading branch information
Sandro Santilli
Sandro Santilli committed Feb 23, 2016
1 parent 98713a9 commit 976015a38dedb22c16a84cf8c741d052905f20b9
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
@@ -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)
@@ -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)

0 comments on commit 976015a

Please sign in to comment.
You can’t perform that action at this time.