8203 Commits

Author SHA1 Message Date
Nyall Dawson
a3dd380d35 [needs-docs] Composer maps default to a "use project CRS" setting
And overriding projection is only done if user has manually
chosen a different CRS from the list.

This means that templates and compositions in server can still
adapt to follow the project CRS, but if desired specific map
items (eg an overview map) can use the CRS override to always
show in a particular CRS.
2017-01-18 12:30:47 +10:00
Nyall Dawson
9a6d714061 [FEATURE][composer] Allow choice of CRS for map items
This allows the CRS for map items to differ from the canvas/project
CRS. It also allows different map items to have different CRS,
eg an overview map can be set to a different CRS to the main map.

An unfortunate side effect of this change and the ongoing work
to separate compositions from canvas is that datum transforms
are no longer supported in composer. This cannot be fixed until
the datum transform store is rewritten to not depend on canvas
(ie, it's also broken for upcoming multi-canvas work)
2017-01-17 19:18:47 +10:00
Nyall Dawson
305f9f0e98 Remove some more QgsComposition::mapSettings use 2017-01-17 15:44:46 +10:00
Nyall Dawson
e3ad5b1e3b [composer] Remove more use of composition map settings
Use relevant composer map item CRS instead of composition mapsetting's
CRS. For items directly linked to a map (eg scalebar, legend) we
use that map's CRS, for others (eg labels, html items) we use the
composition's reference map CRS.

(Note that the CRS cannot be set for a map, and is still currently
linked to the canvas CRS. Fixing that is a future TODO.)
2017-01-17 13:23:12 +10:00
Denis Rouzaud
b119744773 replace cancelling, cancelled and cancellation by canceling, canceled and cancelation, respectively (#4000)
* replace cancelling and cancelled by canceling and canceled, respectively

see https://github.com/qgis/qgis3_UIX_discussion/issues/19

* replace cancellation by cancelation
2017-01-16 22:27:14 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Denis Rouzaud
bf22cbfa9d [spellcheck] fix case detection + some fixes 2017-01-16 10:56:42 +01:00
rldhont
474252a6f3 Merge pull request #3985 from dmarteau/revisit_server_exceptions
Server: revisit server exceptions
2017-01-16 10:05:20 +01:00
Martin Dobias
b340d7bdb6 Add willBeDeleted() signal to QgsMapLayer (#3998)
This allows pieces of code that depend on map layers to listen directly
to the layer's notification rather than having to listen to project's
layersWillBeRemoved signal (and cycle through the whole list)
2017-01-16 16:51:44 +08:00
Nyall Dawson
3274e1926f Remove more unused raster scale factor handling 2017-01-16 16:50:54 +10:00
Nyall Dawson
48797fa9b7 Remove unused (and not useful) QgsRenderContext::constPainter getter
Since const QPainters cannot be painted to, there's no value in
leaving this in the API
2017-01-16 16:19:00 +10:00
Nyall Dawson
430af90cfa Remove rasterScaleFactor/setRasterScaleFactor from QgsRenderContext
These were not being used by QGIS code (always left at default 1.0
value), and removing them from the api allows us to simplify lots
of code. It also makes QgsRenderContext scaling much less confusing.
2017-01-16 16:18:58 +10:00
Nyall Dawson
49411210b0 [composer] Remove QgsComposerMap::storeCurrentLayerSet
This method was used to sync the canvas layers to a composer map.
The logic has been moved to app to avoid a dependancy between
compositions and the main map canvas
2017-01-16 15:52:19 +10:00
Nyall Dawson
8a9cee0fb6 [composer] Use reference map when creating render context for
draw shape/arrow/nodes/paper symbols

This commit removes some more instances where changes in the
canvas affect compositions. Previously the symbols drawn
in shape/arrow/etc items were using the scale from the canvas.
This meant that the appearance of these items in composer
would change depending on canvas zoom if they used symbols
with map unit sizes.

Now they take their map scale from the composition's reference
map. While this has the nice side effect that now map units
can be used in the appearance of these items and they're
guaranteed to match up with the reference map item, the main
intention here is to remove more of the forced links between
compositions (core) and the main canvas (app).
2017-01-16 15:52:19 +10:00
Nyall Dawson
8a722d2981 Move QgsSymbolLayerUtils::createRenderContext to QgsRenderContext::fromQPainter
This method is useful in many contexts outside of symbology
2017-01-16 15:52:19 +10:00
Nyall Dawson
e0934d7766 [composer][needs-docs] Rename "world file map" option to "reference map"
This option will be used for more than just world file generation,
and instead will indicate which map should be considered the master
map for the composition from which any composer properties
calculating map units will derive the scale from.
2017-01-16 15:52:19 +10:00
David Marteau
8b0526d678 Revisit server exceptions
- Add server exception base class
    - Enable per service exception definition
    - Handle QgsException gracefully (error 500)
    - Handle OGC exception versioning
2017-01-14 22:17:45 +01:00
Nyall Dawson
6ffe50704f [composer] Remove support for upgrading pre 2.2 project atlas map
settings

Open the project in a recent 2.x release and resave to upgrade
the project
2017-01-14 19:14:48 +10:00
Nyall Dawson
b5480633e4 Standardise names for static variables
All non-const variables are prefixed with "s", all const
statics are ALL_CAPS
2017-01-14 16:40:24 +10:00
Nyall Dawson
231f6af0e1 Don't return const references to implicitly shared Qt classes
Instead return the inexpensive copies. Should provide extra safety
against issues like #14822

(refs #14822)
2017-01-14 15:53:45 +10:00
Hugo Mercier
ef8a135f1b Merge pull request #3987 from mhugo/servermultithread
[server] parallel map rendering
2017-01-13 16:16:14 +01:00
Alexander Bruy
49b6c5f342 [processing] more fixes to "selection" type settings handling 2017-01-13 16:43:16 +02:00
Alexander Bruy
3605d4fce3 Revert "[processing] handle string settings from previous install (followup 03eaad5bfd)"
This reverts commit daf65d8fdf3f8eb238c07f682c4d9a508e613f7a.
2017-01-13 16:38:30 +02:00
Alexander Bruy
daf65d8fdf [processing] handle string settings from previous install (followup 03eaad5bfd) 2017-01-13 15:50:38 +02:00
Alexander Bruy
f01b2f0597 [processing] extent is mandatory parameter for interpolation algorithms 2017-01-13 15:50:38 +02:00
Alexander Bruy
ce88da6eb9 [processing] raise error if cellsize is not defined in interpolation
algorithm
2017-01-13 15:50:38 +02:00
matteo
8994877717 processing zonal statistics 2017-01-13 12:37:51 +01:00
matteo
c259070102 processing single to multi test 2017-01-13 12:37:51 +01:00
matteo
7958db29d1 processing mean coordinates test 2017-01-13 12:37:50 +01:00
matteo
2c6649358a processing points along lines test 2017-01-13 12:37:50 +01:00
matteo
94856b59b1 processing qgis count points weighted 2017-01-13 12:37:39 +01:00
matteo
590abf0a44 processing qgis countsuniquepoints test 2017-01-13 12:37:39 +01:00
Blottiere Paul
932d9fb5d3 [server] parallel map rendering 2017-01-13 09:24:31 +01:00
Alexander Bruy
8f291a92df [processing] allow other output formats than shapefile in GDAL
polygonize
2017-01-13 09:16:19 +02:00
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Alexander Bruy
b6632b0731 [processing] workaround for fixing broken build 2017-01-12 14:49:26 +02:00
Alexander Bruy
75a7637838 [processing] fix typo in method name 2017-01-12 12:54:13 +02:00
Alexander Bruy
03eaad5bfd [processing] fix handling of the "selection" type settings 2017-01-12 12:52:04 +02:00
Nyall Dawson
b7706b358f Rename some static variables for consistency
Ensure non-const statics have "s" prefix and const statics
are in all caps
2017-01-12 15:17:47 +10:00
Alexander Bruy
6214d4d446 [processing] fix wrong parameter definition (fix #16063) 2017-01-11 19:23:08 +02:00
Alexander Bruy
80d0d05b18 [FEATURE][processing] remove TauDEM provider from core Processing
TauDEM is quite specific set of tools and it requires installation of
some additional tools. So we decide to turn it into separate provider,
reducing core codebase size and maintenance efforts.

Tagged as feature to not forget mention in changelog and documentation
2017-01-11 15:15:37 +02:00
Denis Rouzaud
4467487e1c respect CamelCase for enums and their values 2017-01-11 14:10:11 +01:00
Alexander Bruy
6be4505493 [processing] update OTB's white- and blacklist. Drop obsolete 3.x
versions and add latest 5.8.0
2017-01-11 13:43:17 +02:00
Alexander Bruy
371fe1dd48 [processing] add new MultiImageSamplingRate algorithm from OTB 5.8.0 2017-01-11 13:42:29 +02:00
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
Nyall Dawson
e656c63ab7 Remove duplicate QgsFeature::setFeatureId method
Leave just QgsFeature::setId and document api break
2017-01-11 10:05:31 +01:00
Nyall Dawson
f2032ea268 [FEATURE] item_variables expression function inside compositions
This adds a new item_variables expression function when expressions
are used inside a composition context.

The function takes a single argument, the id for an item inside
the composition, and returns a map of variable name to value
for that item.

This allows you to do things like insert text in a label fetching
properties of another item in the composition, eg

Insert scale of map into a label:

map_get( item_variables( 'map'),'map_scale')

Insert x coordinate of map center into a label:

x(map_get( item_variables( 'map'),'map_extent_center'))
2017-01-11 12:26:32 +10:00
Nyall Dawson
d25fcec03d Add method to retrieve variables from a QgsExpressionContext as a QVariantMap 2017-01-11 12:25:37 +10:00
Nyall Dawson
86e1138a04 [processing] Correctly handle when no feedback object is passed 2017-01-11 11:11:11 +10:00
Nyall Dawson
ede452be85 [processing] Port feedback object to c++
Algorithms are now passed a QgsProcessingFeedback object
instead of the loosely defined progress parameter.
2017-01-11 11:11:10 +10:00