QGIS Connector for Speckle 2.0
Перейти к файлу
KatKatKateryna 3811b86fd4 noData on receive 2024-03-14 12:09:03 +01:00
.circleci Merge branch 'main' into unit_tests 2024-03-14 10:49:09 +01:00
.github/workflows ci: Update github actions to use new actions repo 2023-01-09 20:37:59 +01:00
.vscode move conftest to same level 2024-01-09 10:43:17 +00:00
help remove copyright, add AuthID to CRS 2023-06-14 22:04:45 +01:00
i18n
plugin_utils diff receive report in debug mode 2024-02-20 18:00:54 +00:00
scripts removing files 2022-12-23 21:24:56 +08:00
speckle noData on receive 2024-03-14 12:09:03 +01:00
tests validation tests 2024-02-19 17:00:27 +00:00
tests_qgis clean tests for now 2024-03-14 11:39:21 +01:00
.gitignore manually append sys.path in conftest 2024-01-18 17:07:20 +00:00
.pylintrc feat: Receiving data and creating layers 2022-01-17 11:51:17 +01:00
LICENSE Create LICENSE 2023-05-01 17:42:10 +08:00
Makefile y 2023-07-05 18:06:32 +01:00
README.md update description with unsupported data types 2024-01-31 13:58:57 +00:00
__init__.py wrap main __init to try/except 2024-01-18 19:52:57 +00:00
docker-compose.yml move file 2024-01-04 16:27:23 +00:00
icon.png
metadata.txt minimum supported qgis - LTR 3.28.15 2024-02-05 23:46:34 +00:00
patch_version.py remove encoding 2023-10-30 15:02:02 +00:00
pb_tool.cfg improve repo release 2023-07-17 23:12:49 +01:00
poetry.lock upgrade specklepy 2024-02-12 23:21:55 +00:00
pyproject.toml upgrade specklepy 2024-02-12 23:21:55 +00:00
resources.py
resources.qrc Revert "typo" 2023-07-05 17:18:35 +01:00
speckle-qgsi.pyproject
speckle-qgsi.pyproject.user Layer.py refactor + log cleanup 2022-01-24 23:11:15 +01:00
speckle_qgis.py regression testing report on receive in Debug mode 2024-02-20 00:12:51 +00:00

README.md


Speckle | QGIS

Connector for Spatial Data from QGIS

Speckle is the data infrastructure for the AEC industry.


Twitter Follow Community forum users website docs

About Speckle

What is Speckle? Check our YouTube Video Views

Features

  • Object-based: say goodbye to files! Speckle is the first object based platform for the AEC industry
  • Version control: Speckle is the Git & Hub for geometry and BIM data
  • Collaboration: share your designs collaborate with others
  • 3D Viewer: see your CAD and BIM models online, share and embed them anywhere
  • Interoperability: get your CAD and BIM models into other software without exporting or importing
  • Real time: get real time updates and notifications and changes
  • GraphQL API: get what you need anywhere you want it
  • Webhooks: the base for a automation and next-gen pipelines
  • Built for developers: we are building Speckle with developers in mind and got tools for every stack
  • Built for the AEC industry: Speckle connectors are plugins for the most common software used in the industry such as Revit, Rhino, Grasshopper, AutoCAD, Civil 3D, Excel, Unreal Engine, Unity, QGIS (you are here), Blender and more!

Try Speckle now!

Give Speckle a try in no time by:

  • speckle XYZ ⇒ creating an account at our public server
  • create a droplet ⇒ deploying an instance in 1 click

Resources

  • Community forum users for help, feature requests or just to hang with other speckle enthusiasts, check out our community forum!
  • website our tutorials portal is full of resources to get you started using Speckle
  • docs reference on almost any end-user and developer functionality

Untitled

Repo Structure

This repo contains the QGIS plugin for Speckle 2.0. It is written in python and uses our fantastic Python SDK. The Speckle Server is providing all the web-facing functionality and can be found here.

Try it out!! Although we're still in early development stages, we encourage you to try out the latest stable release. Just follow the instructions on this file, and head to the Releases page to download the necessary files and dependencies.

What can it do?

Currently, the plugin allows to send data from a single layer to a Speckle server using one of the accounts configured on your computer. It will extract all the features of that layer along side their properties and, when possible, geometry too. The following geometry types are supported for now:

  • Point
  • MultiPoint
  • Polyline (LineString)
  • MultiLineString
  • Polygon
  • MultiPolygon
  • More to come!!

Data types currently not supported for sending:

  • Layers depending on the server connection (WMS, WFC, WCS etc.)
  • Scenes
  • Mesh Vector layers
  • Pointclouds

If you have questions, you can always find us at our Community forum

Installation

QGIS Marketplace

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

The plugin is currently published as experimental, so make sure you go to Settings and activate the Show also experimental plugins checkbox.

Experimental

Then go to the All tab and search for Speckle. You should see the plugin appear in the list. You might need to restart QGIS.

image

Speckle Desktop Manager install

Install Speckle Desktop Manager from here. Click on QGIS plugin to install it:

from_manager1

Launching the Plugin

SpeckleQGIS will appear in the Plugins Toolbar. Click the blue brick in the toolbar to open the plugin.

plugins_toolbar

Developing

Setup

Setup is a bit cumbersome for now. The following is adapted from this tutorial

Qt Creator

To edit the UI of the plugin, you'll want to install Qt creator. You can find the free installers on this page in the "Qt Creator" tab. On Windows, you'll be prompted to create an account during the installation process.

qt creator install

Python Qt Bindings

For Windows, the bindings are already included in the QGIS installation.

For Mac, you can install PyQt using homebrew.

brew install pyqt

Install pb_tool

pb_tool allows you to compile resource files from into something python will understand.

For this plugin we only have one file to convert:

  • resources.qrc -> resources.py

To install pb_tool, just run:

pip install pb_tool

or

YOUR_PYTHON_EXECUTABLE -m pip install pb_tool

For convenience, the pre-compiled resources.py file so you don't really have to do anything here.

Dev Environment

For a better development experience in your editor, we recommend creating a virtual environment. In the venv, you'll just need to install specklepy. You will also need to copy over the qgis module into the {venv}/Lib/site-packages. You can find the qgis module in your QGIS install directory:

  • Windows: C:\Program Files\QGIS 3.28.15\apps\qgis\python
  • MacOS: /Applications/QGIS.app/Contents/Resources/python

qgis dependency for venv

QGIS Plugins

Though it is not required, we recommend installing these plugins from the QGIS Plugin Manager:

  • Plugin Reloader (allows you to reload the plugin without restarting QGIS)
  • Remote Debugger (enables interactive debugging)
  • First Aid (shows errors before crashing QGIS, sometimes)

Debugging

Visual Studio Code

First, you'll need to change the _debug value to True in plugin_utils/installer.py file.

    _debug = True

This will automatically setup debugpy if it's not already installed, and start listening to port 5678.

Select the "Python" -> "Remote Attach" option. Your launch.json should look like this:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Remote Attach",
      "type": "python",
      "request": "attach",
      "port": 5678,
      "host": "localhost",
      "pathMappings": [
        {
          "localRoot": "${workspaceFolder}",
          "remoteRoot": "${workspaceFolder}"
        }
      ]
    }
  ]
}

To start debugging, you'll need to first launch QGIS. Once it's running, run your debug Python: Remote Attach configuration.

That's all there is to it! Now any breakpoints you create should be hit.

successful debugging in vs code

Enjoy!