7323 Commits

Author SHA1 Message Date
Martin Dobias
fdeac8198c Fix incorrect raster reprojection after drawing raster previews
Moved all temporary projector members to a private class,
so even recursive block() calls will not affect each other
(there is no new performance penalty as block() call always
recomputes the temporary control point matrix anyway)
2016-09-01 18:25:01 +08:00
Bernhard Ströbl
7e92d09c5f [processing] Add help for Eliminate sliver polygons 2016-09-01 10:55:08 +02:00
Hugo Mercier
a86611b626 Cleanup layer dependency api 2016-09-01 09:58:37 +02:00
Martin Dobias
6bb291f2d6 Raster projector constructor cleanup
Marked raster interface as uncopiable (it should have always been uncopiable)
2016-09-01 15:38:58 +08:00
Andrea Aime
a25b0257a5 Export map level scale based dependencies in most vector symbology 2016-09-01 07:40:56 +02:00
Nyall Dawson
56b77db88c [FEATURE][processing] Add choice of simplification method to simplify
This change allows users to choose which method to use when running
the simplify geometries algorithm, with choices of the existing
distance based (Douglas Peucker) algorithm, area based (Visvalingam)
algorithm and snap-to-grid.

Visvaligam in particular usually results in more cartographically
pleasing simplification over the standard distance based methods.
2016-09-01 08:22:18 +10:00
Nyall Dawson
fbd6618d4a Add missing sip binding 2016-09-01 08:04:39 +10:00
Nyall Dawson
5d97d03ad5 [processing] Fix simplify alg handling of null goemetry, add tests 2016-09-01 07:50:02 +10:00
Nyall Dawson
f9e508c566 [processing] More efficient point count for simplify algorithm 2016-09-01 07:42:29 +10:00
Hugo Mercier
bd3cf76f5f Merge pull request #3320 from mhugo/fix_snapping2
Data dependency between layers + snapping fix
2016-08-31 15:46:18 +02:00
Hugo Mercier
0749ba43ba Rework layer dependencies
A new class QgsMapLayerDependency allows to represent different kinds
of dependencies between layers.
2016-08-31 14:40:13 +02:00
Hugo Mercier
1a5a7c5905 [Feature] Data dependencies between layers
This allows to declare data dependencies between layers. A data
dependency occurs when a data modification in a layer, not by direct
user manipulation may modify data of other layers.
This is the case for instance when geometry of a layer is updated by a
database trigger after modification of another layer's geometry.
2016-08-31 09:22:09 +02:00
Juergen E. Fischer
a9464d7c94 db manager: don't consider added layer w/o a dataProvider
(cherry picked from commit 28aa9ebdb75eb099b83a3596b3f3c5c6e5c6f591)
2016-08-30 20:57:00 +02:00
Nyall Dawson
15dd29564c Fix Capitalize First Letter fails with curved labels (fix #14875)
Instead of using QFont's inbuilt capitalization support, which
applies only on rendering and accordingly fails for curved
labels which are drawn one character at a time, we now manually
capitalize label text while registering features.

The capitalize first method from Qt was reimplemented in QgsStringUtils
(together with what I expect is better handling of unicode characters
over the Qt method).

This change also makes it possible to implement other capitalization
methods not directly supported by Qt
2016-08-30 15:34:05 +10:00
Nyall Dawson
97d7b7339e Move storage of field alias and default value to QgsField
This is a partial implementation - QMaps are still used internally
within QgsVectorLayer to track the alias/default values
between attribute edit operations.

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:55 +10:00
Nyall Dawson
99405864ca Add a changed signal to QgsEditorConfigWidget
And update default value expression preview whenever editor
config changes

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:52 +10:00
Nyall Dawson
4d5bae22b8 [FEATURE] Client side default field values
Allows an expression to be set for a vector layer field which
is used to evaluate a default value for this field.

A new method,
QgsVectorLayer::defaultValue( int index,
                              const QgsFeature& feature = QgsFeature(),
                              QgsExpressionContext* context = nullptr )
has been added which evaluates the default value for a given field
using the optionally passed feature and expression context. This
allows default values to utilise properties of the feature
which exist at the time of calling, such as digitized geometries.
The expression context parameter allows variables to be used
in default value expressions, making it easier to eg insert
a user's name, current datetime, project path, etc

Default values are set using QgsVectorLayer::setDefaultValueExpression()
and retrieved using defaultValueExpression()
2016-08-30 12:39:55 +10:00
Nyall Dawson
7dea9700a6 [FEATURE] Substitution list support for labeling
Adds the ability to specify a list of text substitutes to make
which apply to label text. Eg abbrevating street types.

Users can export and import lists of substitutes to make
reuse and sharing easier.
2016-08-30 12:39:54 +10:00
Matthias Kuhn
a529b448e7 Revert "Merge pull request #3338 from pvalsecc/editor_widgets_selection"
This reverts commit bbafbf48872eda48a2be8876cc89a0770552c6ad, reversing
changes made to 13ac0434e10fc7edd1eca665ea7c8b6cb5fd212d.
2016-08-29 19:22:04 +02:00
Matthias Kuhn
b1448233e9 Move QgsMapLayerProxyModel and QgsMapLayerProxyModel to core
Because it's also useful for non-widget applications
2016-08-29 18:43:20 +02:00
Matthias Kuhn
bbafbf4887 Merge pull request #3338 from pvalsecc/editor_widgets_selection
Smarter default edit widgets with plugins to pick them
2016-08-29 17:14:14 +02:00
volaya
7884e50c31 [processing] fixed dialog for selecting scripts 2016-08-29 14:13:49 +02:00
Patrick Valsecchi
24bde35ce6 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-08-29 07:42:50 +02:00
Patrick Valsecchi
db91330b66 Avoid back and forth with WKB in rendering 2016-08-29 06:55:52 +02:00
Nyall Dawson
9fa4e776db [FEATURE][processing] Extract nodes algorithm now saves node
index, distance along line and angle at node

Also correctly handles null geometries
2016-08-29 11:02:14 +10:00
Nyall Dawson
986b5313ed Add QgsGeometry method to get bisector of angle at vertex
Sponsored by Andreas Neumann
2016-08-29 11:01:52 +10:00
Nyall Dawson
8db9284cb3 [FEATURE][processing] Optimised points along geometry algorithm
Supports also polygon geometries, handles null geometries,
and records the original line angle along with the distance
for each point.
2016-08-29 11:01:48 +10:00
Nyall Dawson
93c7f5f8b2 Add geometry methods for interpolating angle along geometry
Sponsored by Andreas Neumann
2016-08-29 08:57:10 +10:00
Juergen E. Fischer
420311e7f1 processing: fix population of commander combobox (fixes #15283)
(cherry picked from commit d3882d5)
2016-08-28 23:00:10 +02:00
mhugent
19dea08cf1 Merge pull request #3411 from mhugent/feature_info_segmentized_geometry
[FEATURE]: possibility to segmentize feature info geometry in server
2016-08-25 17:39:04 +02:00
Nyall Dawson
e71e743c9d Merge pull request #3432 from nyalldawson/ramps
Color ramp API improvements, fixes + some style dock inlining
2016-08-25 20:57:42 +10:00
Alexander Bruy
57b5a7c843 Merge pull request #3431 from arnaud-morvan/processing_batch_none
[processing] do not set "None" value in batch panel string widgets
2016-08-24 14:36:06 +03:00
Nyall Dawson
b225a82b3e [FEATURE] Make color brewer and limited random ramp editors show
inline in style panel
2016-08-24 21:01:03 +10:00
Nyall Dawson
b7716aa7fb Docs + cleanups for color ramp dialogs 2016-08-24 21:01:03 +10:00
Nyall Dawson
cf9292cc6d Color ramp dialogs no longer edit ramps in place
Now the dialogs use a copy of the ramp, and the edited
ramp is retrieved by calling ramp() on the dialog after
it is executed.

Avoids pointer lifetime issues by storing and working
on a ramp pointer which the dialog does not have ownership
on.

Also fix a bunch of leaks relating to cloning color ramps.
2016-08-24 21:01:03 +10:00
Nyall Dawson
7413db79b0 Rename color ramp dialogs to match new ramp class names 2016-08-24 21:01:03 +10:00
Nyall Dawson
932e469e5f Rename color ramp classes to more sensible names
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp

These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
2016-08-24 21:01:03 +10:00
nirvn
2a326ef8ad [FEATURE] support aggregation of geometry
This feature adds a 'collect' aggregation method resulting in a
single multipart geometry from a list of geometries. This is exposed
in the expression engine via the existing aggregate() function,
as well as a new collect() function.
2016-08-24 08:39:05 +07:00
Nyall Dawson
5735be131f [FEATURE] Make map unit scaling dialog show inline in style dock 2016-08-24 07:51:03 +10:00
Alexander Bruy
6475fd2129 fix typo 2016-08-24 00:03:07 +03:00
Nyall Dawson
e0229ad8c7 Merge pull request #3423 from nyalldawson/remove_deprecated
Remove unused QgsProvider(Count|ExtentCalc)Event classes
2016-08-24 06:59:41 +10:00
arnaud.morvan@camptocamp.com
f0413e36d6 Do not set "None" value in batch panel string widgets 2016-08-23 17:52:10 +02:00
Denis Rouzaud
f5aa28bb32 rename QgsFieldProxyModel::Filter All to AllTypes 2016-08-23 15:42:37 +02:00
Denis Rouzaud
7fdade1a3a remove some deprecated methods, rename QgsAnnotation::mapPositionFixed() to hasFixedMapPosition() 2016-08-23 15:00:56 +02:00
Alexander Bruy
eb308a604d fix open() call 2016-08-23 15:49:03 +03:00
volaya
008d3cd79a [processing] fixed extent selection from batch processing interface
fixes #15408
2016-08-23 14:41:20 +02:00
Alexander Bruy
3711a17066 add missed codecs import 2016-08-23 15:18:28 +03:00
Alexander Bruy
d7634bafff remove unused imports 2016-08-23 15:01:39 +03:00
Alexander Bruy
993aa842fb forgot to remove import 2016-08-23 13:34:51 +03:00
Alexander Bruy
6a7fa7dd5a [processing] add missed error() method 2016-08-23 11:25:14 +03:00