32633 Commits

Author SHA1 Message Date
Denis Rouzaud
1602c02df7 Merge pull request #3009 from pblottiere/magnifier
[FEATURE] add a map canvas magnifier
2016-05-19 06:30:07 +02:00
Nyall Dawson
daa23b59fc Merge pull request #3078 from 3nids/scaledenomhelp
Precise that scale function returns the denominator and not the scale itself
2016-05-19 13:46:12 +10:00
Nyall Dawson
23a3a7717e Cleaner API for selecting features in QgsVectorLayer
- add selectByRect( QgsRectangle&, SelectBehaviour) and
selectByIds( QgsFeatureIds, SelectBehaviour) for selecting
by rect and ids respectively, with options to add to selection/
remove from selection/intersect with current selection
- deprecate select( QgsRectangle ) and setSelectedFeatures in
favour of new methods
- add unit tests
2016-05-19 12:30:32 +10:00
Nyall Dawson
1767d3b073 [processing] Use QgsVectorLayer::selectByExpression for select by expression alg 2016-05-19 10:40:18 +10:00
Nyall Dawson
b951d5a54d [FEATURE] new method QgsVectorLayer::selectByExpression(...)
Makes it simple for scripts to select by expression. The method
also accepts a parameter which dictates whether matching features
are added to an existing selection, removed from the selection
or intersected with the current selection.

The existing code from the select by expression dialog has been
moved to QgsVectorLayer, and optimised for maximum possible speed.

Also added unit tests.
2016-05-19 09:11:00 +10:00
Nyall Dawson
7187148afb Set expression context for geometry generator builder (fix #14833) 2016-05-19 08:50:03 +10:00
volaya
b4e2354163 [processsing] removed unused code 2016-05-18 15:14:29 +02:00
Blottiere Paul
f15197da73 add unit test for scale 2016-05-18 14:40:47 +02:00
Blottiere Paul
d23a110cb6 move magnification in map settings 2016-05-18 14:40:41 +02:00
volaya
d390ebdceb [processing] show script in toolbox even if it contains errors 2016-05-18 14:24:46 +02:00
volaya
f001ac11f7 [processing] fixed repaint in set vector style algorithm 2016-05-18 14:24:45 +02:00
Radim Blazek
bbaef371cb [GRASS] close vector map if no more users, fixes #14668 2016-05-18 14:03:51 +02:00
volaya
bfa90a9125 [processing] fixed toolbox updates 2016-05-18 12:08:34 +02:00
Blottiere Paul
95038b143d scale is the same whatever the level of magnification 2016-05-18 11:42:22 +02:00
volaya
fc08535429 Merge pull request #3044 from arnaud-morvan/processing_output_vectortable
Processing - Output tables with no geometry through OutputVector
2016-05-18 11:05:23 +02:00
Denis Rouzaud
69a8c381ab Precise that scale function returns the denominator and not the scale itself 2016-05-18 10:43:19 +02:00
Martin Dobias
a9c1996bbc Merge pull request #3064 from wonder-sk/composer-map-follow-preset
Composer map to follow a visibility preset
2016-05-18 11:08:43 +08:00
Martin Dobias
292a8a4fc1 Fix updates of preset combo box when presets get changed 2016-05-18 09:56:21 +08:00
Nyall Dawson
5dd88c990b Avoid crash in style dock when layer is removed 2016-05-18 11:12:16 +10:00
Nyall Dawson
46fb193eed Fix warnings 2016-05-18 11:12:16 +10:00
Nathan
773212b241 [color button] add colour wheel to right click menu 2016-05-18 10:33:45 +10:00
Nathan
dc9b56e2c1 [styledock] scroll area for symbol selector widget 2016-05-18 10:12:45 +10:00
Simon Chenery
82d465cd94 Save annotations to project.qgs in creation order (fix #14812)
Save annotations to project file in the order they were loaded or
created, so that annotations have the same display order each
time the project is opened.
2016-05-18 10:08:35 +10:00
Blottiere Paul
842be91e61 remove spin box background color 2016-05-18 02:01:28 +02:00
Blottiere Paul
eb9ab8a4d9 add unit test for extent 2016-05-18 01:55:44 +02:00
Nathan
0ff10aeb0e [styledock] more widget changes 2016-05-18 09:50:49 +10:00
Nyall Dawson
e92dc26c68 Followup feeeaf0, add unit tests 2016-05-18 09:33:17 +10:00
Martin Dobias
feeeaf0e53 [FEATURE] Extend linestring geometries with reshape tool
If the reshape line starts or ends at a linestring geometry's
endpoint, such geometry will be extended (previously no action
would be done).
2016-05-18 09:23:30 +10:00
Nyall Dawson
b23bae74b2 Fix warning 2016-05-18 08:50:38 +10:00
Juergen E. Fischer
04176350ec fix about box (followup 0b940cac, fixes #14832) 2016-05-17 22:03:30 +02:00
Even Rouault
aa66bc6a20 Merge pull request #3076 from rouault/delimitedtext_qt5_fix
Delimited text provider: fix parsing of subset URL parameter with QT 5 and fix tests
2016-05-17 17:00:36 +02:00
Even Rouault
8ee697bf2d Vector layer save as: usability tunings related to attribute selection
- The group is renamed as 'Select fields to export and their export options'
- It has no longer a checkbox. It is just collapsible. So
  QgsVectorLayerSaveAsDialog::attributeSelection() is deprecated and always
  return true.
- For most formats, all attributes are selected by default
- For CSV/XLSX/ODS, if they have edit widgets, the corresponding checkbox in
  "Replace with displayed values" column is also checked by default.
- For DXF, keep existing behaviour: attributes are unchecked and not checkable
- For KML, keep existing behaviour: attributes are unselected by default
2016-05-17 16:57:45 +02:00
arnaud.morvan@camptocamp.com
7847f971d4 Processing - Adapt RefactorFields to work on tables as well as vector layers 2016-05-17 14:16:16 +02:00
arnaud.morvan@camptocamp.com
afbe914114 Processing - Support OutputVector with no geometry in GUI 2016-05-17 14:16:16 +02:00
arnaud.morvan@camptocamp.com
fc5f70c6f5 Processing - Support tables with no geometry in OutputVector 2016-05-17 14:16:15 +02:00
arnaud.morvan@camptocamp.com
63d23d2905 Processing - Support no geometry in VectorWriter 2016-05-17 14:16:15 +02:00
Nathan
a5ef216fbc [styledock] Better layouts for marker widgets
- Grid vs Form layouts
- Align DD buttons for better look
2016-05-17 21:56:49 +10:00
Juergen E. Fischer
6663a4cc82 osgeo4w: add qt plugin directories to browser with grass (followup b758a8c) 2016-05-17 12:15:12 +02:00
volaya
a7f41dc4c5 [processing] do not reject string parameters if they contain an unparsable expresion 2016-05-17 08:06:56 +02:00
Nathan Woodrow
57dc3c7eff [mssql] Fix layer not showing with invalid geometry 2016-05-17 15:47:50 +10:00
Martin Dobias
7eb05e2c3c Fix composer map tests 2016-05-17 12:52:32 +08:00
Martin Dobias
deee8e290e [FEATURE] Composer map to follow a visibility preset (fixes #13418)
This adds a new option in composer map properties:
"Follow visibility preset" with a combo box to choose the active preset.

This is an alternative to "lock layers" (and "lock layer styles") functionality
which would just copy preset's configuration, while the new option links to preset.

The difference is that when a preset is updated, composer map will automatically
pick the new configuration when following the preset, while there is no update
if "lock layers" (and "lock layer styles") option is used.
2016-05-17 12:52:32 +08:00
Matthias Kuhn
8c402bcf42 Remove child features when parent's add feature form is cancelled 2016-05-17 06:35:55 +02:00
Nyall Dawson
307aabd66a [FEATURE] Aggregates for expressions
This commit adds a number of different forms of aggregates to
the expression engine.

1. Aggregates within the current layer, eg sum("passengers")
Supports sub expressions (ie sum("passengers"/2) ), group by
( sum("passengers", group_by:="line_segment") ), and optional
filters ( sum("passengers", filter:= "station_class" > 3 ) )

2. Relational aggregates, which calculate an aggregate over
all matching child features from a relation, eg
relation_aggregate( 'my_relation', 'mean', "some_child_field" )

3. A summary aggregate function, for calculating aggregates
on other layers. Eg aggregate('rail_station_layer','sum',"passengers")
The summary aggregate function supports an optional filter,
making it possible to calculate things like:

aggregate('rail_stations','sum',"passengers",
  intersects(@atlas_geometry, $geometry ) )

for calculating the total number of passengers for the stations
inside the current atlas feature

In all cases the calculations are cached inside the expression
context, so they only need to be calculated once for each
set of expression evaluations.

Sponsored by Kanton of Zug, Switzerland
2016-05-17 10:53:25 +10:00
Nyall Dawson
ea066599a1 [relations] Add method to manager to retrieve relations by name
Also
- Begin unit tests for QgsRelationManager
- Make project optional when constructing QgsRelationManager
2016-05-17 10:53:25 +10:00
Nyall Dawson
84fc3c3b3d Implement method for caching values within expression contexts
Can be used to store the results of expensive sub-expression
calculations (eg layer aggregates), so that future expression
evaluation using the same context does not have to recalculate
the cached values.
2016-05-17 10:53:24 +10:00
Nyall Dawson
821134ca91 Add method to convert string to aggregate type 2016-05-17 10:53:24 +10:00
Nyall Dawson
dcc047af49 Add possibility to handle aggregate calculation at data provider
(not implemented for any providers yet)
2016-05-17 10:53:24 +10:00
Nyall Dawson
50e41c8133 New utility class QgsAggregateCalculator, simplifies calculating
aggregates from vector layer fields and expressions
2016-05-17 10:53:24 +10:00
Nyall Dawson
1c45b940a8 Add calculation of number of null values to QgsStatisticalSummary 2016-05-17 10:53:04 +10:00