5361 Commits

Author SHA1 Message Date
Nyall Dawson
44143c1bf9 Restore a disabled test for Qt5 which works OK now 2018-03-29 13:26:51 +11:00
Nyall Dawson
8b59bdcc94 [layouts] Fix missing layer scope for atlas enabled items
Fixes #18525
2018-03-29 07:21:03 +11:00
Nyall Dawson
054470f032 Never show int/long attributes in scientific notation
Fixes #18508, #18302
2018-03-29 07:20:31 +11:00
Nyall Dawson
4bfc808ee6 Add some circle intersection and tangent utilities to QgsGeometryUtils 2018-03-27 17:44:25 +11:00
Nyall Dawson
4f16e01e97 Fix value map field formatter doesn't work
The configuration format was changed without updating the unit
tests to flag this failure.
2018-03-26 11:02:07 +11:00
Alessandro Pasotti
5eb9ab4813
Merge pull request #6644 from elpaso/gml-inverted-axis
Add axisOrder to QgsAbstractGeometry GML generators
2018-03-24 12:50:13 +01:00
Nyall Dawson
2eacc4c4b4 [FEATURE][layouts] Export project metadata in PDF/image exports
Includes project metadata in PDF exports, and supported image
based formats.

Image based metadata support depends on the format and the
Qt library's handling of each particular format (e.g. PNG
outputs are well supported).

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
1d4ff69553 Fix unit test 2018-03-22 16:13:30 +11:00
Nyall Dawson
a600b51bad [FEATURE][layouts] Export project metadata as SVG RDF metadata
Adds an option to include project metadata into SVG exports
generated from layouts, using the SVG RDF standard.

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
18408fa2c1 [FEATURE] Add expression context variables for project metadata
- @project_author
- @project_abstract
- @project_creation_date
- @project_identifier
- @project_keywords

Allows retrieval of project metadata through QGIS expressions

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
6ce184de79 Add tests for QgsMetadataWidget 2018-03-22 16:13:30 +11:00
Nyall Dawson
d293c5d0a0 Code shuffle to avoid duplicate code 2018-03-22 16:13:30 +11:00
Nyall Dawson
99faf06f60 Make project title getters/setters a shortcut to metadata title field
And silently upgrade old project titles to metadata titles
2018-03-22 16:13:30 +11:00
Nyall Dawson
bba3f6c6fe Add QgsProjectMetadata member to QgsProject 2018-03-22 16:13:30 +11:00
Nyall Dawson
09aca080ec Add new QgsProjectMetadata metadata class
For storing QgsProject metadata. Contains all metadata items
from QgsMetadataBase, plus adds author and creation datetime
metadata items.
2018-03-22 16:13:30 +11:00
Nyall Dawson
1e05de049a Update metadata validator for base class split 2018-03-22 16:13:30 +11:00
Nyall Dawson
a96d59a1a6 Create unit test for QgsMetadataBase 2018-03-22 16:13:30 +11:00
Nyall Dawson
a2ba566e2b Fix generation of world file when exporting canvas
Fixes #18491
2018-03-22 11:18:26 +11:00
Nyall Dawson
66c8a85b88 Fix incorrect display of coordinates in status bar 2018-03-21 22:20:43 +11:00
Nyall Dawson
9ab4d96362 [processing] Don't try to load algorithms for disabled providers
Fixes #18488
2018-03-21 08:45:38 +11:00
Alessandro Pasotti
84bdc92a8c Add axisOrder to QgsAbstractGeometry GML generators 2018-03-20 13:04:17 +01:00
Alessandro Pasotti
a160e7494c Reference file for the WFS endless loop test 2018-03-19 15:01:57 +01:00
Alessandro Pasotti
1b31e55871 [test] for WFS Fix endless loop
Greetings from Bonn!
2018-03-19 15:00:11 +01:00
Nyall Dawson
fa2c5aebb7 [FEATURE][processing] Import geotagged photos algorithm
This implements a new "import geotagged photos" algorithm
for processing. It allows selection of a folder which it
will scan for jpg files which have been geotagged and
creates a PointZ layer with the result, with attributes
for photo path, altitude, direction and timestamp.

Optionally the scan can be recursive and you can create
an optional table of photos which could not be read
or which were missing geotags.

The algorithm automatically sets the output table to
use an external resource widget to display the linked
photos in the attribute form.

[ALGCHANGE]
2018-03-16 15:08:29 +11:00
Nyall Dawson
435c14d1ee Unlikely attempt to stop flaky rule based renderer test crashing out 2018-03-16 08:18:36 +11:00
Nyall Dawson
7c0665a331 Clearer ownership, docs for rule based renderer 2018-03-16 08:18:36 +11:00
Luigi Pirelli
685adbf7e1
Merge pull request #6615 from elpaso/bugfix-16967-multi-in-value-relation
[bugfix] value relation widget with Allow multiple selection doesn't resolve
2018-03-15 17:09:45 +01:00
Luigi Pirelli
d771991a01
Merge pull request #6603 from slarosa/fix_18435
Fixes #18435: QGIS crash when deleting auxiliary layer
2018-03-15 15:15:55 +01:00
Alessandro Pasotti
4f05ed1dd7 [bugfix] value relation widget with Allow multiple selection doesn't resolve
Now it will accept arrays as well as string representations of arrays

Added a test

Fixes #16967 value relation widget with Allow multiple selection doesn't resolve the values anymore
2018-03-15 15:11:52 +01:00
Salvatore Larosa
74689dfe9d fix typo: followup 24ef27d079 2018-03-15 14:32:57 +01:00
Salvatore Larosa
24ef27d079 add unit test for setAuxiliaryLayer 2018-03-15 11:01:23 +01:00
Nyall Dawson
bd1d87ed86 [processing] Allow algorithms to set layer post-processors for
execution on generated layers after the algorithm (or parent
model) completes

This commit adds an interface for layer post-processing handlers
for execution following a processing algorithm operation.

Post-processing of a layer will ONLY occur if that layer is set
to be loaded into a QGIS project on algorithm completion.

Algorithms that wish to set post-processing steps for generated
layers should implement this interface in a separate class
(NOT the algorithm class itself!) and implement a method
to handle the layer post-processing.

This method always runs in the main thread and can be used to
setup renderers, editor widgets, metadata, etc for the given layer.

Fixes #17961
2018-03-15 17:55:25 +11:00
Nyall Dawson
9e351e80fc Fix flaky VirtualLayerTask test 2018-03-15 13:42:44 +11:00
Nyall Dawson
feb20a7a27 Add unit test for postgres layer metadata 2018-03-15 10:43:04 +11:00
Denis Rouzaud
4c1e19c080 fix constraints not checked when they should be (#6550) 2018-03-14 07:49:37 -04:00
Nyall Dawson
7e6796c657 By default, generate new layer colors from a random selection
in a preset palette

The palette is packaged as resources/new_layer_colors.gpl

TODO: allow users to set a different palette
2018-03-13 10:39:49 +11:00
Nyall Dawson
bc449c401b Move generation of default symbol random colors to
QgsColorSchemeRegistry

and add API to set a QgsColorScheme from which to pull
colors when creating a random symbol color.
2018-03-13 10:39:49 +11:00
Alessandro Pasotti
ea0c7058a5
Merge pull request #6576 from elpaso/bugfix-18292-extra-params-search
[server][bugfix] accept getfeatureinfo filter without h/w
2018-03-12 12:05:30 +01:00
Nyall Dawson
41d16a8491 Unit tests for straightDistance2d/sinuosity 2018-03-12 14:58:04 +11:00
Alessandro Pasotti
39778b16d8 Added test reference file for getfeatureinfo no width 2018-03-11 12:55:28 +01:00
Alessandro Pasotti
59e68d9e4a [server][bugfix] accept getfeatureinfo filter without h/w
When INFO_FORMAT is not an image format there is no
need to make image WIDTH and HEIGHT mandatory.

2.x accepted that, 3.x raised an exception.

This is a partial fix: SRS is still mandatory because
fixing this would require a deeper refactoring and
I believe we can live with it, because SRS will be
required if filters are combined with geometry filters,
while passing a WIDTH/HEIGHT when we don't want an image
back is always useless.

A test was also added.
2018-03-11 11:43:27 +01:00
Alessandro Pasotti
5281c8411d [test][server] Houskeeping: split getfeatureinfo
put it in its own test
2018-03-11 10:41:32 +01:00
Nyall Dawson
0c1ceb3900 [FEATURE][layouts] Data defined table source for attribute table items
When an attribute table is set to a "Layer features" source, this
allows the underlying vector layer from which to source features
to be data defined.

(All existing table attributes (column settings) are left intact,
so setting a data defined table to a layer with different fields
will result in empty columns in the table.)

Sponsored by Kartoza/Inasafe
2018-03-11 10:22:46 +11:00
Nyall Dawson
97324661c7 Add layout util to retrieve map layer from project by string
Considers both layer id (preferred) and layer names
2018-03-11 10:22:46 +11:00
Nyall Dawson
60afeadf44 Add QgsProjectDirtyBlocker and QgsProject.blockDirtying to prevent
project dirtying for the lifetime of an object

Python code can then call:

    project = QgsProject.instance()
    with QgsProject.blockDirtying(project):
      # do something

Use QgsProjectDirtyBlocker to prevent projects being marked as
dirty while creating a new project or while loading an existing
project -- avoids the titlebar temporarily showing the project
state as unsaved while it is being loaded.
2018-03-11 08:44:51 +11:00
Tudor Bărăscu
10cfca48d6 add server test for GetMap with styles and opacities
Covers https://issues.qgis.org/issues/15553 case
2018-03-09 13:20:20 +02:00
Nyall Dawson
00802e5cb2 Update test mask image 2018-03-09 13:34:40 +11:00
Nyall Dawson
8c780dc12f Add @project_home expression variable 2018-03-09 11:15:55 +11:00
Nyall Dawson
4e5c08e2b5 [FEATURE] Allow overwriting the project home path
This allows the project home path (which is used by the browser
to create the 'Project Home' item) to be set by users for a
project, instead of always matching the location where the project
is saved.

This allows users to set the project home to a folder which contains
data and other content, and is especially useful for organisations
where qgis projects are not stored in the root folder of a organisational
'project'.

Project home paths can also be set to relative paths, in which
case they will be relative to the project saved location.

The path can be set through the Project Properties dialog, or
by right-clicking on the Project Home browser item and
selecting 'set project home'

Sponsored by SMEC/SJ
2018-03-09 11:15:55 +11:00
Nyall Dawson
35b5c7820a Add test that AFS provider gets renderer by default 2018-03-07 16:28:47 +11:00