[FEATURE] Tracing of features (digitizing)
Tracing can be now used in various capturing map tools (add feature, add part, ...) including reshape and split tools.
Tracing is simply a new mode for these tools - when tracing is not enabled, the tools work as usual. When tracing is enabled (by clicking the new magnet icon or pressing T key), tools switch to tracing behavior:
- first click on a vertex/edge (must be snapped!) will start tracing - moving mouse on top of the map continuously updates the trace
- next click will confirm the trace and mark start of a new trace Tracing can be enabled/disabled anytime even while digitizing one feature, so it is possible to digitize some parts of the feature with tracing enabled and other parts with tracing disabled.
Tracing respects snapping configuration for the list of traceable layers.
If there are too many features in map display, tracing is disabled to avoid potentially long tracing structure preparation and large memory overhead. After zooming in or disabling some layers the tracing is enabled again.
Internally, things work like this:
- when tracing is requested, linestrings are extracted from vector layers, then noded (using GEOSNode to resolve all intersections) and finally a simple planar graph is built (vertices + edges)
- when tracing, endpoints are temporarily added to the graph (if not equal to one of existing vertices already) and Dijkstra's algorithm is run to get shortest path
Original specs for the curious ones (the interaction with QGIS is slightly improved from what has been specified): http://www.lutraconsulting.co.uk/crowdfunding/autotrace-phase-2/specification.pdf
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.
Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
This adds the possibility to manage data on a normalized relational
database in N:M relations. On the relation editor in a form, the tools
to add, delete, link and unlink work (also) on the linking table if a
relation is visualized as N:M relation.
Configuration is done through the fields tab where on the relation a
second relation can be chosen (if there is a suitable relation in terms
of a second relation on the linking table).
Limitations
===========
QGIS is not a database management system.
It is based on assumptions about the underlying database system. In
particular it expects
* A `ON DELETE CASCADE` or similar measure on the second relation
* Does not take care of setting the primary key when adding features.
Either users need to be instructed to set them manually or - if it's a
database derived value - the layers need to be in transaction mode
(currently only activatable through the API)
This introduces two new options to filter legend elements:
- filter by expression: a boolean expression can be set. Only symbols of
features that make the expression evaluated to true will be kept in the legend
- filter by polygon: only symbols of features that are inside the given
polygon will be part of the legend.
The polygon filtering is used in particular for a new option in the
composer legend that allows to filter out anything that is not included
in the current atlas polygon.
Size and Rotation can be defined by an expression for all symbols
composing a marker. Width can be defined by an expression for all
symbols composing a line.
For markers, a legend is generated for varying sizes. This allows
multivariate analysis legend in the case of classified/graduated colors.
The offset is now set along with size to maintain the relative position
of symbols composing a marker.
An asistant, with preview, is accessible through the data defined button
to help the user define the size expression. Three methods are
available: Frannery, Area and Radius.
Added a widget for use in categorized/classified symbology gui to set
the expression if needed. The assistant is also available from it.
This adds a new histogram tab to the graduated renderer, which
shows an interactive histogram of the values from the assigned
field or expression. Class breaks can be moved or added using
the histogram widget.
A base class, QgsHistogramWidget, has been created to display
histograms for a field or expression. In future this could be
used to show a histogram within a "selection statistics" panel.
Sponsored by ADUGA (http://www.aduga.org)
This commit adds a new framework for implementing paint effects, which
modify the results of QPainter operations to apply visual effects
such as drop shadows and blurs.
The initial implementation allows for effects to be applied to entire
layers and individual symbol layers.
Included are a drop shadow, inner shadow, blur, inner glow, outer glow,
colorise and transform effect. A "stack" effect is also implemented
which allows other paint effects to be combined in various ways.
Sponsored by hundreds of generous kickstarter contributors!
Allows for live, dynamic heatmaps for point layers. Options include
specifying heatmap radius in pixels, mm or map units, choice of
color ramp, and a slider for selecting a tradeoff between render
speed and quality.
QToolButton. Features:
- context menu items have been moved to the attached menu button
- new gui widget QgsColorSwatchGrid, which displays a grid of colors
- new class for QgsColorScheme, which generates colors to show in a
color swatch grid
- new class QgsColorSchemeRegistry, with a global instance containing
default color schemes. QgsColorButtonV2 accepts a color scheme
registry, to control which schemes to show in the popup menu as
color swatch grids.
- color button can have a default color
- color button can also be quickly set to a totally transparent color
- c++ and python unit tests for all core components