2187 Commits

Author SHA1 Message Date
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
Nyall Dawson
9e2890dad4 Fix (harmless) Coverity warnings 2016-02-13 07:29:57 +11:00
Nyall Dawson
356719144c Fix failing expression test on OSX 2016-02-13 07:13:47 +11:00
Nyall Dawson
c50033bbaa Misc optimisations suggested by clazy
- avoid Q_FOREACH( ..., QMap.values() ) as it allocates an unnecessary
list
- use .endsWith( ... , Qt::CaseInsensitive) instead of
.lower().endsWith( ... ) as it avoids an extra QString allocation
2016-02-12 20:54:25 +11:00
Nyall Dawson
229ef29170 If no geomCalculator is set for QgsExpression, perform cartesian
calculations for $length, $area, $perimeter (refs #13209)

ie, the default is now to use planimeteric calculations unless
a geomCalculator has been explicitly set
2016-02-12 20:54:25 +11:00
Hugo Mercier
6bbe3b93a2 Fix DependencySorter.sortedLayerIds. Fixes #14281 2016-02-12 09:16:46 +01:00
Juergen E. Fischer
294f033b81 adapt wfs capabilities test data to d11c689e 2016-02-10 09:54:40 +01:00
Sandro Santilli
e8be21ad61 Add test for premature WKB end in QgsGeometry::asWkt
See #14182
2016-02-09 14:20:07 +01:00
Juergen E. Fischer
2ea3d7744d port more WKB parsing to Qgs(Const)WkbPtr including bounds checking 2016-02-09 14:20:07 +01:00
Juergen E. Fischer
ded1ebb33b indentation fixes 2016-02-09 14:19:13 +01:00
Hugo Mercier
fa78ccf74d Deprecate old WkbType in QgsDataSourceUri 2016-02-09 10:44:41 +01:00