This section illustrates how you can use the BBOQueryForm Plugin. The BBOX Query Form plugin allows performing queries on feature layers. Using this plugin you can create alphanumeric queries on feature attributes and/or spatial query on a specific region of ??interest. You can also perform spatial queries by drawing Polygon, Circle or Buffer.
Note
This plugin requires another plugin named FeatureGrid in order to show the query results (features). The FeatureGrid allows the User to display vector features in the Map with paging. The User have also the possibility to zoom to a single feature or to a page and to export data in CSV format.
Open the MapComposer.
Note
This Viewer configuration provides the World Countries layer that will be used in this section to perform queries. When the user click on the layer node in TOC the BBOXQueryForm will be enabled and automatically configured to perform queries on the selected layer, only if this layer is not a Raster.
At startup the BBOXQueryForm tool is disabled. Click on the World Countries layer in TOC:
After that the plugin will be enabled. So the User can perform a query through:
The Region Of Interest (ROI): The User have to select first the spatial tool using the dropdown on top of the panel. Then the User can draw the ROI accordingly the Selection method (by default Bounding Box).
Note
By default the User can select the ROI drawing the BBOX. Other possible selection are:
- Cricle
- Polygon
- Buffer
Query by attributes: With this tool the User can search features specifying an OGC filter directly from the GUI.
Note
The OGC Filter is built through OpenLayers using the FeatureType’s attributes returned by a DescribeFeatureType request made to GeoServer.
Select Bounding Box as Selection Method and then click on the SetROI button. Draw a BBOX on the Map with the mouse (left click in a point of the Map and drag, then release the mouse).
When the BBOX it was drawn a tooltip show a Summary Selection (for example selected Area and Perimeter for Polygons).
Now expand the Query by attribute fill fields in order to make the OGC filter. Use:
Match: any
Attribute: GEOUNIT (selected from the dropdown)
Logical Operator: like
Value: S*
Click on Query button.
The result is shown in the FeatureGrid panel. Click on Display on map button in order to highlight features on Map.
Note
The User can select a Row of the Features list in order to highlight the related feature in the Map.
Click on the magnifying glass icon (first column of the feature in the Grid) in order to perform the zoom the the selected feature.
Export selected data as CSV format. Click on Export to CSV and select for example on Single Page.