umbe1987 / shire

A WebGIS portal made with open source projects.
MIT License
2 stars 0 forks source link

Attribute Table pagination #20

Open umbe1987 opened 5 years ago

umbe1987 commented 5 years ago

As requesting all the records from a WFS which has many rows slows down the rendering of the table, now there's an impse limit to a maximum of feature requests which is 200 (maybe too few). I can implement a pagination like I do for the Info panel, by paginating the rows with the parameters STARTINDEXcombined with MAXFEATURES, as described in https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/services.html#getfeature.

e.g. 200 records starting from the 200th

https://www.wondermap.it/cgi-bin/qgis_mapserv.fcgi?map=/home/ubuntu/qgis/projects/glaciers_WMS/demo_glaciers.qgs&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&MAXFEATURES=200&STARTINDEX=200&TYPENAME=glaciers_area&

(without geometry, see also #19) https://www.wondermap.it/cgi-bin/qgis_mapserv.fcgi?map=/home/ubuntu/qgis/projects/glaciers_WMS/demo_glaciers.qgs&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&MAXFEATURES=200&STARTINDEX=200&TYPENAME=glaciers_area&GEOMETRYNAME=none&

umbe1987 commented 5 years ago

To retrieve the total number of features in a WFS, one can use the standard WFS parameter RESULTTYPE=hits&.

Example: https://www.wondermap.it/cgi-bin/qgis_mapserv.fcgi?map=/home/umberto/qgis/projects/Demo_sci_WMS/demo_sci.qgs&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=piste_sci&RESULTTYPE=hits&

immagine