Skip to content
getgeolens.com

Use GeoLens from QGIS

QGIS talks to GeoLens with nothing installed: the built-in OGC API - Features provider is enough to add a dataset as a layer, browse its attributes, and push filter expressions down to the server instead of downloading the whole layer to filter client-side (explicit spatial predicates need QGIS 3.44 or later; attribute filters work on any current QGIS).

Replace https://geolens.example.com with your GeoLens instance’s URL in every example below.

  1. In QGIS, open Data Source Manager (Ctrl+L) and pick the WFS / OGC API - Features panel.

  2. Click New, give the connection a name, and set the URL to your instance’s API root:

    https://geolens.example.com/api/

    The connection URL must be this landing page — QGIS discovers the service’s collections, conformance, and API description from it, so a collection or /items URL does not work here. Keep the trailing slash: a bare /api answers with a redirect instead of the landing document.

  3. Click Connect. Every dataset your credential can see appears as a collection; select a vector one and Add Layer. Raster datasets (imagery, DEMs) are listed too — they answer as coverages, not feature collections, so QGIS’s OGC API Features provider cannot add them; view raster layers through the map builder or their COG download instead. Collections are listed by dataset title, and each collection’s id is the GeoLens dataset id — when titles are ambiguous, the Connect menu on the dataset page copies the dataset’s OGC Features URL (.../api/collections/<dataset-id>/items), whose <dataset-id> path segment names the collection to pick.

Public datasets need nothing else. A private dataset needs an API key: under Authentication > Configurations, click +, choose method API Header, add a header X-Api-Key with your key as the value, save, and select that configuration on the connection. The key lives in QGIS’s encrypted auth database rather than the project file. See API Authentication for how to generate a key.

GeoLens implements OGC API Features Part 3 (Filtering) with CQL2, so QGIS can hand off filter expressions — attribute filters (name = 'Alpha', height BETWEEN 10 AND 20, LIKE, IN) and explicit spatial predicates (S_INTERSECTS and friends) — to the server instead of pulling every feature over the wire first. Ordinary map panning is a separate mechanism: QGIS requests the visible rectangle through the OGC API Features Core bbox parameter, which works on any QGIS version and needs no CQL2 at all.

Two things need to line up for filter push-down:

  • Attribute filter expressions push down on any reasonably current QGIS version. GeoLens has advertised the required conformance classes since server-side filtering shipped in 1.16.
  • Spatial filter expressions (S_INTERSECTS and the other CQL2 spatial predicates in a provider filter) need QGIS 3.44 or later. Earlier QGIS releases had a bug (qgis/QGIS#62156) where the OGC API Features provider only recognized an old, deprecated conformance class name for this capability. GeoLens advertises the final, standardized name, so QGIS versions before the fix silently fall back to client-side spatial filtering — the layer still works, just slower on large extents. There is nothing to configure on the GeoLens side; use a current QGIS.

To confirm push-down is active, check the layer’s Layer Properties > Information panel, or watch GeoLens’s request logs: /items requests carry a filter= query parameter when a filter expression is set on the layer (panning shows a bbox= parameter instead — that is Core behavior, not CQL2). The filter grammar, the per-collection /queryables document, and curl examples are covered in OGC API & Standards Endpoints.

QGIS does not yet ship a client for OGC API - Tiles, so for large layers where you want cached, pre-tiled rendering rather than live OGC API Features requests, add GeoLens’s vector tiles as a generic XYZ vector tile connection instead:

  1. From the dataset’s Connect menu, copy the Vector Tiles URL:

    https://geolens.example.com/api/tiles/data.<table_name>/{z}/{x}/{y}.pbf
  2. In QGIS: Layer > Add Layer > Add Vector Tile Layer, then New Generic Connection.

  3. Paste the URL as-is (QGIS understands the {z}/{x}/{y} template) and set a reasonable min/max zoom for the layer. For a private dataset, append the ?sig=<sig>&exp=<exp>&scope=<scope> parameters from GET /api/tiles/token/{dataset_id}/ — a header-based configuration does not work on vector tiles. The signed parameters are a session credential: they expire within 16 minutes, after which the layer stops loading until you mint a fresh token and paste the new parameters. From 1.19.0 they also stop working early if the dataset is unpublished or made private, which takes effect within a minute of the change. That suits a quick look at private data, not a saved project; see Tile endpoints.

  4. Add — QGIS renders the tiles and lets you style them like any other vector tile layer.

This path is read-only and has no attribute filtering (a limitation of tiled vector data in general, not of GeoLens). Use OGC API Features above when you need live, filterable data, and vector tiles when you need a large layer to pan and zoom smoothly.