2365 Commits

Author SHA1 Message Date
Juergen E. Fischer
6e66eef1ef add missing copyright headers 2016-06-03 10:33:09 +02:00
Sandro Mani
1828563331 Add QgsWKBTypes::zmType test 2016-06-02 13:36:08 +02:00
Hugo Mercier
efd32ff2a8 Arrow symbol layer: option to repeat or not the arrow on the line 2016-06-02 09:52:03 +02:00
Hugo Mercier
6c9b588906 Arrow symbol layer: halved arrows and head width/height
The head size can now be configured by its width and its height
Arrows can also be rendered as "half arrows"
2016-06-02 09:52:03 +02:00
Nyall Dawson
0e03115d33 Add support for field renaming in QgsVectorLayer and edit buffer 2016-06-02 17:09:46 +10:00
Nyall Dawson
ccc67ef7a5 Rename attributes support for postgres provider 2016-06-02 17:09:45 +10:00
Nyall Dawson
251474a62e Add support for attribute renaming to OGR provider 2016-06-02 17:09:45 +10:00
Nyall Dawson
58cc89019c [FEATURE] Add support for attribute renaming to QgsVectorDataProvider
Implemented in memory layer provider only, not yet supported
in edit buffer or configurable in GUI
2016-06-02 17:09:45 +10:00
Nyall Dawson
7af33661eb Fix leak in test 2016-06-02 13:18:56 +10:00
Nyall Dawson
e0c87ffe6b [FEATURE] Move QgsShortcutsManager, QgsConfigureShortcutsDialog to gui
This allows plugins to reuse the shortcuts manager if they
want to add the ability for users to customise their shortcut
key sequences.

The shortcut manager has been extended to also handle customisation
of QShortcut objects as well as QActions.
2016-06-02 10:25:16 +10:00
Even Rouault
fb49f700f2 [OGR provider] Fix deleteAttributes() when mFirstFieldIsFid 2016-06-01 23:31:06 +02:00
Juergen E. Fischer
9efbf28d71 spelling fixes 2016-06-01 23:22:15 +02:00
Even Rouault
73ab289e1b Fix Coverity warnings in testqgsogcutils.cpp and testqgsgdalprovider.cpp 2016-06-01 19:20:15 +02:00
Blottiere Paul
ea097becae replace "" by QString() 2016-05-31 20:16:22 +02:00
Blottiere Paul
9ddb441855 fix test doc 2016-05-31 20:16:21 +02:00
Blottiere Paul
aba02f11e0 rename constraint to expression for method's name 2016-05-31 20:16:21 +02:00
Blottiere Paul
020d20a968 [FEATURE] constraints on widgets 2016-05-31 20:16:21 +02:00
Even Rouault
a023f55b9d Merge pull request #3148 from rouault/wfs_better_behaviour_with_wrong_capability_extent
[WFS Provider] Implement workarounds to better behave when extent reported by capabilities is wrong
2016-05-30 17:46:35 +02:00
Even Rouault
86f6e7eb0d Merge pull request #3142 from rouault/identify_result_float_precision
Do not print excessive decimals when identifying value on a Float32 raster
2016-05-30 17:46:08 +02:00
Even Rouault
4b130cbf42 Merge pull request #3134 from rouault/do_not_write_nodata_if_not_existing
Nodata related fixes
2016-05-30 17:45:48 +02:00
Nyall Dawson
ddd37ad8bd Merge pull request #3138 from sbrunner/limit
Add and fix WFS server MAXFEATURES test
2016-05-30 12:15:32 +02:00
Nyall Dawson
00502620c0 [FEATURE] Allow web map style shift-drag zoom
When certain map tools are active, you can hold down shift
and drag a rectangle on the map to zoom to that area. This
is enabled for the map tools which are not selection tools
(since they use shift for adding to selection), and edit
tools.

Gracias a Girona!
2016-05-30 19:39:57 +10:00
Matthias Kuhn
ebf434037f Merge pull request #3077 from pvalsecc/legend_url
WMS: Better logic to pick the legend URL
2016-05-30 10:17:58 +02:00
Stéphane Brunner
47cf9240b3 Add and fix WFS server MAXFEATURES test
It was not working when we do a POST with an XML
2016-05-30 07:33:51 +02:00
Even Rouault
2ac20c665f [WFS Provider] Implement workarounds to better behave when extent reported by capabilities is wrong
Some servers like http://geodata.nationaalgeoregister.nl/bag/wfs report wrong layer
extent in their GetCapabilities response.

This commit implements a work around :
- in the 'Request only features intersecting extent' mode, if no feature is returned
  in a BBOX enclosing the GetCapabilities extent, then query a single feature to
  initialize the extent. The user will then to zoom again on layer and zoom out.
- in the other mode, the extent is updated with the feature geometry extent as soon
  as features come from the server, and the user can zoom on layer regularly to se
  it updated.
2016-05-29 18:02:53 +02:00
Nyall Dawson
5377952a1a [FEATURE] ctrl+wheel on canvas results in smaller zoom
Holding down ctrl while using the mouse wheel to zoom in or
out now results in a finer zoom. This behaviour brings canvas
into line with composer.
2016-05-30 01:50:13 +10:00
Nyall Dawson
aa53cfe387 [composer] Prevent zooming out/in too far
Would cause issues when scale became 0 and it was impossible
to further interact with the composer.
2016-05-30 01:50:13 +10:00
Even Rouault
f3b635dcbb [GDAL provider] Ignore nodata value that are not representable in the data type.
This is related to commit e0d38ba3f912b7ae6b34e66a44e529ec37394458. In case
we have to deal with an inconsitent raster where the nodata value is set to
a value not representable in the data type, ignore it. Otherwise, a NaN value
in a Byte raster would be cast as 0.
2016-05-29 12:55:23 +02:00
Patrick Valsecchi
69bed21837 WMS: Better logic to pick the legend URL
QGIS had two problems:
1) It was using the specified legend URL only if its mime type was matching
   the layer's mime type. There is no reason for that.
2) When QGIS was using the default layer (empty string), it was not even
   trying to find out in what style to pick the legend URL.
2016-05-29 12:47:57 +02:00
Patrick Valsecchi
e79a327ab7 WMS GetCapabilities: override parent's style if they have the same name
When there is a layer group with several sub-layers, the group has a
"default" style and the sub-layers each have a "default" layer. QGIS
was showing two "default" styles for the sub-layers, which would be
confusing to the user and could pick the wrong legend for the
sub-layer if the user picked the wrong entry (the first one).

Had to create a static lib for wmsprovider in order to unittest it.
2016-05-29 12:47:57 +02:00
Even Rouault
147a68c0a0 Do not print excessive decimals when identifying value on a Float32 raster
Was reported in https://lists.osgeo.org/pipermail/qgis-user/2016-April/036045.html
2016-05-29 12:43:20 +02:00
Nyall Dawson
1b06324d24 Fix failing server label test 2016-05-29 16:11:46 +10:00
Nyall Dawson
7cab60bc43 [FEATURE][expressions] If a feature is passed to a function
expecting geometry inputs, then use that feature's geometry
instead of throwing an error

eg

buffer(@atlas_feature,100)

or

buffer(get_feature('my_layer','id=54'))
2016-05-29 15:32:16 +10:00
Mathieu Pellerin
36ff0ba333 [FEATURE] add a char() function to the expression engine (#3137) 2016-05-29 14:38:53 +10:00
Nyall Dawson
bae8a0e5e0 [FEATURE] Georeference outputs (eg PDF) from composer
This commit makes composer automatically georeference outputs
(where output format makes this possible, eg TIF and PDF).

The existing option to create a world file has been separated
from the map selection for georeferencing. The new behaviour
is to always georeference outputs, and only create the
separate world file if that option is checked.
2016-05-29 00:46:39 +10:00
Nyall Dawson
bc779a06ed QgsActionManager: improve docs + add tests 2016-05-29 00:45:17 +10:00
Even Rouault
e0d38ba3f9 QgsRasterFileWriter::writeDataRaster(): do not set nodata on output when unneeded
Currently if the source raster has no nodata value, the writer will still write
nan as the output nodata value, ignoring the flag that specifies if there is a
nodata value or not. On a raster with byte data type, this will cause
confusion on reading since the nodata value will be somehow cast as 0.

Make QgsRasterChecker check for nodata consistency between source and target, and
add a test file that shows the issue.
2016-05-28 10:52:36 +02:00
Even Rouault
2861cf1dc3 QgsGdalProvider::buildPyramids(): do not crash if an invalid option is provided 2016-05-28 00:53:48 +02:00
Alvaro Huarte
6969a1a401 Fix travis errors 2016-05-25 22:53:01 +02:00
Alvaro Huarte
51f06edbf7 Allow override WkbPtr and define WkbSimplifierPtr class
This commit simplifies the geometry just before to paint it in the
current QPainter device.

This commit allows to override the '>>' operators of the QgsWkbPtr
class. Also, It defines a new QgsWkbSimplifierPtr class to automatically
simplify the input point stream.
2016-05-25 22:50:28 +02:00
Alessandro Pasotti
6b715c5bd6 Adapted test to new provider changes 2016-05-25 16:55:49 +02:00
Alessandro Pasotti
921069aef5 Renamed test 2016-05-25 16:55:49 +02:00
Alessandro Pasotti
92874025aa [server] WFS-T server and provider integration tests
Integration tests for WFS-T provider and WFS-T server.
The tests perform WFS-T CRUD operations on a QGIS Server
instance through WFS-T data provider.

Funded by Boundless
2016-05-25 16:55:49 +02:00
Matthias Kuhn
0627ac3f42 Followup f300715, adjust test 2016-05-25 16:03:48 +02:00
Nyall Dawson
fcaffa260f Make QgsCoordinateReferenceSystem implicitly shared 2016-05-25 15:41:04 +10:00
Nyall Dawson
4089cc5226 Add test for color button that setting color to transparent
will retain non-alpha color components
2016-05-25 15:41:04 +10:00
Nyall Dawson
f2b70cf5e2 Always mark features as valid when added to memory provider
For other providers features will automatically be made valid
through the proces of adding to the provider's storage itself
and then later retrieving via iterators. But the memory
provider uses a direct copy of the feature, so if we don't
explicitly mark features as valid the provider may be
returning features incorrectly marked as invalid.

...and add tests to ensure all providers always return valid
features
2016-05-25 15:41:04 +10:00
Nyall Dawson
8ddcf76d2a [FEATURE][expressions] Expanded support for date/time calcs
Adds support for date - date, time - time and datetime - datetime
type calculations which return an interval.
2016-05-24 17:18:45 +10:00
Nyall Dawson
7a8c3e0d2a Followup 73733a, fix crash when running invalid python strings 2016-05-24 05:02:55 +10:00
Nyall Dawson
1c4811fa12 Add Is Not Null and Is Not Between type search/filters 2016-05-24 00:26:15 +10:00