> ## Documentation Index
> Fetch the complete documentation index at: https://speckle-assistant.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# QGIS

export const app_0 = "QGIS"

export const versions_0 = "3.28.15 & above"

export const connector_0 = "QGIS"

<div class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border-2 border-red-600 bg-red-100/50 dark:border-red-600 dark:bg-red-400/20" data-callout-type="warning">
  <div class="mt-0.5 w-4" data-component-part="callout-icon">
    <svg class="flex-none w-5 h-5 text-red-700 dark:text-red-300" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-label="Warning">
      <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
    </svg>
  </div>

  <div class="text-sm prose min-w-0 w-full text-red-700 dark:text-red-300" data-component-part="callout-content">
    <b>Notice</b>: This user guide is based on the legacy {connector_0} connector.<br />
    We recommend using our new connectors instead, as they are easier to use and actively maintained. This legacy documentation may not be up to date.
  </div>
</div>

<Info>
  Legacy Speckle supports {app_0} versions: {versions_0}
</Info>

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/01_main.png?fit=max&auto=format&n=WU-XhQlBBfFr6sbO&q=85&s=f645ed76518f65c37a7dda9aed8154ec" alt="QGIS connector" width="1321" height="673" data-path="images/legacy/qgis/01_main.png" />
</Frame>

The Speckle 2.0 connector for QGIS currently supports QGIS versions 3.28.15 and upwards.

## Getting started

### Installation

You can find Speckle QGIS in the QGIS `Plugins -> Manage and install plugins` menu item.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/qgis-pluginsMenu.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=ba30d1d9f67c68601cb7bfb455209775" alt="Plugins dropdown" width="299" height="129" data-path="images/legacy/qgis/qgis-pluginsMenu.png" />
</Frame>

Go to the `All` tab and search for `Speckle`. You should see the plugin appear in the list:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/qgis-specklePluginView.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=ff7741b6df5173b39ab8c60ba5cc5f35" alt="Speckle panel" width="1015" height="535" data-path="images/legacy/qgis/qgis-specklePluginView.png" />
</Frame>

You can also install the plugin from Speckle Desktop Manager:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/02_install_manager.png?fit=max&auto=format&n=WU-XhQlBBfFr6sbO&q=85&s=83988cc9740506ace153f6da21bfc737" alt="Installation from Manager" width="399" height="269" data-path="images/legacy/qgis/02_install_manager.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/02_install_manager1.png?fit=max&auto=format&n=WU-XhQlBBfFr6sbO&q=85&s=ef37e828c99f9cd2eba2a857f88b9395" alt="Installation from Manager" width="401" height="424" data-path="images/legacy/qgis/02_install_manager1.png" />
</Frame>

### Features

* The plugin allows you to select several layers in your project and send their geometry and attributes to a Speckle server.
* You can receive Speckle geometry sent from other software. Properties of the objects upon receiving are stored in the layer attribute table.
* You can send your data from QGIS and receive it in CAD in a CAD-friendly location, thanks to the option to create custom Coordinate Reference System (CRS) in QGIS. To do this, you will be required to enter geographic coordinates of the point representing the origin point (0, 0) in your CAD project.
* You can transform the polygons and topography (single-band raster layers) from 2d to 3d upon sending. Refer to the "Transformations" section below.

### Using Speckle QGIS

Once the plugin is installed, you'll find a new toolbar button in QGIS that will open the `SpeckleQGIS` panel. The panel contains a very simple interface:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/03_open_plugin.png?fit=max&auto=format&n=WU-XhQlBBfFr6sbO&q=85&s=f3b57ac0caa6a9325af8146b9af527f2" alt="Plugin view" width="1211" height="816" data-path="images/legacy/qgis/03_open_plugin.png" />
</Frame>

#### Adding a Speckle project to the QGIS project

First, you need to search and add a project to the QGIS project. For that, you can press the Search button near the `Project` panel. This will open a new pop-up window that will allow you to search for a specific project and add it to QGIS project.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/add_stream_img.png?fit=max&auto=format&n=WU-XhQlBBfFr6sbO&q=85&s=8cef5810ffb21c9cde9fc60d7e0d299f" alt="Search project panel" width="567" height="286" data-path="images/legacy/qgis/add_stream_img.png" />
</Frame>

From the list of projects in the dropdown list, you can select one to make it the **current active project**. This will be the project used for sending/receiving data. When an active project is selected, the `Model` dropdown will be populated with all available models from that project.

And here's a short gif of the process 👇🏼

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/add_stream_gif.gif?s=747ce77a971e859c6bdc4ab7eeb647a5" alt="Adding a project to the QGIS project" width="768" height="726" data-path="images/legacy/qgis/add_stream_gif.gif" />
</Frame>

> Once a project is added to the QGIS project, it is saved along with it so the projects will still be available after restarting QGIS.

#### Sending data

In order to send your data, just follow these steps:

1. Select a project from the dropdown list.
2. Specify a specific model to send data to using the dropdown menu.
3. Select the layers in the file that you wish to send.
4. (optional) Write a version message.
5. (optional) If you want to receive it in a non-GIS software or view in the browser, make sure you set your project to CRS of projected type (e.g. using Meters as units).
6. Send the data.

The geometry will be reprojected and sent in a `Project CRS` of your QGIS project (shown in the bottom right corner in QGIS panel). If the chosen Coordinate Reference System is of Geographic type with non-linear units, they will be treated as Meters in other software that do not support such units.

Here's a quick walkthrough of the process.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/send.gif?s=9a0be85ba7f1472c86dc557b62fa25bf" alt="Sending data from QGIS" width="1137" height="726" data-path="images/legacy/qgis/send.gif" />
</Frame>

If you want to receive the layers later in a non-GIS software at the exact location (e.g. receive a context for your building in London), you can create a custom CRS in QGIS, that will match the global coordinate system from QGIS with the local coordinate system in CAD. Simply enter the geographic coordinates (Lat, Lon) of the point which is the origin (0,0) of your CAD environment.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/custom_crs.gif?s=0d1a846d26c5ed553c17c96500e93269" alt="Matching coordinates with CAD" width="1137" height="726" data-path="images/legacy/qgis/custom_crs.gif" />
</Frame>

#### Viewing the result

Once data has been sent to Speckle, you can view the result by going to your Speckle's server Url (our public one is [https://app.speckle.systems/](https://app.speckle.systems/)). Here's an example of some QGIS data:

<iframe title="Speckle" src="https://app.speckle.systems/projects/55a29f3e9d/models/e9f320ca1c@1f8b3ca162#embed=%7B%22isEnabled%22%3Atrue%7D" width="600" height="400" frameborder="0" />

#### Receiving data

Steps to receive the data:

1. Select the project to receive data from
2. Select the model
3. Select specific version (by default the latest one)
4. Find the received layers in the new layer group named after project, model and version

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/receive.gif?s=740cb399541f8b669a5da5e622aa1d6f" alt="Receiving data" width="1137" height="726" data-path="images/legacy/qgis/receive.gif" />
</Frame>

### Custom Project Centre is useful when you need to:

* Send data (so you can receive correctly in a non-GIS application)
* Receive data (if data was sent from non-GIS application).

You have several options to choose in order to set the custom project center.

#### Adding Offsets

You can choose to use the existing Coordinate Reference System (Project CRS) and modify its Speckle properties by adding X- and Y- offsets. This option will only be affecting Speckle properties on Send/Receive and will not change anything for you while you are working on a QGIS project. Use this option when your project requires a use of a specific CRS.

For example, if you use a projected CRS (e.g. EPSG:32631) without the offsets and send the Eiffel Tower outline to Speckle, when receiving in Rhino geometry will be located thousands kilometers away from the origin. But if before sending you set the offsets Lat(y) as 5411939.08 and Lon(x) as 448253.52, you will receive the Eiffel Tower right in the middle of your Rhino canvas, while still preserving the required CRS (e.g. EPSG:32631).

Lat(y) and Lon(x) offsets should be specified in the units of the current Project CRS, and in the correct order. Note, that when you copy the coordinates from QGIS canvas using right-click, the Lat/Lon order might be different depending on the CRS used (Lat is usually marked with N-North, and Lon is marked with E-East, both values can be positive or negative).

#### Creating Custom CRS

Create a custom Coordinate Reference System, based on Traverse Mercator if you don't have to use a specific CRS and want to have minimal size and shape distortions. Specify the origin Lat, Lon in geographic coordinates to create a custom CRS with the required origin and change your Project CRS.

#### Adding Angle to the True North

You can also add an angle to the True North to either of the above options if your non-GIS application require so. It will only affect Speckle object properties during Send/Receive operations and will not be visible in QGIS project.

### Transformations

From 2.14 version onwards there is a new functionality helping to send a full 3d context maps for the further use in CAD, BIM or any 3D software. This can be applied by clicking "Apply transformations on Send" before sending the data.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/transforms_intro.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=f8162697aa96ccb1735933628fedd0b1" alt="transforms_intro" width="1226" height="729" data-path="images/legacy/qgis/transforms_intro.png" />
</Frame>

At the moment, 4 types of transformations are available:

* **Creating a mesh from Digital Elevation Model:** converting a sigle-band raster layer to a 3d mesh.
* **Using a raster layer as a texture for a 3d mesh:** mapping the raster image onto a 3d elevation (requires pre-selected Elevation layer).
* **Extruding polygons:** using a random value or a numeric/text attribute field of the layer.
* **Projecting polygons onto 3d elevation:** move the lowest point of the polygon to the lowest point of the surrounding terrain (requires pre-selected Elevation layer).

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/transforms_types.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=07da95c575613fd3342a8b4116e10330" alt="transforms_types" width="886" height="475" data-path="images/legacy/qgis/transforms_types.png" />
</Frame>

Additionally:

* **Setting a layer as Elevation layer:** will be used as a base for several transformations, such as texturing and projecting on a terrain.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/transforms_elevation_layer.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=73c8c3ade72ad3e52951c4b1c8c2dc55" alt="transforms_elevation_layer" width="884" height="599" data-path="images/legacy/qgis/transforms_elevation_layer.png" />
</Frame>

You can add and remove transformations using + and - buttons above and under the list with applied transformations:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/transforms_add.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=afad0f46e4da9773aaddece38377ca97" alt="transforms_add" width="885" height="472" data-path="images/legacy/qgis/transforms_add.png" />
</Frame>

Each transformations type is targeting a specific layer type, e.g. only polygon layers or only raster layers. Extrusion transformation will offer additional parameter - choice of the attribute to use for the extrusion value. If you choose the option "populate NULL values", you will be able to set a "Random height" as a value.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/qgis/transforms_extrusion_attributes.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=ac3a3659ce6b42689fda1228aad4d67a" alt="transforms_extrusion_attributes" width="885" height="472" data-path="images/legacy/qgis/transforms_extrusion_attributes.png" />
</Frame>

Add "Log Messages Panel" to your QGIS interface to see more info and warnings about your transformations.

### Examples

**Elevation to a 3d mesh**

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/2.14-changelog-01-elevation.gif?s=1ff6c9364c5233e2cbdf9393f9804718" alt="2.14-changelog-01-elevation" width="1339" height="762" data-path="images/legacy/qgis/2.14-changelog-01-elevation.gif" />
</Frame>

**Texture for 3d mesh**

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/2.14-changelog-02-texture_over_elevation.gif?s=18e9b13e2ac106c56e2e73cd26fca76b" alt="2.14-changelog-02-texture" width="1339" height="762" data-path="images/legacy/qgis/2.14-changelog-02-texture_over_elevation.gif" />
</Frame>

**Polygon extrusions**

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/2.14-changelog-03-extrusion.gif?s=e68b5616779e0cb8a8c13b7a5ca6a825" alt="2.14-changelog-03-extrusion" width="1339" height="762" data-path="images/legacy/qgis/2.14-changelog-03-extrusion.gif" />
</Frame>

**Extruding and projecting on a terrain**

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/2.14-changelog-04-extrude_and_project_smaller_smaller.gif?s=a70530aa21368c04af169166655d8d1f" alt="2.14-changelog-04-projecting" width="1230" height="700" data-path="images/legacy/qgis/2.14-changelog-04-extrude_and_project_smaller_smaller.gif" />
</Frame>

**Combination of the transformations**

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/WU-XhQlBBfFr6sbO/images/legacy/qgis/2.14-changelog-05-altogether_smaller.gif?s=6b55dbe9422cef407b0121b06a60fb94" alt="2.14-changelog-05-all-transforms" width="1142" height="650" data-path="images/legacy/qgis/2.14-changelog-05-altogether_smaller.gif" />
</Frame>
