Skip to content
Permalink
Browse files
Fix loading of face layers after breaking it with 73b4986
Fix #9510 again
  • Loading branch information
Sandro Santilli committed Feb 8, 2014
1 parent 6dd0cbe commit 188b373bad4d18ca92a929f3ec611cba910f09b6
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
@@ -116,9 +116,9 @@ def run(item, action, mainwindow):
# face
geomcast = ''
if supportsTypmod:
geomcast = '::geometry(multipolygon,%s)' % toposrid
geomcast = '::geometry(polygon,%s)' % toposrid
layer = db.toSqlLayer(u'SELECT face_id, topology.ST_GetFaceGeometry(%s, face_id)%s as geom ' \
'FROM %s.face WHERE face_id > 0' % (geomcast, quoteStr(toponame), quoteId(toponame)),
'FROM %s.face WHERE face_id > 0' % (quoteStr(toponame), geomcast, quoteId(toponame)),
'geom', 'face_id', u'%s.face' % toponame)
layer.loadNamedStyle(os.path.join(template_dir, 'face.qml'))
registry.addMapLayers([layer])
@@ -131,7 +131,7 @@ def run(item, action, mainwindow):
if supportsTypmod:
geomcast = '::geometry(point,%s)' % toposrid
layer = db.toSqlLayer(u'SELECT face_id, ST_PointOnSurface(topology.ST_GetFaceGeometry(%s, face_id))%s as geom ' \
'FROM %s.face WHERE face_id > 0' % (geomcast ,quoteStr(toponame), quoteId(toponame)),
'FROM %s.face WHERE face_id > 0' % (quoteStr(toponame), geomcast, quoteId(toponame)),
'geom', 'face_id', u'%s.face_seed' % toponame)
layer.loadNamedStyle(os.path.join(template_dir, 'face_seed.qml'))
registry.addMapLayers([layer])

0 comments on commit 188b373

Please sign in to comment.