1824 Commits

Author SHA1 Message Date
Matthias Kuhn
f2ac1e8ee4 Add order by test 2015-12-18 18:38:18 +01:00
Matthias Kuhn
b9f0c0625a More use of implicit sharing of QgsExpression 2015-12-18 18:36:26 +01:00
rldhont
e2d1320295 [BUGFIX] WFS GetCapabilities respons misses <keywords> key
Fixes #13037 WFS GetCapabilities respons misses <keywords> key

Replace KeywordList by Keywords in WFS Getcapabilities and keywords in WCS GetCapabilities.
2015-12-18 12:20:12 +01:00
Nyall Dawson
e9cd82902b Fix incorrect symbols appearing for categorized and graduated renderers
This was triggered by 18614e11, which revealed a deeper bug in the handling
of symbols by these renderers. For both renderers a const method returns
a non-const pointer to a symbol and is used to modify this symbol in place.

Because both renderers store their classes in a QList (implicitly shared)
this means that all shared class lists were being updated when a clone of
a renderer has its symbols altered in this way. Prior to 18614e these
class QLists were being detached and copied in random ways.

Work around this by forcing a deep copy of the class lists when a renderer
is cloned.
2015-12-18 16:02:49 +11:00
Juergen E. Fischer
8214608169 more nullptr updates (folloup 320c696) 2015-12-16 16:29:29 +01:00
Nyall Dawson
18614e11e3 Avoid container detachments by using const methods wherever possible
eg QList::at() instead of QList:[], constFind instead of find, ...
2015-12-16 20:15:46 +11:00
Nyall Dawson
a66a8eae59 Drop documentation test threshold 2015-12-16 06:10:33 +11:00
rldhont
9e8e868a0f [TEST][QGIS Server] Add WFS GetFeature STARTINDEX test 2015-12-15 17:18:41 +01:00
Matthias Kuhn
0eb36d5047 Add debug output to csv test
To debug timeout:

Timed out log:
http://dash.orfeo-toolbox.org/testDetails.php?test=35623737&build=211129

Good log for comparison:
http://dash.orfeo-toolbox.org/testDetails.php?test=35617301&build=211079

Failing test:
test_039_issue_13749 which references https://hub.qgis.org/issues/13749

Mailing list discussion:
http://lists.osgeo.org/pipermail/qgis-developer/2015-December/thread.html#40581
2015-12-15 16:17:44 +01:00
rldhont
0a7e3f5e2b Merge branch 'AsgerPetersen-wfstests' 2015-12-15 16:01:01 +01:00
Asger Skovbo Petersen
7101b5beb0 Remove unsupported SRSNAME 2015-12-15 14:52:37 +01:00
Asger Skovbo Petersen
cea82c0a35 WFS version corrected to 1.0.0 2015-12-15 14:46:21 +01:00
AsgerPetersen
3d937e1deb Simple python tests of WFS responses 2015-12-15 13:51:11 +01:00
Matthias Kuhn
de1c319bf6 Implicit sharing for QgsExpression 2015-12-15 13:39:07 +01:00
Nyall Dawson
85eebff69b Avoid some unnecessary object conversion during point rendering 2015-12-15 22:36:49 +11:00
Nyall Dawson
4e18d54555 Tests and fixes for QgsPolygonV2
- Setting exterior ring will force all interior rings to match
dimensionality of exterior ring
- add equality operator
- use correct WKB types for rings when creating polygon from WKB
- segmentize curves when setting exterior ring with curved segments
- fix export to GML2/3 (should use LinearRing, not LineString as
ring element tag)
2015-12-15 22:36:41 +11:00
Nyall Dawson
2f72b3b8cf Ignore != operator in doc coverage test 2015-12-15 22:36:29 +11:00
Nyall Dawson
5b244ae88c [FEATURE] More geometry functions for expressions
- add accessors: geometry_n, interior_ring_n
- add num_geometries, num_rings, num_interior_rings
- add nodes_to_points for converting every node in a geometry
to a multipoint geometry
- add segments_to_lines for converting every segment in a geometry
to a multiline geometry

nodes_to_points and segments_to_lines are intended for use with
geometry generator symbology, eg to allow use of m and z values
for nodes/lines with data defined symbology.
2015-12-15 11:22:39 +11:00
Nyall Dawson
ceddb7eb97 [FEATURE] is_closed function for expressions
Returns whether a linestring is closed
2015-12-13 22:06:22 +11:00
Nyall Dawson
262514d97d [FEATURE] exterior_ring function for expressions
Returns exterior ring of a polygon as a line. Useful for geometry
generator symbology for styling only the exterior ring of
polygons.
2015-12-13 20:11:19 +11:00
Nyall Dawson
710b9d25d1 Drop test thresholds 2015-12-13 14:17:41 +11:00
Nyall Dawson
6a7f786126 Merge pull request #2570 from nirvn/point_on_surface_v3
[expression] add point_on_surface function
2015-12-12 22:35:58 +11:00
nirvn
35fea9c986 [expression] add point_on_surface function 2015-12-12 17:16:34 +07:00
Matthias Kuhn
c9fa33410d Fix rendering geometry generators for line layers
And add more tests
2015-12-11 11:41:41 +01:00
Nyall Dawson
233f67b419 QgsPolygonV2 tests and fixes
- fixes for handling Polygon25D
- add QgsAbstractGeometryV2::convertTo( QgsWKBTypes::Type type ) for
easy conversion between geometry types
- fix crash when calculating perimeter with no exterior ring
- ensure that added rings respect dimensionality of polygon (avoids
issues such as polygons with z having a ring without z, or a
Polygon25D with LineStringZ rings)
- if a curved ring is added to a polygon then a segmentized version
of the ring is used (can't have a Polygon with a CircularString
ring)
- when calling setInteriorRings, make sure empty rings are skipped
and that all rings are converted to correct type for polygon
- don't crash when requesting or removing interior ring with
index < 0
2015-12-11 18:40:11 +11:00
Nyall Dawson
d2bf8d8923 Add equality operators to QgsLineStringV2 2015-12-11 18:40:11 +11:00
Matthias Kuhn
8a9399095b Indentation update 2015-12-11 00:07:37 +01:00
Nyall Dawson
c854d05f2e Update doc and sip coverage test thresholds 2015-12-11 08:36:36 +11:00
Nyall Dawson
c6c076b082 Implement provider side feature IDs filtering for mssql 2015-12-11 07:14:03 +11:00
Nyall Dawson
a6cf5475c6 [FEATURE] Expression compiler for mssql provider
Also make mssql provider handle requests which cannot be executed
gracefully (was crashing before)
2015-12-11 07:14:03 +11:00
Nyall Dawson
8602a91a1d Add provider test for mssql 2015-12-11 07:14:03 +11:00
Matthias Kuhn
aa4f28882d Add geometry generator tests 2015-12-10 12:33:43 +01:00
Nyall Dawson
89b9b67974 Handle type conversion failures for compiled expressions 2015-12-10 20:49:17 +11:00
Nyall Dawson
038646170f Fix spatialite provider test data (was missing primary key) 2015-12-10 16:18:30 +11:00
Nyall Dawson
54776ebd79 Better debugging for provider tests 2015-12-10 16:18:00 +11:00
Matthias Kuhn
28cabbe4d0 [Expression] radians and degrees 2015-12-10 00:41:42 +01:00
Nyall Dawson
7d59be880a Fix coverity issues 2015-12-10 08:13:21 +11:00
Alessandro Pasotti
0287daf8ab Merge pull request #2555 from elpaso/bugfix-pg-inherits
Additional tests for tables with inherits
2015-12-09 12:03:59 +01:00
elpaso
94b5e609de Fixed comment base_table_good 2015-12-09 09:41:08 +01:00
nirvn
a5d670233b [FEATURE] add darker() and lighter() expression functions 2015-12-09 15:50:59 +11:00
Nyall Dawson
6e140b97fd [FEATURE] Edit legend symbols directly from layer tree
This adds a new "edit symbol" item to the right-click menu for a
renderer child legend item (eg categories for the categorised
renderer). Selecting it opens a symbol editor dialog which allows
for directly editing the classes symbol. It's much faster than
opening the layer properties and going through the style tab.
2015-12-09 07:25:03 +11:00
Nyall Dawson
83e139a550 Add method for retrieving legend nodes by layer ID and legend rule key 2015-12-09 06:01:12 +11:00
Matthias Kuhn
85e9f785a8 Expected failure for some tests
Waiting for travis to recover before looking into it.
They pass locally.
2015-12-08 15:49:02 +01:00
Matthias Kuhn
be01b7eec5 [FEATURE] Add N:M relation editing possibilities
This adds the possibility to manage data on a normalized relational
database in N:M relations. On the relation editor in a form, the tools
to add, delete, link and unlink work (also) on the linking table if a
relation is visualized as N:M relation.

Configuration is done through the fields tab where on the relation a
second relation can be chosen (if there is a suitable relation in terms
of a second relation on the linking table).

Limitations
===========

QGIS is not a database management system.

It is based on assumptions about the underlying database system. In
particular it expects

 * A `ON DELETE CASCADE` or similar measure on the second relation
 * Does not take care of setting the primary key when adding features.
   Either users need to be instructed to set them manually or - if it's a
   database derived value - the layers need to be in transaction mode
   (currently only activatable through the API)
2015-12-08 15:49:01 +01:00
Hugo Mercier
0f6256ebcd Merge pull request #2556 from mhugo/fix_nullp
Avoid insertion of null pointers in layer registry
2015-12-08 15:20:19 +01:00
Hugo Mercier
ec20db7ade Avoid insertion of null pointers in layer registry 2015-12-08 15:13:23 +01:00
Nyall Dawson
ee720796a3 Change size()/count() == 0 and count() > 0 to isEmpty() checks
Because:
- easier to read
- follows recommendations by clazy/KDAB
- potentially performance benefits
2015-12-08 22:45:06 +11:00
elpaso
96789f378e Added tests with use estimated metadata 2015-12-08 11:30:32 +01:00
Matthias Kuhn
4b3083d9a7 [FEATURE] Add translate expression function
Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2015-12-08 08:49:05 +01:00
Matthias Kuhn
f961ecef46 [FEATURE] Add an eval expression
Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2015-12-08 08:43:45 +01:00