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

(daily build cd0ba91) virtual layer queries seem to be broken #25448

Closed
qgib opened this issue Nov 25, 2017 · 11 comments
Closed

(daily build cd0ba91) virtual layer queries seem to be broken #25448

qgib opened this issue Nov 25, 2017 · 11 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Nov 25, 2017

Author Name: Lars Kellogg-Stedman (@larsks)
Original Redmine Issue: 17551
Affected QGIS version: master
Redmine category:virtual_layers


I am trying to use the "virtual layers" feature in QGIS (daily build cd0ba91) to select a list of towns adjacent to a specific town using data from MassGIS. The source data is the "Mass. Cities and Towns" dataset from the MassGIS WFS server, using CRS EPSG:26986. I load this into a layer called "town".

Next, I select "Layer -> Add Layer -> Add/Edit Virtual Layer..." and use the following query:

SELECT b.town_id as town_id, b.town as town, b.geometry as geometry
FROM towns AS a JOIN towns AS b
WHERE a.town = "BELMONT" AND st_touches(a.geometry, b.geometry)

I click "add", and then layer shows up as expected. At this point, if I move/zoom the map canvas or attempt to open the attribute table, qgis gets stuck. The "virtual layers" feature seems extraordinarily useful if only it would work :).

I'm running the nightly build on Ubuntu Xenial (with all the dependencies up-to-date: e.g., running an apt-get update/apt-get upgrade before installing qgis).

@qgib
Copy link
Contributor Author

qgib commented Nov 25, 2017

Author Name: Giovanni Manghi (@gioman)


Did you tagged as regression because the query (with the same data) works on 2.18.14?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Nov 26, 2017

Author Name: Lars Kellogg-Stedman (@larsks)


Giovanni Manghi wrote:

Did you tagged as regression because the query (with the same data) works on 2.18.14?

Yes, that's correct. With 2.18.14 the exact same operation works fine, and I can continue interacting with qgis.

@qgib
Copy link
Contributor Author

qgib commented Nov 26, 2017

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open
  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Dec 5, 2017

Author Name: Sandro Santilli (@strk)


Lars can you attach or provide a link to download the input datasource ? Your query seems to be expensive, how much does it take to complete from commandline (taking qgis out of the picture) ?


  • assigned_to_id was configured as Sandro Santilli
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Dec 11, 2017

Author Name: Lars Kellogg-Stedman (@larsks)


Sandro Santilli wrote:

Lars can you attach or provide a link to download the input datasource ?

Sandro, sorry for the slow response. The email notification about your comment got mis-filtered. Let me see whether or not this still reproduces with the current daily build.

@qgib
Copy link
Contributor Author

qgib commented Dec 11, 2017

Author Name: Lars Kellogg-Stedman (@larsks)


Sandro Santilli wrote:

Lars can you attach or provide a link to download the input datasource ? Your query seems to be expensive, how much does it take to complete from commandline (taking qgis out of the picture) ?

The data source I'm using is (this is the "URI" field from the "Properties..." dialog associated with the layer in the WFS listing):

restrictToRequestBBOX='1' srsname='EPSG:26986' typename='massgis:GISDATA.TOWNS_POLY_TRANSP_EDU' url='http://giswebservices.massgis.state.ma.us/geoserver/wfs' version='1.0.0' version='1.0.0' table="" sql=

There are only 351 features in that data source.

The procedure:

  1. select that layer
  2. select "Add selected layer(s) to canvas"
  3. rename the new layer to "towns"
  4. hide the layer (uncheck the checkbox next to it in the layer list)
  5. select "add/edit virtual layer"
  6. enter the query (see original report) into the "query" field
  7. click "add"
  8. close the "add/edit virtual layer" window

...and now, if I zoom the canvas so that the layer ends up off the visible area, qgis gets wedged somehow.

I've recorded a demonstration and made it available at https://youtu.be/3_YdztSUGKo

@qgib
Copy link
Contributor Author

qgib commented Dec 15, 2017

Author Name: Sandro Santilli (@strk)


Connecting to WFS service http://giswebservices.massgis.state.ma.us/geoserver/wfs now does not give massgis:GISDATA.TOWNS_POLY_TRANSP_EDU as a layer option. Ido see a massgis:TOWN_POLYM_SHP and massgis:GISDATA.TOWNS_POLY_AREACODE (non spatial). Selecting massgis:TOWN_POLYM_SHP and adding to canvas doesn't show anythingon the map

@qgib
Copy link
Contributor Author

qgib commented Dec 18, 2017

Author Name: Lars Kellogg-Stedman (@larsks)


You can see me select the layer right there in the youtube video. If the information that qgis is providing in the "properties" window is incorrect, maybe that's a different bug.

I've run into a similar performance difference between the release and the latest nightly when using postgis data sources as well (using the current release, clicking on a feature with the "info" point returns information instantly; using the nightly it takes upwards of 30 seconds while consuming lots of CPU time).

Unfortunately, all the data sources I'm using seem to be hard to share (local postgis sources, and WFS layers that load fine for me but using the information that qgis gives me seem to be unavailable to you). I'm not sure how to move this forward. I'd like to see the problem fixed, because if I'm hitting while just playing around with toy data, I can't imagine what the impact would be on someone trying to use larger data sets.

@qgib
Copy link
Contributor Author

qgib commented Dec 19, 2017

Author Name: Sandro Santilli (@strk)


Could you try attaching a projectfile nontheless, just with the WFS layer in it ? The PostGIS layer is not required for reproducing the bug, is it ? I can try creating the virtual layer locally.
Also a question: does this getting stuck only happens when having that additional WFS layer ? Does it still happen if the WFS layer is turned to invisible/inactive before adding the virtual layer ?

@qgib
Copy link
Contributor Author

qgib commented Jan 17, 2018

Author Name: Sandro Santilli (@strk)


  • assigned_to_id removed Sandro Santilli

@qgib
Copy link
Contributor Author

qgib commented Jan 24, 2018

Author Name: Nyall Dawson (@nyalldawson)


Closing due to lack of feedback


  • resolution was changed from to not reproducable
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Jan 24, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Data Provider Related to specific vector, raster or mesh data providers Crash/Data Corruption Regression Something which used to work, but doesn't anymore labels 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! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant