diff --git a/src/.vitepress/sidebar/en.js b/src/.vitepress/sidebar/en.js index 9c291032..03312056 100644 --- a/src/.vitepress/sidebar/en.js +++ b/src/.vitepress/sidebar/en.js @@ -111,6 +111,7 @@ export default { { text: 'Synchronisation in Mergin Maps Mobile App', link: '/field/autosync/' }, { text: 'Measurement Tools', link: '/field/measure/' }, { text: 'Layers in Mergin Maps Mobile App', link: '/field/layers/' }, + { text: 'Filtering Features', link: '/field/filtering/' }, { text: 'Map Sketching', link: '/field/map-sketching/' }, { text: 'Photo Sketching', link: '/field/photo-sketching/' }, { text: 'How to Add, Edit, Delete Features', link: '/field/mobile-features/' }, diff --git a/src/field/filtering/index.md b/src/field/filtering/index.md new file mode 100644 index 00000000..7db3af0b --- /dev/null +++ b/src/field/filtering/index.md @@ -0,0 +1,76 @@ +--- +description: Add custom filters to sort and display only those features that you need during your field survey. +--- + +# Filtering Features in Mergin Maps mobile app +[[toc]] + +Custom filters can be added to the to easily filter features displayed on the map as well as in the [survey layers](../layers/#browsing-features). + +## Enable and define filtering in QGIS +Filters can be enabled and defined in QGIS in **Project Properties**. + +::: tip Plugin upgrade +If you do not see the **Filtering** option in the **Project properties**, check for [plugin upgrades](../../setup/install-mergin-maps-plugin-for-qgis/#plugin-upgrade). +::: + +Check the :heavy_check_mark: **Enable filtering** option in the tab, click on the **Add filter** button and select a filter type from the list. The list of available [filter types](#filter-types) and their properties can be found below. + +Then, define the filter: + - **Type** - the filter type (in general, it should match the widget type of the filtered field) + - **Layer** - choose from the project's layers + - **Field** - choose from the fields of the layer. Only fields with data types compatible with the selected filter type are offered. + - **Title** - the name of the filter, which will be displayed in the + + ![Filtering in QGIS Mergin Maps project](./qgis-project-properties-enable-filtering.webp "Filtering in QGIS Mergin Maps project") + +You can add as many filters as you need by using the **Add filter** button. + +The order of filters can be changed by selecting a filter and using the **Up** and **Down** buttons. To remove a filter, select it and click the **Remove** button. +![Filtering in QGIS Mergin Maps project](./qgis-filtering.webp "Filtering in QGIS Mergin Maps project") + +qgis-filtering.webp +Don't forget to save your project and synchronise changes so that you can use the filters in the . + + +### Filter types + +**Text** filter uses simple text input. Results are filtered based the SQL expression `"field" ILIKE '%input%'`. Available for text and number field types. + +**Number** filter provides *from* and *to* number inputs. Results are filtered based on SQL expression `"field" >= 'input_from' AND "field" <= 'input_to'`. Available for text and number field types. + +**Date** filter provides *from* and *to* date (calendar) inputs. Results are filtered based on SQL expression `"field" >= 'input_from' AND "field" <= 'input_to'`. Available for date field types configured with the [Date and time widget](../../layer/date-time/). + +**Boolean** filter provides a toggle between *all*, *true* and *false* values. Results are filtered based on SQL expression `"field" == 'input'`. Available for Boolean, text and integer field types configured with the [Checkbox widget](../../layer/checkbox/). + +**Single select** filter provides a drop-down menu of field values. One value can be selected at once. The results are filtered based on SQL expression `"field" == 'input'`. Available for text and number field types configured with the [Value map or Value relation widget](../../layer/value-select/). + +**Multi select** filter provides a drop-down menu of field values. Multiple values can be selected at once. The results are filtered based on SQL expression `"field" IN ('input')`. Available for text and number field types configured with the [Value map or Value relation widget](../../layer/value-select/#value-relation). + +In the , the filter types looks as follows: + +![Filter types in Mergin Maps mobile app](./mobile-filter-types.webp "Filter types in Mergin Maps mobile app") + +## Filtering features in the mobile app +Filters defined in [ project in QGIS](#enable-and-define-filtering-in-qgis) can be used in the . You can filter features across multiple layers by entering or selecting values in corresponding filters. The filtering affects both the map display and the feature browsing list. + +:::warning Filters reset +Filters are reset when the project is synced. Also, they do not stay saved when the app is restarted. +::: + +Here is an example of how filtering works: + +1. Tap the **Filters** button to open filters defined in the project + ![Filtering button in Mergin Maps mobile app](./mobile-open-filters.webp "Filtering button in Mergin Maps mobile app") + +2. Enter or select values in the filters. Here, we will use a *Single select* filter on the *trees* layer and select a *tree species* value from the list. + + You can use more filters at once. + + Tap on the **Apply filters** button to confirm the filtering. + ![Filtering in Mergin Maps mobile app](./mobile-filter-single-selection.webp "Filtering in Mergin Maps mobile app") + +3. With active filters, only features that match the criteria are displayed on the map as well as when [browsing features](../layers/#layers-legend-and-features). + + If filters are applied + ![Active filter in Mergin Maps mobile app](./mobile-filtered-features.webp "Active filter in Mergin Maps mobile app") diff --git a/src/field/filtering/mobile-filter-single-selection.webp b/src/field/filtering/mobile-filter-single-selection.webp new file mode 100644 index 00000000..601b6ec6 Binary files /dev/null and b/src/field/filtering/mobile-filter-single-selection.webp differ diff --git a/src/field/filtering/mobile-filter-single-selection.xcf b/src/field/filtering/mobile-filter-single-selection.xcf new file mode 100644 index 00000000..e31676b2 Binary files /dev/null and b/src/field/filtering/mobile-filter-single-selection.xcf differ diff --git a/src/field/filtering/mobile-filter-types.webp b/src/field/filtering/mobile-filter-types.webp new file mode 100644 index 00000000..526b73a5 Binary files /dev/null and b/src/field/filtering/mobile-filter-types.webp differ diff --git a/src/field/filtering/mobile-filter-types.xcf b/src/field/filtering/mobile-filter-types.xcf new file mode 100644 index 00000000..90358f22 Binary files /dev/null and b/src/field/filtering/mobile-filter-types.xcf differ diff --git a/src/field/filtering/mobile-filtered-features.webp b/src/field/filtering/mobile-filtered-features.webp new file mode 100644 index 00000000..8d4af457 Binary files /dev/null and b/src/field/filtering/mobile-filtered-features.webp differ diff --git a/src/field/filtering/mobile-filtered-features.xcf b/src/field/filtering/mobile-filtered-features.xcf new file mode 100644 index 00000000..b7bc1dce Binary files /dev/null and b/src/field/filtering/mobile-filtered-features.xcf differ diff --git a/src/field/filtering/mobile-filtering.gif b/src/field/filtering/mobile-filtering.gif new file mode 100644 index 00000000..f0401448 Binary files /dev/null and b/src/field/filtering/mobile-filtering.gif differ diff --git a/src/field/filtering/mobile-open-filters.webp b/src/field/filtering/mobile-open-filters.webp new file mode 100644 index 00000000..c83c39ed Binary files /dev/null and b/src/field/filtering/mobile-open-filters.webp differ diff --git a/src/field/filtering/mobile-open-filters.xcf b/src/field/filtering/mobile-open-filters.xcf new file mode 100644 index 00000000..fcb3e4d3 Binary files /dev/null and b/src/field/filtering/mobile-open-filters.xcf differ diff --git a/src/field/filtering/qgis-filtering.webp b/src/field/filtering/qgis-filtering.webp new file mode 100644 index 00000000..ed0c4cba Binary files /dev/null and b/src/field/filtering/qgis-filtering.webp differ diff --git a/src/field/filtering/qgis-filtering.xcf b/src/field/filtering/qgis-filtering.xcf new file mode 100644 index 00000000..69a9f1bf Binary files /dev/null and b/src/field/filtering/qgis-filtering.xcf differ diff --git a/src/field/filtering/qgis-project-properties-enable-filtering.webp b/src/field/filtering/qgis-project-properties-enable-filtering.webp new file mode 100644 index 00000000..75225b1e Binary files /dev/null and b/src/field/filtering/qgis-project-properties-enable-filtering.webp differ diff --git a/src/field/filtering/qgis-project-properties-enable-filtering.xcf b/src/field/filtering/qgis-project-properties-enable-filtering.xcf new file mode 100644 index 00000000..5ccfefeb Binary files /dev/null and b/src/field/filtering/qgis-project-properties-enable-filtering.xcf differ diff --git a/src/gis/features/index.md b/src/gis/features/index.md index 836408ce..7661679f 100644 --- a/src/gis/features/index.md +++ b/src/gis/features/index.md @@ -82,6 +82,8 @@ If the map tip has `# image` marker on the first line, the following line is und ## Background layers Various online and offline maps can be used as background layers for navigation during the field survey. You can find more information in [Background Maps](../settingup_background_map/). +## Map themes +[Map Themes](../setup_themes/) make possible to switch between different background maps, combinations of visible layers or their styles both in QGIS and in . ## Project settings - Ensure the paths are set to *Relative* in the **General** tab in Project Properties. All paths to the project data in are relative to the project location. @@ -179,7 +181,9 @@ There is an option to define the order in which layers are displayed in the (e.g. cartography maps and aerial imagery) +### Filtering features +Filters for features in the can be enabled in the **** tab in **Project properties**. +![Enable filtering in QGIS Mergin Maps project](./project-filtering.webp "Enable filtering in QGIS Mergin Maps project") +You can find more details about how this works in [Filtering Features](../../field/filtering/). diff --git a/src/gis/features/project-filtering.webp b/src/gis/features/project-filtering.webp new file mode 100644 index 00000000..566102cb Binary files /dev/null and b/src/gis/features/project-filtering.webp differ diff --git a/src/gis/features/project-filtering.xcf b/src/gis/features/project-filtering.xcf new file mode 100644 index 00000000..51dabeed Binary files /dev/null and b/src/gis/features/project-filtering.xcf differ diff --git a/src/index.md b/src/index.md index 4db1a859..e771a7e3 100644 --- a/src/index.md +++ b/src/index.md @@ -105,6 +105,7 @@ The ecosystem consist of various components: - [Synchronisation in ](./field/autosync/) - [Measurement Tools](./field/measure/) - [Layers in ](./field/layers/) +- [Filtering Features in ](./field/filtering/) - [Map Sketching in ](./field/map-sketching/) - [Photo Sketching in ](./field/photo-sketching/) - [How to Add, Edit, Delete Features](./field/mobile-features/) diff --git a/src/manage/plugin/index.md b/src/manage/plugin/index.md index 992290f8..571bbbb5 100644 --- a/src/manage/plugin/index.md +++ b/src/manage/plugin/index.md @@ -1,5 +1,7 @@ --- description: Create, set up and synchronise your Mergin Maps projects with Mergin Maps QGIS plugin. The plugin brings Mergin Maps functionalities to QGIS. + +outline: deep --- # Mergin Maps QGIS Plugin Overview @@ -98,6 +100,7 @@ Some settings of your [ project](../project/) can be done th - Enable [**Map sketching**](../../field/map-sketching/) - Set [**Layer order**](../../field/layers/#layer-order) for the - Enable [**Photo sketching**](../../field/photo-sketching/) to annotate pictures in the +- Enable [**Filtering**](../../field/filtering) features in the ![Mergin Maps Project Properties in QGIS](./qgis-mergin-maps-project-properties.jpg "Mergin Maps Project Properties in QGIS") diff --git a/src/manage/plugin/qgis-mergin-maps-project-properties-2.jpg b/src/manage/plugin/qgis-mergin-maps-project-properties-2.jpg index 601ee9aa..69329563 100644 Binary files a/src/manage/plugin/qgis-mergin-maps-project-properties-2.jpg and b/src/manage/plugin/qgis-mergin-maps-project-properties-2.jpg differ diff --git a/src/manage/plugin/qgis-mergin-maps-project-properties-2.xcf b/src/manage/plugin/qgis-mergin-maps-project-properties-2.xcf new file mode 100644 index 00000000..df7daa79 Binary files /dev/null and b/src/manage/plugin/qgis-mergin-maps-project-properties-2.xcf differ