2ac5933 fixed the regression in 2.12, but there were more underlying
issues from <2.8 causing sub symbols with data defined properties
to be ignored.
Add some tests.
(refs #13707)
This introduces two new options to filter legend elements:
- filter by expression: a boolean expression can be set. Only symbols of
features that make the expression evaluated to true will be kept in the legend
- filter by polygon: only symbols of features that are inside the given
polygon will be part of the legend.
The polygon filtering is used in particular for a new option in the
composer legend that allows to filter out anything that is not included
in the current atlas polygon.
QString methods
Using single quotes is a significant performance boost. Rough
benchmarks indicate the QString single quote methods take
about 15% of the time the double quote variants take.
Not perfect, but good for a quick warning if a new class or member
has been added to the public API without Python bindings. The test
only considers the name of members, since it seems to be impossible
to test for the signature of a Python member. (So adding a new
overloaded method without bindings will still unfortunately pass).
You can avoid the test where bindings are not applicable:
- for a whole class by placing "@note not available in Python bindings"
in the class' Doxygen comments
- or by placing the @note inside a member's Doxygen comments for a
specific member
Additionally, classes which aren't included in the API docs
will not be tested.
The postgres provider is modified so that layers with
TIN, PolyhedralSurface and Triangle geometries can be loaded.
Geometries are converted to MultiPolygons (and Polygons for Triangles).
The postgres test is completed to cover the loading of different types
of layers
- use at() instead of [] for temporary containers (at() returns
const reference, so it avoids the detach which occurs with [])
- use at( 0 ) rather than first() for containers, because first()
detaches (Qt5 introduced constFirst()/constLast() to overcome this)
- when creating geometry from WKT, upgrade dimensionality of geometry
if coordinates are 3/4 dimensional
- match dimensionality of collections to child dimensionality
- fix area of curves was non-zero if curve is closed
- don't consider m values when testing for curve closedness
- add unit tests for closedness
- add unit tests for CircularStrings, CompoundCurves, CurvePolygon,
tests with geometries with Z/M values
Split length from perimeter calculation in geometry API, as
returning perimeter for length for polygons is misleading and
results in incorrect length/perimeter calculations for mixed
geometry collections.
Enable length & perimeter unit tests against reference geometries.
Now the length & perimeter values match those calculated by
PostGIS.
(inc geometry count, node count, ring count, area, centroid,
x/y min/max)
TODO:
- invesigate whether Z/M is required for GeometryCollection WKT
data type if children have Z/M dimension
- fix QGIS handling of mixing length and perimeter for collections
resulting in incorrect length calculation for mixed Collections
- Add some tests for conversion to/from WKT, using a bulk lot of testsdata
from PostGIS
- Add some tests for area/length calculation, using some test data and
results from PostGIS/geos unit tests
- Add tests for spatial relations, using test data from PostGIS. Note
that this required adding support for calculating the DE-9IM relation. I'll
expose this to users via the expression engine in 2.14.
Along the way this also fixes a number of bugs relating to WKT geometry
import, such as
- add support for alternate MultiPoint(1 1,2 2,...) format
- fix GeometryCollection to support collections with multi* children
and GeometryCollection children (allowed by spec)