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
-
Open the Vector Tile Layer Dialog
Go to Layer → Add Layer → Add Vector Tile Layer
You should see the "Add Vector Tile Layer" dialog
-
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
-
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.
-
Save Connection
Click OK to save the connection
-
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
- Log in to your Lynker Spatial account at https://auth.lynker-spatial.com
- Navigate to API Keys in your account settings
- Click "Generate New Key"
- Copy the provided JWT token
- Save it securely (don't commit to version control!)
Using Credentials in QGIS
For security, use QGIS's built-in credential storage:
- Go to
Settings → Options → Authentication
- Click
Add new authentication configuration
- Select "HTTP Basic" or "HTTP Digest"
- Set Name: "Lynker Spatial Token"
- Leave username blank, paste your token in the password field
- 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
- Right-click the layer in the Layers panel
- Select
Properties
- Go to the
Symbology tab
- Choose a visualization type (Single Symbol, Categorized, Graduated, etc.)
- Configure colors, opacity, and strokes
- 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:
- Click the eye icon to toggle layer visibility
- Drag layers to reorder them (drawing order)
- Right-click for layer-specific options
- Group related layers for better organization
Querying and Analysis
Identify Features
- Select the Identify tool (
Tools → Identify or press I)
- Click on a feature in the map
- View feature attributes in the Identify panel
- Use "Zoom to Feature" to focus on the selected feature
Selection and Filtering
Select features using the selection tools:
- Rectangle Select: Drag a box around features
- Free Select: Draw any shape around features
- By Expression: Use complex conditions to select features
Export Selected Features
- Make a selection
- Right-click the layer →
Export → Save Selected Features
- Choose format (GeoJSON, Shapefile, etc.) and location
- Click
Save
Performance Tips
- Zoom to a specific area of interest rather than viewing the whole US at once
- Limit the number of visible vector tile layers to improve performance
- Use simpler symbolization when working with large areas
- Right-click layers and set appropriate zoom level restrictions
Troubleshooting
Vector Tiles Not Loading
Problem: Layer loads but shows no data
Solutions:
- Check that your token is valid and not expired
- Verify the URL is correct (check spelling and zoom/x/y syntax)
- In QGIS, go to
Help → Check QGIS Version and ensure you're on 3.14+
- Use the browser console (View → Panels → Browser) to test the connection
Authentication Errors
Problem: 401 Unauthorized errors
Solutions:
- Generate a new API token from your Lynker account
- Ensure the token format is
Bearer <TOKEN> (with space)
- Check that the HTTP header is correctly configured
- Tokens expire according to your Cognito app client (this deployment uses 1 day); generate a fresh one if needed
Slow Performance
Problem: Map loading is slow
Solutions:
- Zoom in to a smaller region
- Hide unnecessary layers
- Check your internet connection speed
- Use the Network Monitor (View → Panels → Browser → Network) to check tile downloads
Attribute Data Not Visible
Problem: Can't see feature attributes when identifying features
Solutions:
- Vector tiles include metadata—this is expected behavior
- To see more detailed attributes, join with an external data source
- Use
Vector → Joins to link with attribute tables
Example Workflow: Analyzing Protected Areas
- Launch QGIS and create a new project
- Add a basemap layer (e.g., OpenStreetMap)
- Add Lynker Spatial PADUS vector tile layer with your token
- Style by protection level using graduated colors
- Use the Identify tool to inspect individual protected areas
- Selection features in a specific region of interest
- Export selected features to GeoJSON for further analysis
- 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