www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe Enterprise Products > TerraExplorer for Developers
  New Posts New Posts RSS Feed - QGIS Toolbox – Pet project
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

QGIS Toolbox – Pet project

 Post Reply Post Reply
Eylon View Drop Down
Skyline Admin Group
Skyline Admin Group

Joined: May 05 2003
Location: Israel
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eylon Quote  Post ReplyReply Direct Link To This Post Topic: QGIS Toolbox – Pet project
    Posted: July 23 2014 at 8:23am
Hi Community,
Recently I played around with building a QGIS extension to TerraExplorer.
The idea was to initiate QGIS processing from inside TerraExplorer in as transparent a way as possible.
The implementation utilizes several technologies to making it possible.
A TEZ (TE Add-On) is delivered that installs the Add-On components and adds a button in the ribbon.
When executed, a C# application is launched, with a repository of special python scripts.
Selecting a script and running, causes the application to update the script with parameters, like the path to the feature layer that is currently selected in TerraExplorer. Then it runs a hidden command console, that executes a batch file for registering and setting QGIS components, and eventually calls the QGIS python engine with the selected and updated python script. The stdout is monitored for the output, and the resulting feature layer is then loaded in TerraExplorer.
I used it to create a polyline simplification script (qgis:simplifygeometries), and to run a set of algorithms in tandem (qgis:voronoipolygons, qgis:dissolve, qgis:convexhull, qgis:clip) that will return a polygon layer for a viewshed (or shadow) point query result, as you can see here (in green and fuchsia):

Of course, there are many other algorithms and possibilities….
It was a very nice experience, and it raises a lot of ideas regarding where to take this further.
However, getting QGIS to work was not easy at all. This is especially true in regards to different environment settings (variables, paths, etc.). My idea was that the tool itself would only require an existing QGIS installation, and by setting the paths to the installed components all could work smoothly. This was not easy to do on my machine, and proved even more difficult to configure on other various configurations. Seems like I am missing some QGIS ad Python know-how.

Just wanted to share this information with the community. Knowing such cross-application are feasible can raise many ideas for further and other integrations.
If anyone has the will and know-how to take this further (make this a shared community project on GitHub or similar?!), I will be happy to share my work. As it stands now, it is too fragile to be delivered as-is.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

This page was generated in 0.109 seconds.