Explore, filter and export without writing SQL

BD TOPO® 3.5 © IGN, Haute-Garonne.

This guide walks through every part of the FilterMate panel with screenshots taken in QGIS 4.2. Read it top to bottom the first time, then use the table of contents as a reference. Everything shown here works the same on QGIS 3.x (Qt5) and QGIS 4.x (Qt6).

1How FilterMate works

FilterMate applies a subset filter to your vector layers. Nothing is deleted or copied: the filtered layer simply shows only the features that match, exactly as if you had typed a provider filter in the layer properties. FilterMate builds that filter for you, in the native language of the data source (PostGIS SQL, SpatiaLite SQL or a QGIS expression for files). Raster and point cloud layers are filtered too: they are clipped to a temporary file that replaces their source while the filter is on (see Rasters and LiDAR point clouds).

Every spatial filter follows the same three-part pattern:

1. Source layer

The layer you pick a reference geometry from, using the Exploring zone: one feature, several features or an expression.

2. Spatial predicate

The relation to test: Intersect, Contain, Are within, Touch, and so on, optionally with a buffer distance.

3. Target layers

The layers that get filtered. Only their features that satisfy the predicate against the source geometry remain visible.

Attribute-only filters also work: with no target layers and no predicate, FilterMate filters the source layer itself on the features you selected in the Exploring zone. Filters can be chained with AND, OR and AND NOT, undone, redone, saved as favorites, and exported to a new file or GeoPackage project.

2Installation

From the QGIS plugin repository (recommended)

  1. In QGIS, open Plugins → Manage and Install Plugins…
  2. Search for FilterMate in the All tab and click Install Plugin.
  3. A FilterMate button appears in the plugin toolbar. Click it to open the panel.
The FilterMate button in the QGIS plugin toolbar
The FilterMate toolbar button. It is also listed under Plugins → FilterMate.

Manual installation

Download the ZIP from GitHub Releases, then either use Install from ZIP in the plugin manager or unzip it into your profile's plugin folder:

OSPlugin folder
Windows%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\
Linux~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/
macOS~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/
QGIS 4 keeps the same layout under a QGIS4 profile directory on some platforms. Settings → User Profiles → Open Active Profile Folder always opens the right place.

Optional: PostgreSQL / PostGIS

FilterMate filters PostGIS layers server-side. This needs the psycopg2 Python package inside the QGIS Python environment:

pip install psycopg2-binary

On Windows, run it from the OSGeo4W Shell that ships with QGIS. Without it, PostgreSQL layers still work through the generic OGR backend, only slower.

3The panel at a glance

FilterMate is a dock panel. By default it opens on the right side of the QGIS window and can be moved, floated or resized like any other QGIS panel.

QGIS 4.2 with a small BD TOPO project and the FilterMate panel docked on the right
QGIS 4.2 with the FilterMate panel docked on the right. The project holds five GeoPackage layers.

The panel is made of five areas, from top to bottom:

AreaWhat it does
Title bar badgesFavorites, detach and close are badges of the panel's title bar. The ★ button opens the favorites menu; it turns amber once favorites are saved. A button next to it folds EXPLORING. The colored source tag of the layer card shows the kind of the current layer and what reads it: the backend for a vector layer (PostgreSQL, Spatialite, OGR, Memory), the provider for a raster or a point cloud. For example Vector · Spatialite Raster · GDAL Point cloud · COPC.
Upper stackAgent, then the Exploring zone. AGENT is a chat that filters from a sentence (section 14). Exploring selects on the current layer, described by the card at the top. For a vector layer: single, multiple or expression-based selection, plus a vertical rail of navigation buttons. Rasters and point clouds get their own tools (section 13).
Lower stackThree collapsible sections: Filtering, Exporting and Configuration.
Action barThe six buttons that actually do something: Filter, Undo, Redo, Unfilter, Export, About.

The two stacks are separated by a handle that you can drag; the panel remembers where you left it. At most one section is open in each stack. Opening AGENT folds EXPLORING and FILTERING; opening FILTERING brings EXPLORING back. AGENT is shown by default and can be hidden in the Configuration tab.

The screenshots of this section were taken before the AGENT section and the title bar badges: they show the favorites button beside the layer badge and no AGENT section.

The whole FilterMate panel with the Filtering tab open
The whole panel with the Filtering tab open.
Favorites and backend badges in the panel header
Header: the favorites button and the current layer, a vector layer read by the Spatialite backend.
The action bar with Filter, Undo, Redo, Unfilter, Export and About
Action bar after a filter: Undo is enabled, Redo is not yet.
Tip The panel follows the QGIS theme (Default, Night Mapping, Blend of Gray). You can force a light or dark look in the Configuration tab, and move the action bar to the top, left or right of the panel.

4Exploring a layer

BD TOPO® 3.5 © IGN, communes of Haute-Garonne.

The Exploring zone works on the current layer, shown in the first row of the Filtering tab. By default it follows the layer selected in the QGIS Layers panel (the auto current layer button, first in the Filtering rail). Turn that button off to pick the layer manually from the drop-down.

Three selection modes are available. Ticking one un-ticks the others, and the header of each box expands or collapses it.

Single selection

Single selection mode with a road picked by name
Single selection on a road layer: the feature is picked by name, the field below sets which attribute is displayed.

Pick one feature from a searchable drop-down. The second row is the display expression: FilterMate detects a sensible name field automatically (name, label, id…) but you can type any QGIS expression, for instance "code" || ' - ' || "name". The blue arrows step to the previous or next feature.

Multiple selection

Multiple selection with four roads checked
Multiple selection: four roads are checked. The line above the list summarises the selection; the text box filters the list as you type.

Tick as many features as you need. The list loads at most 1000 rows (configurable) so that huge layers never freeze QGIS. When the list is truncated, typing in the filter box searches the whole layer, and Select All in the right-click menu loads everything.

Custom selection (expression)

Custom selection with a QGIS expression
Custom selection: any QGIS expression, here roads whose importance is 3 or 4.

Write a QGIS expression; every feature it matches becomes part of the reference geometry. This is the mode to use for "all features": an always-true expression such as 1 or TRUE takes the whole source layer.

The exploring rail

The vertical buttons to the left of the selection boxes, from top to bottom. Rasters and point clouds keep the same frame: Zoom and the preview first, their own map tools next, then the link, More and Reset.

ButtonEffect
ZoomZooms the map canvas to the selected feature(s).
Selecting (toggle)Mirrors your FilterMate selection as a QGIS selection on the map, and the other way round: selecting on the canvas updates the Exploring boxes.
IdentifyIdentifies the selected feature on the map (same as the QGIS identify tool).
Tracking (toggle)Auto-zooms every time the selected feature changes.
Zone (toggle)Draw a rectangle, polygon, freehand shape or circle on the map (right-click the button for the shape): the features it touches are selected.
Linking (toggle)Keeps the three selection boxes in sync: switching mode carries the current features over.
More (⋯)The QGIS selection tools, select by expression, invert or clear the selection, the attribute table of the selection.
ResetClears every exploring property stored for the layer (display expression, selection, mode).

Each layer remembers its own exploring settings in the project, so switching layers and coming back restores your selection.

5The Filtering tab

BD TOPO® 3.5 © IGN, Grenade.

The Filtering tab with target layers, predicate and buffer set
Filtering tab: source layer, two target layers, combine operators, Intersect predicate, 50 m round buffer.

Each row of the Filtering tab is switched on and off by the button in the rail on its left. A row that is switched off is ignored when you press Filter, which lets you keep a buffer or a predicate configured without using it.

Row by row

Rail buttonRowMeaning
Auto current layerSource layerWhen on, the source layer follows the QGIS Layers panel. When off, choose it in the drop-down. The small icon and checkbox to the right enable the centroid option for the source geometry.
Layers to filterTarget layersA checkable list of the other layers of the project: vector, and since 5.0 raster and point cloud layers. Right-click for Select All, Deselect All or by geometry type. The checkbox on the right uses centroids for distant (target) layers.
Combine operatorTwo drop-downsHow a new filter combines with the one already applied. Left: for the source layer. Right: for the target layers. Values are AND, OR and AND NOT.
Geometric predicatesPredicate listCheckable list of spatial relations. Several can be ticked; they are combined with OR.
Buffer valueDistance in metresExpands (positive) or shrinks (negative) the source geometry before the predicate is tested. Click the small arrow to switch to a QGIS expression, e.g. "width" * 2.
Buffer typeStyle and segmentsEnd-cap style (Round, Flat, Square) and the number of segments per quarter circle (default 5). Fewer segments are faster on very complex geometries.

The eight predicates

PredicateKeeps a target feature when…Typical use
Intersectit shares at least one point with the source geometry.Everything touching a zone. The default and by far the most common.
Containit completely contains the source geometry.Which parcel contains this point?
Are withinit lies entirely inside the source geometry.Buildings fully inside a commune.
Touchit touches the boundary without overlapping the interior.Neighbouring parcels.
Overlapit partly overlaps the source (same dimension, neither contains the other).Zones straddling a boundary.
Crossit crosses the source (a line through a polygon, two crossing lines).Roads crossing a river.
Equalits geometry is identical to the source.Finding duplicates between layers.
Disjointit has no point in common with the source.Everything outside a zone. Combine with a buffer for exclusion rings.

Buffers

  • Positive buffer, e.g. 50 m: "everything within 50 m of the selected road". Use Intersect as the predicate.
  • Negative buffer, e.g. -20 m on a polygon: keeps only the features well inside it, away from the edges.
  • Expression buffer: the distance is evaluated per source feature, so a regulatory distance can come from an attribute.
  • Distances are always in metres. Layers in a geographic CRS (degrees) are reprojected on the fly.

Centroids

The two centroid checkboxes replace polygons by a representative point (a point guaranteed to be on the surface) during the test. With very detailed polygons this can make a cascade several times faster, at the cost of exactness on the borders. FilterMate keeps the spatial index usable in both cases.

6Tutorial: your first spatial filter

Goal: show only the buildings and hedges within 50 m of one road. The screenshots use a small BD TOPO extract (one commune, 373 buildings, 130 road sections) stored in a GeoPackage, but any project with a line layer and a polygon layer will do.

Each step below shows the whole QGIS window, so you can check the map canvas and the panel against your own screen. The map extent is the same from step 2 to step 6.

  1. Choose the source layer. Load your layers and open FilterMate. In the Layers panel, click the road layer: it becomes the source layer (the auto current layer button is on by default) and the Exploring zone switches to it.
    Step 1: the road layer is active in the Layers panel and shown as source layer in FilterMate
    Step 1. The road layer is the current layer: its name appears in the first row of the Filtering tab. No feature is picked yet.
  2. Pick the reference road. In the Exploring zone, tick Single selection and choose a road in the drop-down. The canvas selects it (yellow). If the drop-down shows identifiers rather than names, change the display field in the row below.
    Step 2: the road is picked in the single-selection drop-down and highlighted in yellow on the map
    Step 2. The selected road is highlighted on the canvas; all buildings and hedges are still visible.
  3. Choose the target layers. Open the Filtering tab. Switch on Layers to filter (second rail button) and tick batiment and haie in the list.
    Step 3: the Layers to filter row is on and lists batiment and haie
    Step 3. The second row of the Filtering tab now reads the two target layers.
  4. Choose the predicate. Switch on Geometric predicates and make sure Intersect is ticked.
    Step 4: the geometric predicates row is on with Intersect selected
    Step 4. Intersect is the predicate: a building is kept when it touches the (buffered) road.
  5. Add a buffer. Switch on Buffer value and type 50. The buffer type row (Round, 5 segments) can stay as it is.
    Step 5: the buffer value row is on with 50 m
    Step 5. Everything is configured: source road, two targets, Intersect, 50 m buffer. Nothing has changed on the map yet.
  6. Run the filter. Press the Filter button (first button of the action bar). The map canvas is frozen for the duration of the task and redrawn once at the end.
    Step 6: only the buildings and hedges within 50 m of the road remain on the map
    Step 6. Same extent as step 5: only the buildings (pink) and hedges (green) within 50 m of the road remain. Undo is now enabled in the action bar.

What FilterMate generated for the GeoPackage buildings layer, as you can read it in Layer Properties → Source → Provider Feature Filter:

ROWID IN (SELECT id FROM "rtree_batiment_geom"
          WHERE minx <= 598540.4 AND maxx >= 598349.4
            AND miny <= 6265342.3 AND maxy >= 6265157.7)
AND ST_Intersects("geom",
      ST_Buffer(ST_MakeValid(ST_GeomFromText('LineString (…)', 2154)), 50.0))

The first clause queries the GeoPackage R-tree so that SQLite only evaluates the expensive predicate on candidate rows. That is what turns a 6-minute cascade on a 37-layer project into a 3-second one.

Chaining filters Change the selection or the predicate and press Filter again. With the combine operators on AND the new condition narrows the previous result; with OR it widens it; AND NOT removes features. The layer properties show the full combined expression.

7Action bar, undo and history

The six action buttons
From left to right: Filter, Undo, Redo, Unfilter, Export, About.
ButtonAction
FilterBuilds and applies the filter described by the Exploring zone and the Filtering tab.
UndoRestores the previous filter state of the affected layers. The history is per project and survives a restart of QGIS. While AGENT is open, Undo and Redo walk the turns of the agent instead (section 14).
RedoRe-applies a filter you just undid.
UnfilterRemoves FilterMate's filter from the source layer and its targets, leaving other layers alone. Unlike Undo, it does not step back through history.
ExportRuns the export configured in the Exporting tab.
AboutOpens the FilterMate website in your browser.
Layers in edit mode A layer being edited cannot receive a new subset filter. FilterMate detects this and asks whether to save, discard or cancel before filtering or unfiltering. Nothing is changed until you answer.

Buttons are greyed out when they cannot apply: Undo before any filter, Redo when nothing was undone, Export while the Exporting tab is not configured.

8Favorites

BD TOPO® 3.5 © IGN, Grenade.

A favorite stores a complete filter: source layer, selection, predicates, buffer and target layers. Re-applying it takes one click, which makes favorites the natural way to keep regulatory or recurring queries.

The favorites menu opened from the star badge
Click the ★ badge to open the favorites menu.

The favorites menu

  • Add filter saves the filter currently applied. It is disabled when no filter is active.
  • Saved favorites are listed in the Quick filtering section at the top: one click applies them.
  • Manage favorites… opens the manager described below.
  • Export… / Import… exchange favorites as JSON files between projects or colleagues.
  • Global favorites lists the favorites shared across all your projects.
  • Maintenance holds database statistics and cleanup tools.

The favorites manager

The favorites manager dialog with the General tab
The manager: search and scope filter at the top, favorites on the left, details on the right.
  • General: rename the favorite, add a description and tags, see its source layer, provider and usage count. Visibility switches between This project and All projects (global).
  • Expression: the exact filter expression, editable for advanced users.
  • Remote: publishing to a shared git repository. FilterMate uses the QGIS authentication manager for credentials, so a team can maintain a common library of filters. This requires the optional QGIS Resource Sharing plugin.

Apply runs the favorite on the current project, Save Changes stores your edits, Delete removes it. Favorites are stored in FilterMate's own SQLite database in your QGIS profile and, for project-scoped ones, in the project file too.

9Exporting

BD TOPO® 3.5 © IGN, Saint-Gaudens.

The Exporting tab
Exporting tab: layers, CRS, style format, output format, output folder with batch mode, ZIP.

The Exporting tab writes the currently visible features of the chosen layers to disk, filters included. As in the Filtering tab, each row is enabled by its rail button.

RowMeaning
LayersCheckable list of the layers to export.
ProjectionOutput CRS. Layers in another CRS are reprojected during the export.
StylesSave the layer styles alongside the data as QML (QGIS native) or SLD (interoperable). With GeoPackage output the style is embedded in the file.
Output formatAny vector format QGIS can write: GeoPackage (default), Shapefile, GeoJSON, KML, CSV, FlatGeobuf… Rasters and point clouds have their own formats (section 13).
Output folderWhere files are written. Batch mode writes one file per layer instead of one multi-layer file.
ZIPPacks the result in a single archive, optionally in batch mode as well.

GeoPackage projects

When the output format is GeoPackage and several layers are exported together, FilterMate embeds a QGIS project in the file with the layer group hierarchy, styles and CRS preserved. Before writing, a recap dialog lists what will be exported and lets you keep or flatten the group structure. Opening the resulting .gpkg in QGIS restores the whole map.

Large exports Layers above a few thousand features are streamed in chunks, so memory stays flat and the progress bar is accurate. Cancelling cleans up partial files.

10Configuration

The Configuration tab showing the settings tree
Configuration tab: a tree of settings, edited in place. Changes are saved immediately. This capture predates the search bar.

The Configuration tab exposes FilterMate's settings as a tree. Double-click a value to edit it; drop-down values offer their allowed choices. Most changes apply live; the dock position needs the panel to be closed and reopened.

Search bar. The tab has a search bar. Type part of a setting's name and FilterMate opens its branch and selects it. Press Ctrl+F while the tab is open to reach the bar, and Escape to clear it.

SettingValuesNotes
AUTO_ACTIVATEtrue / falseOpen the panel automatically when a project with vector layers loads.
FEEDBACK_LEVELminimal / normal / verboseHow many messages appear in the QGIS message bar. verbose is useful when reporting a problem.
LANGUAGEauto or one of 34 localesauto follows the QGIS locale. The interface retranslates without restart.
UI_PROFILEauto / compact / normal / hidpiWidget sizes, applied at once and at startup. auto picks from the screen of the QGIS window and its scaling: a usable height under 800 logical pixels selects compact whatever the scaling. Force hidpi on 4K displays if controls look small.
DOCK_POSITIONleft / right / top / bottomWhere the panel docks when opened.
ACTION_BAR_POSITIONtop / bottom / left / rightPosition of the six action buttons.
ACTIVE_THEMEauto / default / dark / lightauto follows the QGIS theme.
feature_picker_limitnumber, default 1000Maximum rows loaded in the multiple-selection list.
AGENTtrue / falseShows the AGENT section (enabled under APP.OPTIONS.AGENT). On by default. Turning it on shows the section the next time the panel opens; turning it off hides it after QGIS restarts.

The mouse wheel. A list or a number box answers the wheel only after you click it. Until then the wheel scrolls the panel, so a value, such as the feature used as the source of the next filter, never changes by accident.

The tree also holds performance thresholds (when to switch optimisations on), the expression cache size, export defaults and the Extensions section (favorites sharing, QFieldCloud). The complete file lives at config/config.json in the plugin folder; config/config.default.json next to it documents every key and can be copied back to reset everything.

11Backends and performance

BD TOPO® 3.5 © IGN, Toulouse Métropole.

FilterMate picks a backend per layer, based on its data provider, and shows it in the header badge. The backend decides where the spatial test runs: in the database whenever possible, in QGIS otherwise.

BadgeUsed forHow it filters
PostgreSQLPostGIS layers, with psycopg2 installedNative SQL with ST_* functions, an index-friendly && bounding-box test, primary-key detection, and temporary materialized views (fm_temp_mv_*) for very large cascades.
SpatialiteGeoPackage and SpatiaLite filesSpatiaLite SQL. On GeoPackage the R-tree candidate clause is added first so the predicate only runs on candidates.
OGRShapefile, GeoJSON, KML and every other file formatQGIS expressions evaluated with the GEOS engine, with geometry simplification and a cascaded union of the source features.
MemoryScratch and temporary layersIn-memory evaluation.

Measured on real projects with version 4.8.9 (timings from filtermate.log):

ScenarioBeforeNow
37 GeoPackage layers filtered by one commune (Toulouse)371 s1.6 to 3 s
17 PostGIS layers, five communes, centroid option49.6 sunder 4 s
First connection to a local PostgreSQL server21 s stallimmediate
  • The map canvas is frozen during a filter task and redrawn once, so the interface stays responsive.
  • Click the backend badge to see the backends available for the current layer and force one when the automatic choice is not what you want.
  • Every step above a few milliseconds is logged with a ⏱ prefix; compare two runs by grepping the log.

Remote sources

A layer whose data is read over the network follows the same paths as a local one: WFS, OGC API Features, ArcGIS Feature and Map Server, WMS / WMTS / XYZ, WCS, vector tiles, remote EPT and COPC point clouds, files read through /vsicurl/, and MSSQL, Oracle and HANA databases. Three rules hold: no network read on the main thread, every read is bounded, and no result is wrong or partial without saying so.

  • Attribute filters. An expression is sent to the server in its own language (OGC Filter, CQL2 or SQL) only when it translates completely. Unsupported functions and unknown fields are refused without changing the layer. The server filter is prepared in the background and installed on the layer with its identity and style kept.
  • Spatial filters. For a web service target, FilterMate reads only the features inside the extent of the source (a server bounding-box request), tests the exact predicate on the copy, and keeps the keys. The copy is capped at 20,000 features and 90 seconds by default (APP.OPTIONS.REMOTE_MATERIALIZATION). A result cut by the limit is reported as partial, never as complete. A key list sent to a service holds 500 keys at most, and a service with no stable key refuses it.
  • Exploration. Value lists, feature lists, zooms and filtered extents of a layer that is slow to count run in cancellable background tasks.
  • Rasters. A remote COG, WCS or PostgreSQL raster holds values: statistics and previews run in the background on a bounded capture, and a WCS used as a source or a target is copied to a GeoTIFF of the session cache, limited to the kept zone. WMS, WMTS, XYZ and ArcGIS MapServer layers are rendered images: you can select a colour on a bounded render, and they are never a filter target.
  • Vector tiles are targets only. The filter is written into the filter expression of the renderer and of the labeling rules, and Undo restores them.
  • Remote point clouds (EPT, COPC over http) are read through PDAL 2.4 or later with the useful extent only, never as a whole, so they need an explicit zone.

Where QGIS cannot report a protocol error safely (before 3.26, or before 3.36 under Python 3.12), a service read is refused with a message. The dock, Processing, the Python API, REST and MCP share these paths.

12Processing Toolbox

BD TOPO® 3.5 © IGN, Haute-Garonne.

The batch filter algorithm dialog in the Processing Toolbox
The Filter several layers (batch) algorithm: pick layers, type an expression, run.

FilterMate registers a Processing provider with ten algorithms and four models. The simplest algorithm, filtermate:batch_filter, applies one filter expression to several vector layers in a single run; the cross filters of FilterMate 5 are described in section 13. Because it is a regular Processing algorithm it can be used in the graphical modeler, in batch mode, or from Python:

import processing
processing.run("filtermate:batch_filter", {
    "INPUT_LAYERS": ["batiment", "haie"],
    "EXPRESSION": "\"etat_de_l_objet\" = 'En service'",
})

Objects drawn from a vector layer

Draw objects on a raster with SAM from points or polygons (filtermate:segment_from_features, experimental) draws one object per feature of a guide layer, with no click: a point is a click on the object, a polygon gives its bounding box and a point inside it. The output is a polygon layer in the CRS of the raster, with the attributes of the feature, sam_score (the score SAM gives its mask) and, for a polygon, sam_iou (overlap of the footprint with the drawn object, from 0 to 1). It runs in the background, changes no layer of the project and can be a step of a model. It uses the SAM model that the raster pipette installs (section 13).

processing.run("filtermate:segment_from_features", {
    "RASTER": ortho, "FEATURES": footprints, "OUTPUT": "memory:"})

Measured on 40 BD TOPO buildings (50 to 2000 m²) on a 25 cm orthophoto, the median overlap with the footprint is 0.81 with the box and a point inside it, and 0.73 from points alone. The BD TOPO footprint is not the roof seen from above: a low sam_iou points at a building to look at, it does not prove a change. The polygons can then be the SEGMENTS parameter of Filter layers of any type by the pixels of a raster (filtermate:cross_filter_from_raster), which accepts a polygon layer in any CRS in place of the pixel values.

13Rasters and point clouds (5.0)

LiDAR HD, BD TOPO® © IGN, Estavar (Pyrénées-Orientales).

New in 5.0. Raster and LiDAR point cloud layers are first-class sources and targets. Requirements are unchanged: QGIS 3.22 or later (point clouds from 3.26), Qt5 or Qt6. PDAL 2.4 or later is optional (height above a DTM, direct COPC writing).

The principle stays the same: EXPLORING selects on the current layer, FILTERING relates that selection to the layers to filter with its geometric predicates and buffer. When the current layer is a raster or a point cloud, the vector groups of EXPLORING make room for the panel of that kind; the selection becomes a source geometry (selected pixels vectorized, or footprint of the kept points).

The EXPLORING panel of a raster: band, pixel value, value range with histogram; FILTERING unchanged with a minimum coverage
Raster: value range on the histogram, vector targets with a 50 % minimum coverage.
The EXPLORING panel of a point cloud: ASPRS / LiDAR HD classes, attribute ranges
Point cloud: classes (here class 6, building) and attribute ranges.

Raster

  • Bands: one row per band with its colour role (R, G, B, NIR, read from the renderer or guessed), the active band and the bands the pipette compares; RGB, IRC and RGB + NIR shortcuts.
  • Pipette on the map, with a tolerance: similar pixels of the whole raster (a colour on an orthophoto, a value, a class of a paletted raster), the clicked object only (a pool, a roof, a field) or similar objects (the objects like the clicked one, within chosen ratios of its area). The two object targets draw with SAM when it is installed, and by colour otherwise (below). Ctrl+click adds a pick; the map outlines the objects and the selection strip gives the kept share.
  • Value range: drag the handles of the histogram, on one band or on every colour band at once; the quantity can be the value itself or, from a DTM, the slope (degrees or %), aspect, hillshade or roughness. The Select button (or the preview box) hides the other pixels on the map.
  • A raster calculator expression, with an Insert menu for the band references and the spectral presets allowed by the roles: NDVI vegetation, NDVI bare soil, NDWI water, ExG vegetation.

Point cloud

  • ASPRS and LiDAR HD classes with presets (ground, vegetation, buildings, above ground, water, without noise).
  • Z (to the millimetre), intensity and return ranges; height above a DTM computed with PDAL.
  • Conditions chained with AND / OR on any attribute, the classification included: Classification = 6 with a height above the DTM of at least 9 m keeps the tall roofs (story 10).
  • "Apply to the other tiles of the dataset" for data delivered in tiles (LiDAR HD).
  • On the rail: the Identify button picks a class, the value pipette writes a condition around the picked value of the chosen attribute (Ctrl+click adds an OR), and the zone tool draws a rectangle, polygon, freehand shape or circle that cuts the footprint of the source.
  • The object detector of the rail selects the object under the click (the cluster of points of its class: a building, a tree) or, with a right click on the button, every object of the cloud like it: area within chosen ratios of the clicked objects and, with same shape (on by default), compactness within the same ratios, so a hedge of the area of a tree is not taken for a tree.

Objects drawn by SAM (5.1, experimental)

The two object targets of the pipette can use SAM 2.1 tiny, a segmentation model that runs on your computer, on the CPU. Clicked object draws the object under the click. Similar objects draws it, then every object like it in the visible map. The objects are plain polygons: the filter applied to the other layers needs no model, and a saved filter replays without one. Without SAM, both targets find objects by their colour, and the Engine list of the PIPETTE group switches between the two.

Installation, at the first use

FilterMate ships neither the model nor its runtime. Choose Clicked object or Similar objects on a raster: a message offers to install SAM, onnxruntime (about 100 MB) and the model (62 MB). Nothing is installed before you agree, and nothing at the start of QGIS. Once you confirm, pip installs onnxruntime in the background, as a QGIS task, into your QGIS profile; the Python of QGIS is not modified. The model then downloads from a pinned revision, and each file is checked against its SHA-256 before it replaces anything. The download can be canceled and uses the HTTP proxy of the QGIS options. Apart from these two downloads, nothing leaves your computer.

An Install SAM… button stays in the group. If pip fails, the reason is in the FilterMate log and the group shows the command to run by hand in a terminal (the OSGeo4W Shell on Windows). If the model files are damaged, Repair the model… replaces the bad ones.

Gestures

GestureEffect
Move the mouseOutline of the object under it, once the area is prepared.
ClickA new object, added at once.
Shift+clickThe last object, extended.
Right clickThe last object, trimmed.
Drag a boxA new object inside the box.
G (or Tab when QGIS lets it through)The last object at the next outline SAM proposed: a part, the object, a group.
EscapeRejects the proposals; otherwise removes the last object, or the last search with its clicked object.
ClearForgets every object drawn by SAM.
To layerAdds the objects to the project as a polygon layer, in the CRS of the raster, numbered, with their area in m². It is a memory layer: Make Permanent in QGIS keeps it. It is the layer to give to Processing, to export or to edit.

The first click of an area prepares it: about 3 s under QGIS for Windows, then about 0.1 s per gesture.

Similar objects: proposals to keep or reject

Similar objects first draws the clicked object. The patches of a similar colour in the visible map, 120 at most, are then proposed to SAM, which redraws each one in the background. An object is kept when its area, and its shape with same shape, are within the ratios of the group compared with the clicked one, and when it looks like it. The objects found are proposals, outlined in dashes and outside the selection: click one to keep it, right click to reject it, Enter (or Keep) keeps them all, Escape (or Reject) rejects them all. About half of the objects proposed are buildings: keep or reject them before filtering with them.

The objects are polygons in the CRS of the raster, stored with the filter like any other raster selection. Processing (the SEGMENTS parameter), the REST API and the MCP tools (segments in raster_selection) accept them too.

What it is good at, measured

Median overlap with reference outlines (IoU, 1 is a perfect match) on a 25 cm orthophoto, 2026-11-09:

Gesture100 buildings18 parcels
1 click0.650.21
3 corrective clicks0.760.27
Box0.820.44
Colour engine, 3 clicks0.520.26

SAM suits buildings and other well delimited objects. Parcels did not reach the improvement we required, since a cadastral limit is often invisible on the image, and trees were not validated: hedges tend to merge. Use the colour engine or a vector layer for them. Similar objects are a start, not a finished tool: on ten buildings never used to set them, the median precision (found objects that are buildings) is 0.36 and the recall 0.32. Keeping and rejecting proposals sorts the rest: from the third choice, the proposals that look like the rejected ones are taken away (median precision of those left 0.21 to 0.33, no building lost). Full figures and the method: docs/SEGMENTATION.md.

Point cloud source: building points more than 9 m above the DTM (computed with PDAL) keep the taller buildings.

What happens to the targets

TargetEffect of the predicate (Disjoint keeps the outside)
VectorSubset of the features that satisfy the predicate; optional minimum coverage for polygons.
RasterPixels outside the source geometry set to NoData (clipped VRT file); the layer keeps its style.
Point cloudPoints outside the source geometry removed (derived COPC file written by PDAL).
Vector source, raster and point cloud targets: the church and 50 m around it clip both, then EXPORTING writes them to a ZIP.

Nine combinations

The source (the current layer) and the targets can be of any kind. FILTERING keeps its form: layers to filter, combine operators (AND, OR, AND NOT, or a replacement when the combination is unchecked), geometric predicates, buffer and centroids. One setting is new: the minimum coverage (%) of polygons by the source geometry. Disjoint, already one of the eight predicates, keeps what lies outside the source geometry for every kind of target. Each cell links to a detailed use case with settings to reproduce.

Source ↓  ·  target →Vector targetRaster targetPoint cloud target
Vector
selected features or an expression; buffer and centroids apply
Features kept by the predicate. Use cases 1 to 8. Pixels inside the geometry, through a clipped VRT. Use case 12. Points inside the geometry, through a derived COPC. Use case 12.
Raster
the kept pixels vectorized: range, pipette, object, index, terrain derivative
Features kept, with a minimum coverage for polygons. Use case 9. Pixels of another raster under the kept pixels: an NDVI mask from a CIR orthophoto applied to the RGB one. Use case 13. Points under the kept pixels: the LiDAR points of the roofs picked on an orthophoto. Use case 14.
Point cloud
the footprint of the kept points: classes, Z, intensity, returns, height above a DTM, zone
Features kept, with a minimum coverage. Use cases 10 and 11. Pixels under the kept points: a DTM restricted to the ground points. Use case 15. Points of another cloud inside the footprint: high vegetation within 10 m of the power lines. Use case 16.

A tenth source needs no layer: a fixed geometry (WKT or extent) given to the Python or REST API, or to the cross_filter_from_geometry algorithm. A target identical to the source is refused, as are layers without geometry.

FILTERING with a vector source and a raster and a point cloud in the list of layers to filter
FILTERING from a vector layer: the raster and the point cloud are listed with the other targets.
EXPORTING with a raster, a point cloud and a vector layer checked
EXPORTING: a raster, a point cloud and a vector layer in the same export.

Results on the map

A raster clipped around a selected polygon on the QGIS map canvas
Vector → raster: the pixels around the selected polygon are kept (buffer 150 m).
Polygons kept by a raster value range, the other pixels hidden by the live preview
Raster → vector: polygons that satisfy the value range; the preview hides the other pixels.
Building points (class 6) inside the polygon kept by the point cloud filter
Point cloud → vector: the polygon that contains class 6 (building) points.

These screenshots were taken in QGIS 4.2 on a small synthetic data set.

Undo, project files, export

Clipped rasters (VRT) and point clouds (COPC) keep the layer id, style and position. Undo, Redo and Unfilter put the original sources back; the project is always saved with the original source and the clips are replayed when it is opened. Export writes rasters as GeoTIFF / COG and point clouds as LAZ / LAS / COPC / GPKG / CSV, alone or with vector layers.

Options

Raster and point cloud support are on by default. In the Configuration tab, APP.OPTIONS.RASTER.enabled and APP.OPTIONS.POINT_CLOUD.enabled switch each kind off or on; the layer lists follow at once. Turning a kind off does not unfilter its layers: a warning names those that stay filtered. The APP.OPTIONS.CROSS_FILTER.* options set the point cloud clip mode (exact or bounding box), the maximum raster pixels, the footprint resolution, the cache size and the path of pdal.

Configuration tab showing the RASTER and POINT_CLOUD enabled options
Configuration tab: the RASTER and POINT_CLOUD options.

PDAL. The height above a DTM and the direct writing of COPC files need PDAL 2.4 or later. With an older PDAL, point cloud targets are clipped by the QGIS exporter, a COPC export writes LAZ with a message, and the height above a DTM is disabled with a message naming the version.

Automation

Ten Processing algorithms (batch_filter and cross_filter from 4.x, cross_filter_from_raster, cross_filter_from_point_cloud, cross_filter_from_geometry, filter_point_cloud, clear_filters, apply_favorite, export_filtered_layers, segment_from_features) and four ready-made models (extraction by area, high vegetation near lines, parcels on gentle slopes, buildings missing from the LiDAR) run from the toolbox, qgis_process (the plugin starts without a QGIS window), Python and the REST API. See docs/AUTOMATION.md.

14Agent (5.1, experimental)

Experimental. A model can misread a request. Check the number of features each filter says it kept, and undo what is not what you asked for.

AGENT is a chat at the top of the panel. You write a sentence, for example buildings above 1200 m in the selected commune, and the agent filters, selects, zooms, shows or hides layers and exports. It uses the same filters as the rest of FilterMate. It is shown by default; the AGENT option of the Configuration tab hides it.

It can also find, describe and run Processing algorithms of QGIS (find_algorithms, describe_algorithm, run_algorithm, also through REST and both MCP servers), within limits: only the native and qgis providers, only an algorithm that makes a layer or only answers statistics, no SQL or Python executor, and inputs that are layers of the project, never a path or a URL. Each layer it makes is a temporary file added to the project, removed if you undo the turn, and Stop cancels the run.

Beyond filters, it can also:

  • style and label a layer: one symbol, categories of a field, graduated classes, a raster colour ramp, an opacity, labels from a field;
  • edit features: change values, add or delete features (you confirm a deletion). The layer is put in editing mode and nothing is written to its source until you save its edits, or discard them;
  • make a print layout with a map, a title, a legend, a scale bar and a north arrow, to finish in the layout designer, and export it as PDF or PNG after you confirm;
  • read and draw objects with SAM: use the objects drawn in the dock as a selection, draw objects from a layer of points or footprints, and look for objects like an example (about half of what it finds is right, and it finds about a fifth of what is there: the agent says so);
  • keep notes for the project when you ask it to (which layer holds what, what you call things): up to 20, saved in the project and sent with each request.

Each of these is undone with the turn. A long conversation is summed up rather than sent again in full: past a certain length, the oldest requests are replaced by a few lines that say what they did.

Choose a model

  • Free quota. The first time, the settings offer a few free requests a month, through a relay of FilterMate to Claude Haiku 5.5 (Anthropic), with no key to enter. The relay counts what is spent and keeps no conversation. Once the quota is used up, the panel asks for your own API key.
  • Your own provider. Claude, Mistral, OpenAI, any OpenAI-compatible server, or a local Ollama model.
  • The key is kept in the QGIS authentication database, which asks for its master password, never in a settings file. It is sent only to the server it was typed for, and you can remove it in the settings.
  • Consent. Nothing leaves your computer before you have chosen a model and agreed. Changing the provider or its address asks again.
AGENT settings, Provider tab: the free quota chosen, what leaves this machine, the box to agree
The settings of AGENT: the provider (here the free quota), what is sent to it, and the agreement asked before anything leaves the computer. Sources and Other applications are the next tabs.

What you see

Requests, steps and changes appear as cards in the conversation. Each filter says how many features it kept, and warns when it kept none, with what to check. The conversation is kept per project on this computer and shown again when the project opens; the model does not get it back, so a conversation starts afresh. New conversation forgets what was kept for the project.

AGENT open above the folded EXPLORING section: two requests, each with a filter card that gives the features kept
Two requests and their cards: each filter names its layers and gives the features it kept; Undo on the last card takes it back. AGENT shares the upper stack with EXPLORING, folded here.

Filters apply at once, and each step can be undone

  • While AGENT is open, Undo and Redo of the action bar (and Ctrl+Z, Ctrl+Y) walk the turns of the agent. Their tooltip names the request.
  • The History page lists the turns, applied or undone, and sends a request again. For the last request it lists the steps: Undo back to here puts the layers as they were before the chosen step, as a step of its own that Undo takes back.
  • Undo also reaches the layers a turn added or removed, the selections and the visibility. A removed layer comes back from its definition, with the same id and at its place in its group; a layer kept in memory cannot come back, and the panel says so. Zooms and exports are not undone.
  • You can ask the agent to undo its last request. Stopping a request keeps what was done, and it can still be undone.
The History page of AGENT: four requests, applied or not, the steps of one of them, and the Undo the last, Redo and Send again buttons
The History page: the requests of the project, applied or not, and the steps of the last one that changed something.

Confirmations and limits

  • Exports and added or removed layers ask you first.
  • A filter written by the model is one plain WHERE clause, read token by token against a list of what a filter needs: no subquery, no function outside the list. A selection by expression follows the same rule. A filter still reaches the database with your rights.
  • A layer is added only from a plain data file, a public https address or a service listed by a source you ticked. The agent cannot give QGIS a provider string of its own, a PG: or a /vsi path.
  • A bench of 39 requests in French and English, on a simulated project, scored 39/39 with Claude Haiku 5.5 on 2026-11-10.

Sources, ticked one by one

In the Sources tab of the settings, nothing is ticked at first. In the chat, only what is ticked can be used.

  • Open data portals: data.gouv.fr, Opendatasoft, and the CKAN portals of the United Kingdom, Canada, Australia, Germany, Italy, the Netherlands, Ireland and Japan.
  • WFS services: IGN, IBGE, PRG. A WFS layer must be listed by the service, and its address is built by the plugin.
  • Sentinel-2 scenes from Earth Search, opened without downloading them.
  • MCP connectors: remote servers such as the one of data.gouv.fr. Their tools join the conversation, and a tool that does not declare itself read-only asks you first. The plugin starts no process, so a server that only speaks stdio has to be run in HTTP mode.

Everything fetched from these servers is bounded: time and size are capped, and Stop works. A file on a server that gives parts of it (GeoPackage, GeoTIFF, zip) is read where it is. Any other file is copied to the filtermate/open_data folder of your QGIS profile first, within 512 MB and 3 minutes, without freezing the interface; an archive that would unpack to more than 2 GB is refused. Each failure says its cause: the status of the server, a web page, a file too large, too slow or cut, an archive with no layer.

What goes to the model

With each request, the provider you chose receives your sentence, the names of your layers and fields, the results of the tools it calls, and the state of the project:

  • always: the project CRS, the scale, the visible extent and the active layer; up to 30 layers in the order of the layer tree, each with its kind, feature count, CRS when it is not the project's, group, visibility and filter; the selections;
  • what changed since the last answer, when something did: layers added or removed, filters, visibility, selections, active layer, view, including what you changed outside the conversation;
  • on request of the model, for one layer: its place in the tree, extent, style (renderer, field, number of classes, labels, opacity, scale range), joins and relations. Class values and labels are not sent.

Attribute values go to the model only if you allow them in the settings: without that, the tools that read values (field_values, layer_statistics, sample_features, identify_at) are not offered. Values already written in filters and favorites are still sent, and the dialog says so. With the free quota, the request goes through the relay to Claude Haiku 5.5.

MCP server built into the plugin

Off by default. In the agent settings, the Other applications tab turns it on: FilterMate then listens on http://127.0.0.1:17823/mcp (the port can be changed) and asks for an access token. Claude Code or another MCP client on this computer can drive FilterMate under the rules of the chat: the same tools, the same ticked sources, the same confirmations. Each change is a step of the panel's history and appears in the conversation with the name of the application. A change is refused while the chat is working or a QGIS dialog is open; reads go on.

  • Buttons copy the configuration for MCP clients, the entry for Claude Desktop (which goes through mcp-remote, so it needs Node.js; it has not been tried with Claude Desktop itself) and the claude mcp add command. All three contain the token. New access token replaces it.
  • The server listens on 127.0.0.1 only. With QGIS on Windows and the client in WSL 2, that address is not the same machine unless WSL uses mirrored networking.
  • No Python package is needed. The stdio server described in docs/AUTOMATION.md stays available.

Developer notes: docs/AGENT_MODE.md.

15Troubleshooting

Where to look first

  • QGIS Log Messages panel, FilterMate tab: warnings and errors of the current session.
  • logs/filtermate.log in the plugin folder: the full log, including ⏱ timing lines. Set the environment variable FILTERMATE_LOG_LEVEL=DEBUG before starting QGIS for a verbose log.
  • Switch FEEDBACK_LEVEL to verbose in the Configuration tab to see every message in the message bar.

Common questions

SymptomCause and fix
The filter returns no featureCheck that the predicate matches the geometry types (a line never contains a polygon), that the buffer sign is what you meant, and that no stray QGIS selection is left on the source layer when using an all-features expression.
"No target layer" or nothing happensThe Layers to filter row is switched off or empty. Attribute-only filters need at least a selection in the Exploring zone.
A layer cannot be filteredIt is in edit mode: answer the dialog, or toggle editing off in QGIS.
The badge says OGR on a PostGIS layerpsycopg2 is missing from the QGIS Python. Install it and restart QGIS.
Controls look tiny on a 4K screenSet UI_PROFILE to hidpi.
The panel opens in the wrong languageSet LANGUAGE explicitly instead of auto.
A filter from an old session is still appliedFilters live in the project file. Use Unfilter, or clear the provider filter in the layer properties.
The AGENT section is missingThe AGENT option of the Configuration tab is off. Turn it on and reopen the panel.
AGENT asks for my own API keyThe free quota is used up, yours for the month or the relay's total. Enter a key in the AGENT settings, or choose another provider such as a local Ollama model.
A local model gives a timeoutThe network timeout of QGIS applies to the agent (60 s by default). A local model slow to start may need more, and the message says so.
SAM is not installed: onnxruntime was refused or the installation failedIf you decline the question, the object targets use the colour engine, and the Install SAM… button of the PIPETTE group offers it again. If pip fails (no network, no pip), the reason is in the FilterMate log and the group shows the command to run by hand in a terminal, the OSGeo4W Shell on Windows.
The SAM model does not download, or is reported damagedThe download uses the HTTP proxy set in the QGIS options and can be canceled. Each file is checked against its SHA-256 before it replaces anything. Click Repair the model… to replace the bad files.

Getting help