Skip to content

PotreeCraft is a QGIS plugin which provides a graphic UI for integrating vector-based data into Potree projects.

Notifications You must be signed in to change notification settings

ThomasFarmer/PotreeCraft

Repository files navigation

PotreeCraft

version 0.3b.0128, Pre-alpha build

PotreeCraft is a QGIS plugin which provides a graphic UI for integrating vector-based data into Potree projects. This is an open source tool for beginner users of the potree project or colleagues with no javascript knowledge. The PotreeCraft tool builds on the well-known Potree project, and lets users create pointcloud publications with integrated shapefile-based vector data with little to no effort. The plugin reads the added vector layer information of a given QGIS project and passed over the layer metadata and coloring styles to Potree, thus allowing the user to manage the vector-based data through a familiar and user-friendly interface what QGIS 3 provides. The plugin itself relies on LAStools and PotreeConverter:

  • LAStools' blast2dem function allows this widget to import pointclouds as raster layers, so the users would be able to check if the vector layers align,
  • PotreeConverter will create the blank Potree project itself, which later recieves the additional vector data files and a new homepage for the project with the necessary javascript code added.

If you do not have these installed on your computer, you can download a copy of LAStools through this link. and you can download PotreeConverter 1.6 stable release from the project's github page.

This project was created and tested with the version 1.6, migration to 1.7 will follow soon.

Known issues

  • There seems to be an issue with the base Python threading in QGIS. While the window itself can be moved during process calls, the interface freezes. Migration to QThread class required. With this I think it is needless to say that the process bar in the bottom left corner absolutely lacks any functionality.
  • Interface and functions to set Page title, Opacity and other cloud paramters are not implemented yet.
  • Layer functionality interface (vector layer settings tab) is in a "rough-at-the-edges" state. Point layers later have the option to be marked as "Annotation" layers, which allows them to appear as such in Potree. The text appearing above these points are read from a selected record of the shape file itself. These layer markings are not represented yet in the QTreeView object itself.
  • The vector layer handling needs a rework, because with the implementation of the annotations there are a lot of redundant data, extra checks and design issues in the code. The plan is to create distinct memory tables / dictionaries which can store the required information for points and annotations (and other elements added later), and the QTreeView widget will get its information from that. In its current state the load vectors function reads and parses the data it finds directly from QGIS, which makes the editing methods a lot more complicated than they should be.
  • Due to the incomplete code in the javascript template, the WGS84 CRS is required for all vectors and pointclouds.

How to use the plugin

First, download the .ZIP here, and install it in QGIS. (plugins -> manage and install plugins -> install plugin from zip)

For testing purposes the same .las cloud and two shape files which can be seen on the screenshots can be downloaded from this link here.

After the installation go to the settings tab, and show the plugin where can it find LAStools and PotreeConverter, and press "save". If the locations are correct and the plugin found the required files the plugin will enable the rest of the interface, and will prompt the user that it is ready for use.

  • 1. Select the pointcloud, and load it into QGIS. The "blast2dem coloring for QGIS" radiobutton group selects the coloring theme for the raster layer. A console window will pop up, just wait patiently to finish the task it's been assigned to do. After that QGIS will prompt the user with a CRS selection screen (as part of the "add raster layer" task). Note: With my test data RGB coloring ended up being a grayscale version of the RGB image.
  • 2. Add some vector data as well.
  • 3. The window loads the layer data on opening, but in case of a change, there's a button on the Vector layer settings tab labeled "Reload layers from current project". That will refresh the data and pre-process the necessary information for the compilation procedure.
  • 4. Then select an output folder for the potree project and press "Compile project", let it run like in the previous case.
  • 5. Finally, check it in the browser. Note: Potree requires a web server to operate, such as python's SimpleHTTPServer, or Apache. For more information on this topic check out the official Potree github page.

Screenshots

Landing / information page: info

Configuring the plugin: settings

Loading the pointcloud into QGIS as a raster layer: pointcloud_window blast2dem

The demo project in QGIS before passing it over to PotreeConverter - no annotations in this case: qgis

The same demo project in QGIS with a point layer added as annotations: qgis_atbl

A final check on the vector layer window: vector_window

Compiling the project: potreeconverter

The final state of the demo project with no annotations: potree_running

The final state of the demo project with the first verse of "The Rocky Road To Dublin" added as annotations: potree_running

A section of the generated source code of the page: potree_running

About

PotreeCraft is a QGIS plugin which provides a graphic UI for integrating vector-based data into Potree projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages