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

Filter for WFS layer: The "Tables" button is missing #46887

Closed
2 tasks done
magerlin opened this issue Jan 19, 2022 · 9 comments
Closed
2 tasks done

Filter for WFS layer: The "Tables" button is missing #46887

magerlin opened this issue Jan 19, 2022 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers

Comments

@magerlin
Copy link

What is the bug or the crash?

I am trying the filter a WFS layer by right clicking in the "Layers" window and choosing "Filter".

It opens a SQL Query Composer with a Data section, which usually contains both a "Table" and a "Columns" button.

But for some (Danish) WFS services (see example in the zip file) there is no "Table Button" which makes the writing of the SQL a bit troublesome.

image

Tables Button.zip

Steps to reproduce the issue

I am trying the filter a WFS layer by right clicking in the "Layers" window and choosing "Filter".

Versions

QGIS version
3.22.2-Białowieża
QGIS code revision
1601ec4
Qt version
5.15.2
Python version
3.9.5
GDAL/OGR version
3.4.0
PROJ version
8.2.0
EPSG Registry database version
v10.038 (2021-10-21)
GEOS version
3.10.0-CAPI-1.16.0
SQLite version
3.35.2
PDAL version
2.3.0
PostgreSQL client version
13.0
SpatiaLite version
5.0.1
QWT version
6.1.3
QScintilla2 version
2.11.5
OS version
Windows 10 Version 2009

Active Python plugins
AddressToolsDK
0.1
AutomaticBackup-master
1.0
Datafordeler
1.2
Dataforsyningen
0.2
dimensioning
0.2
eu_mapper
0.1
FilterLayersAtOnce-master
1.0
Generalizer3
1.0
GeometryShapes
0.7
geosearch_dk
1.2.0
Go2NextFeature3
2.1
GTFS-GO-master
2.2.0
Hqgis
1.1.1
ImportPhotos
3.0.3
JSONEater-master
0.3
LAStools
1.4
location_lab
2.2.2
MapsPrinter
0.9
MemoryLayerSaver
4.0.4
mobilityareas
0.1
NNJoin
3.1.3
opeNoise
1.4
OpenTripPlannerPlugin
1.0
pointsamplingtool
0.5.3
Polygons_Pile
3.0.1
Qgis2threejs
2.6
qgis2web
3.16.0
QNEAT3
1.0.4
qNote
2.2
QPackage
1.5
qtiles
1.7.1
QuickOSM
2.0.0
quick_map_services
0.19.27
realcentroid
1.0.3
refFunctions
1.6
road_inspection_viewer
1.2.4
route_sqlite
0.5
SelectByRelationship
0.3.2
spline
0.2
splitmultipart
1.0.0
SplitPolygonShowingAreas
0.13
SpreadsheetLayers
2.0.1
StreetView
3.2
tomtom_locator_filter
0.2
topojson_writer
0.1.1
travel_time_platform_plugin
1.5.2
valhalla
2.2.1
valuetool
3.0.15
VectorBender
0.2.1
vertex_compare
0.0.1
web2qgis
0.2.0
wfsclient
0.9.11
db_manager
0.1.20
MetaSearch
0.3.5
otbprovider
2.12.99
processing
2.12.99
sagaprovider
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@magerlin magerlin added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 19, 2022
@gioman gioman added the Feedback Waiting on the submitter for answers label Jan 19, 2022
@gioman
Copy link
Contributor

gioman commented Jan 19, 2022

Tables Button.zip

@magerlin the layer "Tables button is missing" is from a service that required authentication, that seems it not working. The layer do not show as QGIS cannot establish a connection, so probably also cannot populate that table list.

@magerlin
Copy link
Author

Sorry fur using a pw restricted layer - a new example is here:
Tables Button v2.zip

It is a public Danish WFS service: https://arealinformation.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer

@gioman
Copy link
Contributor

gioman commented Jan 21, 2022

@magerlin this seems to be by design. Try http://gis.lmi.is/geoserver/wfs, if you force version to 2.0 you get also the "tables" dropdown, if you force at 1.0 or 1.1 you don't.

@rouault
Copy link
Contributor

rouault commented Jan 21, 2022

if you force version to 2.0 you get also the "tables" dropdown, if you force at 1.0 or 1.1 you don't.

yes, the Tables dropdown is only for WFS 2.0 to do joins between layer. This isn't available (or at least implemented) for earlier WFS versions

@rouault rouault closed this as completed Jan 21, 2022
@magerlin
Copy link
Author

Ok - nice to know.

But even if I am not going to do joins I need a Table name of the current WFS layer to do filtering - this name is not available inside the SQL window and I will have to manually copy/paste from layer properties.

@magerlin
Copy link
Author

magerlin commented Jan 24, 2022

And by the way - I cannot make any Tables button appear by forcing this WFS connection to be version 2.0.0:

https://arealinformation.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer

Is that a faulty WFS service then? (It is run by the Danish Ministry of the Environment)

By pressing "Detect" in the WFS setup it returns 2.0 as the version

Just opening the WFS link above in a browser returns this code which both contains version=2.0.0 but also some 1.1 and 1.1.0.
My knowledge om WFS is not big enough to know if that is the reason?

image

@gioman
Copy link
Contributor

gioman commented Jan 24, 2022

Is that a faulty WFS service then? (It is run by the Danish Ministry of the Environment)

@magerlin probably, because you can force it (1.0 or 2.0) with the other service you posted in your example, and there clearly see the difference in the filter dialog.

@gioman
Copy link
Contributor

gioman commented Jan 24, 2022

this name is not available inside the SQL window and I will have to manually copy/paste from layer properties.

The filter dialog is pre-filled when is opened from the "Add WFS layer" dialog (so before adding the layer)

image

I guess that this could be done also when accessing the "filter" dialog from an already added layer. Feel free to open a feature request.

@magerlin
Copy link
Author

I always use the QGIS browser to ad WFS and similar layers:

image

From there you get no filter-dialog so I end up with an unfiltered layer in the layers panel and have to right click that - and then I am missing the table name.

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! Feedback Waiting on the submitter for answers
Projects
None yet
Development

No branches or pull requests

3 participants