# QGIS

### **Orthomosaics**

Spexi provides [**WMTS**](#add-spexi-orthomosaics-as-a-wmts-layer) and [**XYZ**](#add-spexi-orthomosaics-as-an-xyz-tile-layer) tile service URLs that allow you to stream orthomosaics directly into QGIS.

### Authentication in QGIS

Spexi tile services require HTTP header-based authentication.

You will configure:

* **Header Key:** `x-api-key`
* **Header Value:** `YOUR_API_KEY`

This applies to **both** WMTS and XYZ connections.

### Add Spexi Orthomosaics as a WMTS Layer

{% stepper %}
{% step %}

#### Create a WMTS Connection

* In the **Browser** panel, right-click **WMS/WMTS**
* Select **New Connection**
  {% endstep %}

{% step %}

#### Enter WMTS Connection Details

In the connection dialog:

* **Name:** Any descriptive name (e.g., *Spexi WMTS*)
* **URL:** Paste your Spexi WMTS URL exactly as provided

Example:

```
https://world.spexi.com/developer-api/mapi/v1/org/ORG_ID/layer/LAYER_ID/raster-tile/WebMercatorQuad/WMTSCapabilities.xml

```

{% endstep %}

{% step %}

#### Add Authentication

* Under **Authentication**, click the green **➕** icon
* Create a new configuration:
  * **Type:** *API Header*
* Add:
  * **Header Key:** `x-api-key`
  * **Header Value:** `YOUR_API_KEY`
* Save the configuration and select it in the dropdown
  {% endstep %}

{% step %}

#### Add the WMTS Layer to the Map

* In the **Browser**, expand **WMS/WMTS**
* Select your new Spexi connection
* Choose the available layer
* Drag it into your map

If the map looks blank, right-click the layer → **Zoom to Layer(s)**
{% endstep %}
{% endstepper %}

### Add Spexi Orthomosaics as an XYZ Tile Layer

{% stepper %}
{% step %}

#### Create an XYZ Tile Connection

* In the **Browser** panel, right-click **XYZ Tiles**
* Select **New Connection**
  {% endstep %}

{% step %}

#### Enter XYZ Connection Details

In the connection dialog:

* **Name:** Any descriptive name (e.g., *Spexi XYZ*)
* **URL:** Paste your Spexi XYZ URL exactly as provided

Example:

```
https://world.spexi.com/developer-api/mapi/v1/org/ORG_ID/layer/LAYER_ID/raster-tile/WebMercatorQuad/{z}/{x}/{y}.png

```

{% endstep %}

{% step %}

#### Add Authentication

* Under **Authentication**, click the green **➕** icon
* Create a new configuration:
  * **Type:** *API Header*
* Add:
  * **Header Key:** `x-api-key`
  * **Header Value:** `YOUR_API_KEY`
* Save the configuration and select it in the dropdown
  {% endstep %}

{% step %}

#### Add the XYZ Layer to the Map

* In the **Browser**, expand **XYZ Tiles**
* Drag your Spexi XYZ connection into the map
* If needed, right-click → **Zoom to Layer(s)**
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.spexi.com/integrations/getting-started/qgis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
