mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix loading of face layers after breaking it with 73b49867
Fix #9510 again
This commit is contained in:
parent
6dd0cbe542
commit
188b373bad
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user