QGIS Integration Guide

Access Lynker Spatial tiles in QGIS 3.x

Overview

QGIS is a free, open-source Geographic Information System that supports vector tile layers. This guide covers multiple methods for accessing Lynker Spatial tiles in QGIS.

Method 1: Vector Tile Layer (Recommended)

This is the native QGIS approach for PMTiles data. Requires QGIS 3.14+.

Step-by-Step Instructions

  1. Open the Vector Tile Layer Dialog

    Go to Layer → Add Layer → Add Vector Tile Layer

    You should see the "Add Vector Tile Layer" dialog
  2. Create a New Connection (if needed)

    In the Vector Tile connection dropdown, click New

    Fill in the following details:

    • Name: Lynker Spatial Tiles
    • URL: https://tiles.lynker-spatial.com/api/tiles/lynker-spatial-modeling-fabric/{z}/{x}/{y}
    • Type: Z/X/Y
  3. Add Authentication Header

    In the same connection dialog, you'll need to add your Bearer token. Click on "HTTP Headers" or similar option:

    Header Name: Authorization Header Value: Bearer YOUR_ACCESS_TOKEN
    Important: Newer versions of QGIS may require you to use the Credentials system instead. Look for "Authentication" settings.
  4. Save Connection

    Click OK to save the connection

  5. Select Data Source

    Back in the main "Add Vector Tile Layer" dialog, select your new connection from the dropdown and click Add

Method 2: XYZ Tiles (Raster)

If vector tiles are not working, you can convert to raster tiles using a tile server.

Using a Tile Server Proxy

Set up a local or remote tile server that serves raster tiles from the PMTiles:

# Example with tileserver-gl docker run -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl # Configure with Lynker tiles: # In maptiles.json: { "services": { "data": { "tilejson": "https://tiles.lynker-spatial.com/catalog", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } } # Then in QGIS, use: http://localhost:8080/data/{z}/{x}/{y}.png

Method 3: Direct URL with GDAL Virtual File System

For expert users, you can use GDAL's virtual file system capabilities.

/vsicurl?access_token=YOUR_TOKEN&https://tiles.lynker-spatial.com/api/tiles/lynker-spatial-modeling-fabric/{z}/{x}/{y}

Authentication Setup

Creating an API Token

  1. Log in to your Lynker Spatial account at https://auth.lynker-spatial.com
  2. Navigate to API Keys in your account settings
  3. Click "Generate New Key"
  4. Copy the provided JWT token
  5. Save it securely (don't commit to version control!)

Using Credentials in QGIS

For security, use QGIS's built-in credential storage:

  1. Go to Settings → Options → Authentication
  2. Click Add new authentication configuration
  3. Select "HTTP Basic" or "HTTP Digest"
  4. Set Name: "Lynker Spatial Token"
  5. Leave username blank, paste your token in the password field
  6. Click OK and save
By using QGIS's credential storage, your token is encrypted locally and not exposed in your project files.

Styling Vector Tiles

Basic Layer Styling

  1. Right-click the layer in the Layers panel
  2. Select Properties
  3. Go to the Symbology tab
  4. Choose a visualization type (Single Symbol, Categorized, Graduated, etc.)
  5. Configure colors, opacity, and strokes
  6. Click OK to apply

Attribute-Based Styling

Style features based on their attributes:

# In QGIS Symbology tab: 1. Change from "Single Symbol" to "Categorized" 2. Select an attribute (e.g., "protection_level") 3. Click "Classify" 4. Assign colors to each category 5. Click OK

Expression-Based Styling

Use expressions for complex styling rules:

# In the Symbology tab, click the "f(x)" icon next to Fill color: IF( "protection_level" >= 2, color_rgb(200, 50, 50), color_rgb(100, 150, 200) )

Working with Multiple Layers

Adding Multiple Tile Sources

Repeat the "Add Vector Tile Layer" process for each data source:

Available Lynker Spatial sources: - https://tiles.lynker-spatial.com/api/tiles/lynker-spatial-modeling-fabric/{z}/{x}/{y} - https://tiles.lynker-spatial.com/api/tiles/wetlands/{z}/{x}/{y} - https://tiles.lynker-spatial.com/api/tiles/rivers/{z}/{x}/{y} - https://tiles.lynker-spatial.com/api/tiles/3dhp-non-river/{z}/{x}/{y} - https://tiles.lynker-spatial.com/api/tiles/reservoirs/{z}/{x}/{y}

Layer Control

Organize and control visibility in the Layers panel:

Querying and Analysis

Identify Features

  1. Select the Identify tool (Tools → Identify or press I)
  2. Click on a feature in the map
  3. View feature attributes in the Identify panel
  4. Use "Zoom to Feature" to focus on the selected feature

Selection and Filtering

Select features using the selection tools:

Export Selected Features

  1. Make a selection
  2. Right-click the layer → Export → Save Selected Features
  3. Choose format (GeoJSON, Shapefile, etc.) and location
  4. Click Save

Performance Tips

Troubleshooting

Vector Tiles Not Loading

Problem: Layer loads but shows no data
Solutions:

Authentication Errors

Problem: 401 Unauthorized errors
Solutions:

Slow Performance

Problem: Map loading is slow
Solutions:

Attribute Data Not Visible

Problem: Can't see feature attributes when identifying features
Solutions:

Example Workflow: Analyzing Protected Areas

  1. Launch QGIS and create a new project
  2. Add a basemap layer (e.g., OpenStreetMap)
  3. Add Lynker Spatial PADUS vector tile layer with your token
  4. Style by protection level using graduated colors
  5. Use the Identify tool to inspect individual protected areas
  6. Selection features in a specific region of interest
  7. Export selected features to GeoJSON for further analysis
  8. Create a map composition and export as PDF/image

Database Integration (Advanced)

For advanced workflows, you can convert tiles to a PostGIS database:

# Extract tiles to shapefile/GeoPackage, then import to PostGIS: 1. Export vector tiles to GeoPackage format 2. In QGIS, use DB Manager to upload to PostGIS 3. Create spatial indexes for fast queries 4. Perform spatial analysis on the server 5. Connect QGIS to the database for live editing

Resources