Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/.vitepress/sidebar/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: 'Feature Filtering', 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/' },
Expand Down
79 changes: 79 additions & 0 deletions src/field/filtering/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
description: Add custom filters to sort and display only those features that you need during your field survey.
---

# Feature Filtering in Mergin Maps Mobile App
[[toc]]

Custom filters can be added to the <MobileAppNameShort /> to easily filter features displayed on the map as well as in the [survey layers](../layers/#browsing-features).

::: tip Feature filtering blog
You can read about this feature also on our blog <MainDomainNameLink id="blog/from-wishlist-to-app-feature-filtering-is-live" desc="From wishlist to app: Feature filtering is live"/>.
:::

## 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 <MainPlatformName /> 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 <MobileAppNameShort />

![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")

Don't forget to save your project and synchronise changes so that you can use the filters in the <MobileAppNameShort />.


### Filter types

**Text** filter uses simple text input. Results are filtered based on 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 <MobileAppNameShort />, 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 [<MainPlatformName /> project in QGIS](#enable-and-define-filtering-in-qgis) can be used in the <MobileAppNameShort />. 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.

Filters do not stay saved when the app is restarted.

Here is an example of how filtering works:

1. Tap the **More** button to open **Filters** defined in the project

Filtering has to be enabled in the [QGIS project](#enable-and-define-filtering-in-qgis), otherwise this option is not displayed.
![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. You can use more filters at once.

Here, we will use a *Single select* filter on the *trees* layer and select a *tree species* value from the list.

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).

You can use the active **Filters** button to quickly access filters.
![Active filter in Mergin Maps mobile app](./mobile-filtered-features.webp "Active filter in Mergin Maps mobile app")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added src/field/filtering/mobile-filter-types.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/field/filtering/mobile-filter-types.xcf
Binary file not shown.
Binary file added src/field/filtering/mobile-filtered-features.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/field/filtering/mobile-filtered-features.xcf
Binary file not shown.
Binary file added src/field/filtering/mobile-filtering.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/field/filtering/mobile-open-filters.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/field/filtering/mobile-open-filters.xcf
Binary file not shown.
Binary file added src/field/filtering/qgis-filtering.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/field/filtering/qgis-filtering.xcf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
9 changes: 5 additions & 4 deletions src/field/mobile-app-ui/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The **Projects** tab contains the list of all projects in your current [workspac
- Tap the **Download** button next to the project name to download it to your mobile device
- For projects that are already downloaded to your device, you can use the button next to the project name to synchronise the project, see local changes or remove the project from your device

:::tip
:::tip Switching workspace
If you need to download a project from another workspace, you need to [switch to this workspace in the mobile app](../../manage/workspaces/#switch-workspaces-in-mergin-maps-mobile-app) first.
:::

Expand All @@ -66,7 +66,7 @@ Here, you can [sign up to <MainPlatformName />](../../setup/sign-up-to-mergin-ma
- **Sign out** to sign out or to switch to a different account
- **Close account** can be used to delete your account within the <MobileAppNameShort />

:::danger WARNING
:::danger Closing account
Be careful! If you delete your account, you will lose access to your <MainPlatformName /> projects both on the mobile device and on the <DashboardShortLink />.
:::

Expand Down Expand Up @@ -133,7 +133,7 @@ Tap the **Add** button to enter the *recording mode* so you are able to [survey
The **active layer** currently used for the survey is displayed on the top of the screen. Tap on it to choose another active layer from editable layers in the project.
![Active survey layer](./mobile-app-active-layer.jpg "Active survey layer")

:::tip
:::tip Surveying features
[How to Add, Edit, Delete Features](../mobile-features) will show you how to capture points, lines and polygons in <MobileAppName /> as well as how to edit their geometry and attributes.
:::

Expand All @@ -150,11 +150,12 @@ More details can be found in [Layers in Mergin Maps Mobile App](../layers/).
### More options: Zoom to project, Map themes, Position tracking, Measure, Local changes, Settings
The **More** button opens a list of additional options

![Mergin Maps mobile app More button](./mobile-app-more-options.jpg "Mergin Maps mobile app More button")
![Mergin Maps mobile app More options](./mobile-app-more-options.jpg "Mergin Maps mobile app More options")

- **Projects**: a shortcut to the main page of the <MobileAppNameShort />
- [**Zoom to project**](../../gis/features/#project-extent): zoom to the extent of all visible layers within the project. The project extent can be set in [QGIS in Project Properties](../../gis/features/#project-extent).
- [**Map themes**](../../gis/setup_themes/): a list of map themes set up in a <MainPlatformName /> project in QGIS
- [**Filters**](../filtering/): to filter features on the map
- [**Position tracking**](../tracking/): to start tracking of your tracks during the field survey
- [**Measure**](../measure/): measure length or area on the map
- **Local changes**: the overview of your local changes to be synchronised
Expand Down
Binary file modified src/field/mobile-app-ui/mobile-app-local-changes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/field/mobile-app-ui/mobile-app-local-changes.xcf
Binary file not shown.
Binary file modified src/field/mobile-app-ui/mobile-app-more-options.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/field/mobile-app-ui/mobile-app-more-options.xcf
Binary file not shown.
8 changes: 6 additions & 2 deletions src/gis/features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MobileAppName />.

## Project settings
- Ensure the paths are set to *Relative* in the **General** tab in Project Properties. All paths to the project data in <MobileAppName /> are relative to the project location.
Expand Down Expand Up @@ -179,7 +181,9 @@ There is an option to define the order in which layers are displayed in the <Mob

![Layer order in QGIS Mergin Maps project](./project-layer-order.jpg "Layer order in QGIS Mergin Maps project")

### Map themes
[Map Themes](../setup_themes/) make possible to switch between different background maps in <MobileAppName /> (e.g. cartography maps and aerial imagery)
### Filtering features
Filters for features in the <MobileAppNameShort /> can be enabled in the **<MainPlatformName />** 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/).
Binary file added src/gis/features/project-filtering.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/gis/features/project-filtering.xcf
Binary file not shown.
1 change: 1 addition & 0 deletions src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ The ecosystem consist of various components:
- [Synchronisation in <MobileAppName />](./field/autosync/)
- [Measurement Tools](./field/measure/)
- [Layers in <MobileAppName />](./field/layers/)
- [Feature Filtering in <MobileAppName />](./field/filtering/)
- [Map Sketching in <MobileAppName />](./field/map-sketching/)
- [Photo Sketching in <MobileAppName />](./field/photo-sketching/)
- [How to Add, Edit, Delete Features](./field/mobile-features/)
Expand Down
3 changes: 3 additions & 0 deletions src/manage/plugin/index.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -98,6 +100,7 @@ Some settings of your [<MainPlatformName /> project](../project/) can be done th
- Enable [**Map sketching**](../../field/map-sketching/)
- Set [**Layer order**](../../field/layers/#layer-order) for the <MobileAppNameShort />
- Enable [**Photo sketching**](../../field/photo-sketching/) to annotate pictures in the <MobileAppNameShort />
- Enable [**Filtering**](../../field/filtering) features in the <MobileAppNameShort />

![Mergin Maps Project Properties in QGIS](./qgis-mergin-maps-project-properties.jpg "Mergin Maps Project Properties in QGIS")

Expand Down
Binary file modified src/manage/plugin/qgis-mergin-maps-project-properties-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading