2047 Commits

Author SHA1 Message Date
Matthias Kuhn
c79aeba0db Python unittest.expectedFailure improvements
Raises an _UnexpectedSuccess exception
Takes a boolean parameter with a condition under which the test is
expected to fail
2016-02-26 13:40:53 +01:00
Matthias Kuhn
d8ad5a3d53 The app startup / plugin path test succeeds again 2016-02-26 13:40:39 +01:00
Nyall Dawson
b8c620a317 update test mask 2016-02-26 22:48:08 +11:00
rldhont
36b0c3c10a [BUGFIX][QGIS Server] WFS DescribeFeatureType Geometry element type
In the OGR provider, we can read:
```
Some ogr drivers (e.g. GML) are not able to determine the geometry type of a layer like this.
In such cases, we use virtual sublayers for each geometry if the layer contains
multiple geometries (see subLayers) otherwise we guess geometry type from first feature
```
It means that in DescribeFeatureType Geometry element can be describe as simple and the GML contains
simple and multi. It's not XML valid.
To fix it, for OGR provider Geometry element type is set to `gml:GeometryPropertyType`

For the next release, it will be interesting to allow users to specify whether the geometries are multi.
2016-02-26 10:08:07 +01:00
Hugo Mercier
8fc5381b72 Merge pull request #2845 from pvalsecc/column_name_validation
Remove column name validation from virtual layers queries
2016-02-26 09:50:39 +01:00
Nyall Dawson
58c85bb8c0 Tweak vertical position of labels under points in "cartographic"
label placement mode

Previously labels were being drawn too low
2016-02-26 19:36:20 +11:00
Nyall Dawson
ae347bfd89 Followup fb7c683, 4e4743 2016-02-26 19:05:46 +11:00
Patrick Valsecchi
3a714ccb27 Remove column name validation from virtual layers queries
The query already went through the Sqlite query parser. So why not
trusting it? This was in the way of group by queries with count(*)
in the output fields.
2016-02-26 08:04:07 +01:00
Nyall Dawson
fb7c683969 Temporarily disable test which unexpectedly fails on Travis 2016-02-26 16:29:13 +11:00
Nyall Dawson
4e4743a2cd Fix saving vector layers with z dimension (fix #14006, #12373) 2016-02-26 15:07:35 +11:00
Juergen E. Fischer
76fcb1f7c9 PyQgsVectorFileWriter: fix comment (followup 17f20bb) 2016-02-26 02:01:17 +01:00
Juergen E. Fischer
17f20bbb36 PyQgsVectorFileWriter: adapt to a3f03f02 2016-02-25 20:31:20 +01:00
Nyall Dawson
d11e66749b Quote fields in size/width assistant (fix #14257) 2016-02-24 11:32:54 +11:00
Martin Dobias
98713a94d4 Fix tests where locale-dependent formatting of numbers is used 2016-02-23 13:49:28 +08:00
Martin Dobias
b34105d812 Fix test mask for labelingenginev2 tests so they do not fail on my laptop 2016-02-23 13:07:47 +08:00
Nyall Dawson
ab73c0364c Add unit tests for WMS server access control with request filters 2016-02-23 11:48:10 +11:00
Alessandro Pasotti
bf583c7236 Merge pull request #2830 from elpaso/server-fix-info_format2
[bugfix][server] text/plain as default info_format
2016-02-22 22:28:25 +01:00
elpaso
3df100f9a0 Removed debug code 2016-02-22 22:03:21 +01:00
elpaso
82cee03057 Added test data for GetFeatureInfo 2016-02-22 18:52:53 +01:00
elpaso
0a9063b42b [bugfix][server] text/plain as default info_format
Added deafult info_format (text/plain) as per specs.
Fixed error message when info format was not set or wrong.
Added test for GetFeatureInfo.
2016-02-22 18:49:55 +01:00
Hugo Mercier
0e704523b7 Fix text encoding issues in virtual layers (fixes #14350) 2016-02-22 15:03:45 +01:00
Hugo Mercier
3dea491ded Fix text encoding in request filter expression 2016-02-22 15:03:45 +01:00
Nyall Dawson
a1672da17c Fix some test failures, warnings in nightlies
Add more tolerance to distance area tests, fix doxygen param option
2016-02-22 13:48:10 +11:00
Nyall Dawson
ba7dc0d7e7 Add unit tests for #13919 2016-02-22 10:20:22 +11:00
Juergen E. Fischer
e503c705a1 change QgsAbstractGeometryV2::coordinateSequence() to return a
implicitly shared copy of an internal cache instead of recreating the
coordinate sequence again and again.

Improves performance of the nodetool on large features a lot (refs #13963)

Also introduce Qgs(Coordinate|Ring|Point)SequenceV2 typedefs.
2016-02-21 21:49:51 +01:00
Nyall Dawson
6116fdcdb4 Add a bunch of missing geometry cache clears 2016-02-21 19:55:15 +11:00
Juergen E. Fischer
5c4bf99ce2 debian packaging update: manually merge some changes from PR#2818 and
some spelling fixes.
2016-02-20 16:55:16 +01:00
Nyall Dawson
4285d70b6c Fix "feature rendering order" checkbox is not honored (fix #14323) 2016-02-19 10:11:43 +11:00
Sandro Santilli
034b5c0be5 Make PG initialization scripts work with PostgreSQL 9.1
- Remove lock_timeout setting
   See https://travis-ci.org/qgis/QGIS/jobs/109844438#L942

 - Remove CREATE SCHEMA IF NOT EXISTS
   See https://travis-ci.org/qgis/QGIS/jobs/109891682#L1016
2016-02-17 18:13:45 +01:00
Nyall Dawson
87661a03cd Move field icon calculation to QgsFields, show correct field type
icons in attribute table column filter menu (instead of new
attribute icon) and in field table in vector properties
2016-02-17 21:39:58 +11:00
Sandro Santilli
cdf05acac8 Add script to create and initialize postgis test database 2016-02-17 11:08:18 +01:00
Sandro Santilli
2bd7f446b4 Fix signed 32bit integer overflow in PostgreSQL provider
Fixes #13958
Includes test for signed integer attributes
2016-02-16 17:40:34 +01:00
Sandro Santilli
6365eb7ee6 Do not hard-code database connection parameters
Rely on libpq defaults instead (overridable via environment)

Fixes #14308
2016-02-16 15:28:19 +01:00
Juergen E. Fischer
42bc938700 add QgsCredentialsNone to not return any credentials and make it default instead of QgsCredentialsConsole (fixes #14269; reverts f8d2091) 2016-02-16 10:45:58 +01:00
Nyall Dawson
13c5848e5e Fix deselecting null category when categorising using expression
hides all features (fix #14273)
2016-02-16 13:19:36 +11:00
Nyall Dawson
4094bae960 Respect project ellipsoid and unit settings in virtual fields
Fix #12622, #4252
2016-02-16 12:12:40 +11:00
Nyall Dawson
2265eb90ec "Fix" QgsDistanceArea test on OSX
Test has revealed that the current algorithm used for ellipsoidal
calculations is unstable when measuring small very areas (eg < 1m2)

For now, modify the test to use larger areas
2016-02-16 12:11:27 +11:00
Juergen E. Fischer
f8d2091255 avoid credentials requests in PyQgsPostgresProvider 2016-02-16 00:34:14 +01:00
Sandro Santilli
ab580fbd0e Do not hard-code database connection parameters
Rely on libpq defaults instead (overridable via environment)
2016-02-15 18:17:34 +01:00
Hugo Mercier
942c5e5f73 Fix virtual layer file name handling (in Windows) 2016-02-15 16:44:17 +01:00
Nyall Dawson
479d90a5ce Make measure tool respect project area unit setting
Also add unit tests for measure tool length and area measurement
to ensure they return the same results as field calculator
and identify tool

Refs #13209, #4252
2016-02-15 17:26:16 +11:00
Nyall Dawson
6dc0b6910f Move handling of angular units to QgsUnitTypes, swap angle and distance
radio buttons to combo boxes in options dialog for consistency with
project properties
2016-02-15 15:22:30 +11:00
Nyall Dawson
dfdcec8922 Fix project unit confusion (pt 3): add area unit settings with a
ton of available area units (eg m2, km2, mi2, ft2, yd2, ha, ac,
etc)

Adds a new option in both the QGIS setting and project properties to
set the units used for area measurements. Just like the distance
setting, this defaults to the units set in QGIS options, but can
then be overridden for specific projects.

The setting is respected for area calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values

Also adds unit tests to ensure that area calculated by attribute table
update bar, field calculator and identify tool are consistent wrt
ellipsoidal calculations and area units.

TODO: make measure tool respect area setting

(refs #13209, #4252 and fixes #12939, #2402, #4857)
2016-02-15 12:47:36 +11:00
Nyall Dawson
35c2d185fb Add square nautical miles as a supported areal unit, add API
method for converting a distance unit to corresponding area unit
2016-02-15 12:47:36 +11:00
Juergen E. Fischer
5d989abd6f fix parsing of IS NOT and NOT LIKE, NOT ILIKE and dumping of IS (NOT ...) (fixes #13938) 2016-02-14 23:44:06 +01:00
Nyall Dawson
1f2cc3d051 Revert deprecation of QgsSymbolV2Utils::encode/decodeOutputUnit
...as it causes circular dependancies. Defer to 3.0 when we can
move QgsSymbolV2::OutputUnit to QgsUnitTypes
2016-02-15 07:24:35 +11:00
Nyall Dawson
ddbdcf8ab1 Fix project unit confusion (pt 2): add project distance unit setting
Adds a new option in project properties to set the units used for
distance measurements. This setting defaults to the units set in
QGIS options, but can then be overridden for specific projects.

The setting is respected for length and perimeter calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values
- Default unit shown in measure dialog

Also adds unit tests to ensure that length and perimeter calculated
by attribute table update bar, field calculator and identify tool
are consistent wrt ellipsoidal calculations and distance units.

(refs #13209, #12939, #2402, #4857, #4252)
2016-02-14 21:04:41 +11:00
Nyall Dawson
17a29f90d6 Add area units to QgsUnitTypes (refs #13209) 2016-02-14 14:57:38 +11:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
9f772bce29 Add API call for setting preferred distance unit for QgsExpression
(refs #13209, #12939, #4857)
2016-02-13 11:36:51 +11:00