1

I have converted e simple polygon layer to e a topogeometry layer in postgis topology.

And now I have 3 main layer, Edge_data (lines),nodes(points) and the polygons topogeometry (.topo).

enter image description here

I can open these layers in Qgis and everything is ok beside the topogeometry layer (polygon), it takes to much time to render and it is not practical.

Is this normal for this type of geometry or it can be done something to speed up things, the number of polygons is 25000.

1

The reason is that the topogeom datatype is just referencing its primitives, and therefore it is impossible to build an spatial index on that column.

To increase the performance QGIS would have to be enhanced e.g. in a way to utilise the spatial index of the geometry column while displaying the topogeom column.

This would be achievable by keyword substitution in provider queries [1]. This would imply that the geom and topogeom column are both present and in "sync".

A second possibility would be that QGIS utilises the spatial index on the face bbox.

Also: only the bbox of a face is saved in the database. The actual face is constructed on-the-fly based on its primitives. That is also a bottleneck.

[1] https://issues.qgis.org/issues/4374#change-72025

  • Is there a possibility to freeze the topogeometry from beeng updated every pan, but instead to be triggered updated only by the movement of its primitive elements? – Shefqet LULJA Nov 8 '17 at 13:50
  • The QGIS data provider will always construct a query like this: SELECT st_asbinary("topo",'NDR'),"gid" FROM "test"."topo_test" WHERE "topo" && st_makeenvelope(138,-35,138,-34,4326) when you pan the canvas. The envelope being the current canvas of QGIS. It is hard coded that it uses the topogeom column when you display it. And that is the problem – andehhh Nov 8 '17 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.