Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invisible topology #20898

Closed
qgib opened this issue May 21, 2015 · 17 comments
Closed

invisible topology #20898

qgib opened this issue May 21, 2015 · 17 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin High Priority

Comments

@qgib
Copy link
Contributor

qgib commented May 21, 2015

Author Name: Sandro Santilli (@strk)
Original Redmine Issue: 12802
Affected QGIS version: 2.8.3
Redmine category:db_manager
Assignee: Sandro Santilli


The topology "city_data" as created by PostGIS topology regression test cannot be showed anymore by TopoViewer plugin of DBManager.
I'm not sure it has to do with the SRID=-1 or what else, but nothing is shown in the map.

Manually loading the "edge_data" table works.
But the "edge_data" table as loaded by the DBManager TopoViewer cannot be seen.
By saving the project I can see that the DBManager created layer has an empty extent, and hitting "Update Extents" in the layer properties (general tab) does not change things.

This happens in both 2.8 and master branches.

@qgib
Copy link
Contributor Author

qgib commented Jun 23, 2015

Author Name: Sandro Santilli (@strk)


can't reproduce, dunno what happened.


  • status_id was changed from Open to Closed
  • resolution was changed from to invalid

@qgib
Copy link
Contributor Author

qgib commented Jun 25, 2015

Author Name: Sandro Santilli (@strk)


Actually, I'm still seeing it, on both 2.8 and master.
Pretty easy to reproduce. Just load POSTGIS_SOURCE_TREE/topology/test/load_topology.sql into a topology-enabled database and try to see it. Nothing is shown. Puzzling :/


  • status_id was changed from Closed to Reopened
  • resolution was changed from invalid to

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


Sorry but I'd call this a blocker. I hadn't tested 2.8.0 or 2.8.1 or 2.8.2 yet, but 2.8 branch has an unusable topoviewer.
I'm sure the plugin being used is the one from the build dir, as it's written in the console (debug build):

src/core/qgsmaplayer.cpp: 1084: (loadNamedStyle) [0ms] uri = /usr/src/qgis/build/2.8/output/python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/templates/next_right.qml myURI = dbname='postgis_reg' port=5493 sslmode=disable key='edge_id' srid=-1 type=LINESTRING table="city_data"."edge_data" (geom) sql=

I confirm the table does contain data as I can load it as a single table (also via DBManager) and it is then visible.
Only it it not visible when loaded by the topoviewer. I tried changing the style after load but it still doesn't get visible.


  • priority_id was changed from Normal to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


LayerProperties->General->LayerSource is as follows:

For the broken (not visible) layer:

dbname='postgis_reg' port=5493 sslmode=disable key='edge_id' srid=-1 type=LINESTRING table="city_data"."edge_data" (geom) sql=

For the working (visible) layer:

dbname='postgis_reg' port=5493 sslmode=disable key='edge_id' table="city_data"."edge_data" (geom) sql=

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


And this is another working version of the same table, this time loaded via "Add PostGIS Layer" dialog:

dbname='postgis_reg' port=5493 sslmode=disable key='edge_id' srid=0 type=LINESTRING table="city_data"."edge_data" (geom) sql=

At this point the only different thing between the working and non-working versino is the srid=0 (working) vs. srid=-1
(not working)

Did anything change in that reguard, Jurgen ?

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


Filed a ticket in PostGIS to request it being nicer with clients: https://trac.osgeo.org/postgis/ticket/3192
But it's still nice for QGIS to cleanly handle this.

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


NOTE: master branch is also affected by this.
I'm testing a fix that only changes the DBManager plugin, reinterpreting SRID=-1 to SRID=0 but I would like it even better not to need this. Can I just omit the SRID and rely on the provider to figure it out for each table (would be easy by looking in geometry_columns)

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


gah, the patch shows it still fails with this "LayerSource":

dbname='postgis_reg' port=5493 sslmode=disable key='edge_id' srid=0 type=LINESTRING table="city_data"."edge_data" (geom) sql=

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


Sorry, the patch DOES work, only you need to zoom to the layer after loading the topology.

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


Now trying patching postgresql provider instead, to assume it's not just SRID=0 that "does not constraint" but also SRID=-1.

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


The provider patch didn't work, so for safety I'll just touch the dbmanager plugin, taking any SRID<=0 in topology.topology as if it was SRID=0. The topology support in postgis was only official starting with 2.0.0 so by that time SRID=0 is the official unknown value.

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2015

Author Name: Sandro Santilli (@strk)


There's no 2.8.3 choice in the "Target version", how should make sure the fix for this enters 2.8.3 ?


  • assigned_to_id was configured as Sandro Santilli
  • done_ratio was changed from 0 to 80

@qgib
Copy link
Contributor Author

qgib commented Jul 2, 2015

Author Name: Sandro Santilli (@strk)


Fixed in changeset "a4e629b32afcb810a0d8b52b2cce6c3f0973fa61".


  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Jul 2, 2015

Author Name: Sandro Santilli (@strk)


So I pushed the fix (for DBManager topoviewer plugin) in both 2.8 branch (target: 2.8.3) and master branch (target: 2.11?).
But other than writing this note I see it would not be easy to tell which version got the fix from just reading this ticket.
I think we should improve this.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Aug 20, 2015

Author Name: Sandro Santilli (@strk)


It turns out the canvas is back blank after saving and re-opening the project, so this is still not fully fixed :(


  • version was changed from 2.8.2 to 2.8.3

@qgib
Copy link
Contributor Author

qgib commented Oct 21, 2015

Author Name: Nyall Dawson (@nyalldawson)


Not a blocker


  • priority_id was changed from Severe/Regression to High

@qgib
Copy link
Contributor Author

qgib commented Jan 19, 2016

Author Name: Sandro Santilli (@strk)


I cannot reproduce with current master (b2a1273)


  • status_id was changed from Reopened to Closed
  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority DB Manager Relating to the DB Manager core plugin labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin High Priority
Projects
None yet
Development

No branches or pull requests

1 participant