One of QGIS’ current strengths lies in how easy it is to edit vector layers by digitizing new features and manually editing the nodes and parts of existing features. Despite this, some editing operations within QGIS remain quite complex and painstaking to perform. For instance, to perform a common task like reversing the direction of a set of LineString features requires users to run the corresponding “Reverse Line Direction” Processing algorithm over the selected features, causing a new layer to be created with the result. The user then has to manually delete the original features from the original layer, and copy and paste the reversed features from the output of the Processing algorithm back into the original layer. This is a tedious and error prone process, and QGIS users deserve better!
While 3rd party plugins can help address this deficiency, we don’t see this as a viable long-term solution. If every plugin adds just a single new button to the QGIS toolbar to expose it’s functionality, we’ll quickly become overrun with UI clutter and an unusable interface. We also strongly believe that these fundamental editing operations should be available out-of-the-box, and not rely on users to seek and install plugins to add the missing functionality.
Fortunately, in recent QGIS releases the range and power of the included Processing algorithms has grown and grown. So, we see Processing algorithms as a perfect way to handle in-place features edits within QGIS! This would allow us to expose a huge range of operations for application to a set of selected features, e.g.
- clipping features to another layer (“erase outside” for those MapInfo users!)
- subtracting geometries from another layer (“erase” in MapInfo terminology)
- automated geometry repairing
- converting multiparts to singleparts (i.e. convert a single multipart feature to a set of individual single part features)
- deleting holes from polygons
- densifying vertices
- extending lines
- replacing geometries with their convex hulls
- orthogonalize (attempts to create regular features by making close angles exactly right angles)
- reversing line directions
- subdividing geometries
- translating geometries
- simplification and smoothing
By linking Processing algorithms to in-place layer edits we also expose this feature to plugin provided and Python Processing algorithms, making the editing possibilities almost limitless..! Best still, is that by re-using Processing algorithms means we can avoid extra UI clutter (more on that below) and avoid code duplication and ease maintenance efforts. (Many Processing algorithms now even support “data defined” parameters (or “expression based” parameters), so power users could potentially select a bunch of features in a layer, then buffer these in place using a buffer distance which depends on an attribute within those features.). The animation below shows a mockup of our proposal:
We’re super-excited to be launching this campaign — QGIS is a fantastic data editing environment, and implementing these features would exponentially increase QGIS editing power (not to mention making it much more enjoyable to perform these types of editing operations!).
Campaign concluded successfully 11 September 2018
About the feature – the nitty gritty
Exactly how will this feature work? Well, given a vector layer opened for editing and a set of selected features, this enhancement will allow a user to execute suitable algorithms on the selected features, directly modifying the features and their geometries in-place.
For an algorithm to be suitable for in-place modifications it needs to:
- support operations on isolated features (so an algorithm like a point clustering algorithm would not be suitable)
- it must not change the type of the input geometry (e.g. it cannot convert polygon features to point features — an underlying principle in QGIS is that layers have a single geometry type and mixed geometry layers are not supported).
When the feature is implemented, a new button will be added to the Processing toolbox. This button becomes enabled whenever the current layer is editable and has some selected features.
When the button is pressed, the Processing toolbox enters into “modify-in-place” mode and it filters to display only algorithms that allow in-place modification of the geometries. If an algorithm is selected from the toolbox which doesn’t require any additional parameters (e.g. “Reverse Line Direction”), then it will be immediately applied to the selected features. If the algorithm does require extra input (such as the “Translate” algorithm shown above), then a dialog will open asking the user to enter these values. Clicking “Modify selected features” will apply the operation to the features:
All edits will be added to the layer’s “edit buffer”, so you can easily undo and redo the changes before saving them back to the data source.
(There’ll be a range of “smarts” in place to ensure that outputs from the edit operations match the layer’s requirements. So e.g. if the edit results in single part features, but the layer requires multi-part features, then the features will be automatically promoted to multipart to meet this constraint. Similarly, if the output from an algorithm is curved geometries, they will automatically be segmentized if the layer is a linear geometry layer. Some algorithms automatically add extra columns to the output features — these will be discarded if they do not exist in the layer being edited. All this will be handled automatically, with no user-intervention required.)
QGIS Locator bar
For those power users who perform frequent data edits, we’ll also be exposing this functionality via QGIS 3.0’s “Locator bar” (that “type to locate” bar which sits in the bottom-left corner). Typing ‘ef’ (“edit features”) followed by the name of the corresponding operation will allow you to perform the edits directly via the keyboard. E.g.
- Select a bunch of line features
- Press Ctrl + K (activates the locator bar)
- Type “ef reverse”
- Press enter – the selected line features will be reversed immediately!
Hall of fame
Current contributors to this work include:
- Alta ehf, Reykjavik, Iceland
- Kristianstads kommun, Sweden
- MBS Environmental, Perth, Australia
- Andreas Neumann
- Chartis Technology, Australia
- Bird’s Eye View GIS, Albuquerque, New Mexico
- Hans van der Kwast
- Swedish QGIS User Group
- SIRS, Villeneuve-d’Ascq, France
- d.b.g. Datenbankgesellschaft mbH, Germany
- Van Oord Dredging and Marine Contractors bv, Rotterdam, The Netherlands
How it works
Crowd funding operates by multiple organisations (or individuals) each pledging to contribute part of the campaign’s funding goals. In order to make the proposed changes to QGIS form handling, we require 6,500€ to make this feature a reality. You can contribute part (or all) of these funds. If the funding goal is NOT reached, then no contributions are payable and the feature will not be added to QGIS.
This work will be targeted for inclusion in the QGIS 3.6 release (scheduled for February 2019).
If you’d like to see this feature extending the power of QGIS’ forms, then your contributions are vital! Pledge, or publicise, this campaign to help it reach the funding goal before the September 30 deadline!
How to financially contribute to the campaign
We understand that it can be difficult for organisations to approve contributing to a crowd-funding effort, so we’re trying to make this process as painless as possible. Yet at the same time, we want to make the campaign accessible for end users to contribute too! Accordingly, we’re running this campaign under a two-option model:
Option 1: Pledging a contribution
- To contribute to the campaign, just email email@example.com and let us know your details and how much you will be contributing to the goal. Due to the administrative burden of processing payments, the minimum pledge we will accept is 100€ (or equivalent).
- We will contact you to discuss payment options – but NO payment is required in advance!
- If (and ONLY if!) the campaign is successful we will invoice you directly for your pledged amount. Payment in full will be required within 14 days of the campaign’s completion. (Please contact us to discuss if you need different payment terms).
- When we have received all pledged funds we will commence the work detailed above, and provide regular updates as we go.
We believe this system will give organisations confidence that contributing to the campaign carries no risk and is compatible with their organisation’s accounting procedures. If however you have concerns or would like to contribute in another way, just contact us to discuss further!
Option 2: Donating to the campaign
If you’d rather skip the hassle of a pledge, or would like to contribute an amount less 100€, then we also accept direct donations to the campaign! A donation counts towards reaching the campaign goal in exactly the same way as a pledge, BUT a donation payment is processed immediately and is payable regardless of whether the campaign reaches its goal. If the campaign is NOT successful, all donations received will be used to fund other, smaller QGIS improvements (such as adding more regression tests, bug fixing, etc).
To make a direct donation to the campaign, use the PayPal form below:
Donations closed, pending campaign outcome!
What happens if contributions exceed the campaign goal?
If contributions are in excess of the stated goal, we will reinvest the excess back into QGIS by using it to fund some of our other ongoing QGIS contributions, such as the ongoing work writing unit tests to ensure QGIS releases are stable and free from regressions. This will be done in a transparent and accountable way, and we will openly report on the ways additional funds are being used.
This work will be undertaken by QGIS core contributors, Alessandro Pasotti and Nyall Dawson.
At North Road we invest back into the open-source geospatial community. We do large amounts of volunteer fixes and feature additions across the open source geospatial stack, so by investing in us you also help support us improve the open source GIS stack.
We use the software we develop daily, so we take pride in developing stable, polished code with extensive regression testing and refined workflows. We offer long-term support for the code we create, providing proactive fixes and improvements even after a project is complete. Our development record demonstrates the confidence you can place in us for timely delivery of this crowd funding campaign’s product.
Please contact us for any further details on this project or for contributing to this campaign.