By David Crowther
Did You know…. There is a Plugin for QGIS that allows your users to run searches more easily – the Discovery Plugin.
To install the plugin, choose Plugins > Manage and Install Plugins > search for Discovery and choose Install Plugin.
The new tool will be available as an icon in your toolbars.
Click on the Blue Magnifying glass to setup how the Discovery tool works.
Note – you will require an existing database connection to be setup before choosing the Discovery tool. In this example our QGIS already has a connection to a PostGIS database.
Once you have opened the Discovery tool, choose the following options to setup the search.
- Data Source Type – e.g. PostgreSQL, SQL,…
- Name – give the search option a useful name e.g. postcode search
- Connection – choose the existing connection to your PostGIS/SQL database
- Schema – the schema where the search table exists
- Table – the table to search against
- Search Column – the field in that table to search against
- Display Columns – choose the output fields to show in the results
- Geometry Column – the field in the source table that contains the geometry
- Highlight Colour – choose what colour to use for the search cross hair in the map
Note - You can add as many search options as you like!... searching against planning apps, addresses, schools etc….
Once the config is finished, the Discovery tool now shows the search option in the list…
.. having chosen the search option, now type in the search field to find records… as you type a list of available records in the source table is shown…
In this example we will choose Flat B 180 New Cross Road….
Once you choose a result from the list, the map will auto navigate to the ‘geometry’ of the chosen record. In this case finding the address location from the search list.
You can easily edit the Discovery config,.. to use different tables or search fields,.. for example, we can search the same address dataset but this time using the Full Address Field…
This is a great way to add simple address searching to your QGIS projects, without users having to load the data layers or write complex SQL expressions!
Related to
Comments
0 comments
Please sign in to leave a comment.