438 Commits

Author SHA1 Message Date
Nyall Dawson
4624fb88ae Update test mask images 2015-11-26 12:53:52 +11:00
Nyall Dawson
e03f5549ca Update test mask images 2015-11-25 07:48:47 +11:00
Nyall Dawson
675da0ce40 Fix PyQgsServerAccessControl on Ubuntu
Add size tolerance to legend images, add masks for legend images
2015-11-24 07:54:29 +11:00
Nyall Dawson
f1458434fb Followup 7d600bd, proper fix for failing labeling engine test
When labelFeatures is called outside of the renderering loop,
we need to make sure the renderer is prepared by calling
startRender.
2015-11-24 07:26:37 +11:00
Nyall Dawson
169989a02f Update test mask images 2015-11-23 21:03:04 +11:00
Nyall Dawson
73ac9f9acd Update test mask images 2015-11-23 06:03:44 +11:00
Nyall Dawson
7d600bdaed [FEATURE] Use rendered symbol size as obstacle for point feature labels
Previously, only the point feature itself was treated as an obstacle
for label candidates. If a large or offset symbol was used for the
point, then labels were allowed to overlap this symbol without
incurring the obstacle cost.

Sponsored by City of Uster
2015-11-22 21:30:42 +11:00
Nyall Dawson
2e0019df39 Test mask updates 2015-11-22 18:08:34 +11:00
Nyall Dawson
9cc10e2a21 [labeling] Allow different obstacle geometry to feature geometry
This change makes it possible to have a different geometry used
for labeling obstacle detection to the geometry used for generating
label position candidates.

Also fixes parts of multipolygon features were not treated as
obstacles when "label only largest part" of polygon was checked.
Some inefficiencies in pal were also fixed (eg avoiding adding
features/obstacles to pal rtree indexes when they will never
be used).

Sponsored by City of Uster
2015-11-21 22:23:16 +11:00
Nyall Dawson
47e6d3031b Update test masks 2015-11-21 22:03:19 +11:00
Nyall Dawson
03f9e1b351 [pal] Never treat features as obstacles for their own labels
Fixes issues like rule based labelling registering two labels for
a single feature which was resulting in each label colliding
with the feature's geometry registered by the other label. This
resulted in poor placement for these labels.

Sponsored by City of Uster
2015-11-21 20:49:28 +11:00
Nyall Dawson
86ad564ef5 Add (disabled) test for labels around large symbols 2015-11-21 20:02:21 +11:00
Nyall Dawson
b81858f3fc Rename marker line symbol test folder to match other symbol tests 2015-11-21 19:05:48 +11:00
Nyall Dawson
711c38dfaf Make symbol line fill tests more robust 2015-11-21 19:01:28 +11:00
Nyall Dawson
11c82045b7 More test mask updates 2015-11-21 18:39:36 +11:00
Juergen E. Fischer
ff3a622e53 4 more pixels... (followup ca3da4c) 2015-11-21 00:52:33 +01:00
Juergen E. Fischer
ca3da4ceee adapt render tests to c6460a3 2015-11-20 23:23:50 +01:00
Nyall Dawson
4203a7c1f4 Add method to determine approximate rendered symbol bounds for markers
Sponsored by City of Uster
2015-11-20 19:55:02 +11:00
Nyall Dawson
4d02e48f16 Update test mask images for windows 2015-11-20 11:29:09 +11:00
mhugent
422abbde5e Merge pull request #2056 from sbrunner/qgis-server-security
[Feature] Add an interface in QGIS Server for access control plugins
2015-11-19 10:23:04 +01:00
Nyall Dawson
8c0fe47d8e Add tests for QgsPointV2, fix some issues:
- prevent creation of a QgsPointV2 with a non-point WKB type
- fix bounding box was not invalidated for some modification routines
- if WKT type is PointZ/M/ZM and not enough coordinates specified,
initialise extra coordinates to 0
2015-11-19 19:48:42 +11:00
Stéphane Brunner
c9f0d83aaf The plugin define the following methods:
* layerFilterExpression
  Return an additional filter, used in
  WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature to filter the features
* layerFilterSubsetString
  Return an additional the subset string (typically SQL) filter.
  Faster than the layerFilterExpression but not supported on all the
  type of layer
* layerPermissions
  Change the rights on the layer per user (known by the plugin)
  Concern rights: publish, insert, update, delete.
  Mostly used in WFS/Transaction, and the publish in all requests.
* authorizedLayerAttributes
  Be able to show some attributes only for a subset of user
  Used in: WMS/GetFeatureInfo, WFS/GetFeature
* allowToEdit
  Be able to don't allow to edit a particular feature, in our case base
  on the Geometry
  Used in: WFS/Transaction
* cacheKey
  Cache key to used to create the capabilities cache, "" for no cache,
  shouldn't contains any "-", default to ""
2015-11-18 14:49:43 +01:00
Nyall Dawson
26f7683cf5 OGR expression compiler fixes
- Allow simple operators as supported by OGR (+, -, * )
- Only return a partial compilation success if expression contains
"column"="column2". Since OGR SQL performs case insensitive
comparisons, we need to double check the result using QGIS'
expressions to ensure that case matches. Add unit tests for this
to provider tests.
2015-11-18 06:30:42 +11:00
Matthias Kuhn
768bab8644 Merge pull request #2470 from SebDieBln/postgrestest
[postgresprovider] make the test more portable
2015-11-16 07:05:17 +01:00
Sebastian Dietrich
6ee90c32ec replaced COPY with INSERT INTO 2015-11-15 21:51:33 +01:00
Nyall Dawson
e6d495a2d6 Update test mask images 2015-11-15 14:48:45 +11:00
Nyall Dawson
d699569b86 Add initial tests for marker symbol layers 2015-11-14 20:17:54 +11:00
Sandro Santilli
824fd7bf32 Fix endpoint swap on negative marker line offset
Fixes #13811
Includes testcase
2015-11-13 15:29:44 +01:00
Nyall Dawson
452e61c8e0 More test mask updates for windows 2015-11-10 17:15:43 +11:00
Nyall Dawson
18744b4123 Fix crash with malformed WKT 2015-11-10 17:08:48 +11:00
Nyall Dawson
7c149d77a9 Update atlas test mask image for Win 2015-11-10 06:26:55 +11:00
Nyall Dawson
2988dbdd18 Update legend test mask images for debian builds 2015-11-10 06:24:41 +11:00
Nyall Dawson
fccf54b2d7 Fix crash on malformed WKT strings 2015-11-06 20:09:39 +11:00
Nyall Dawson
7439643934 Fix delimited text layers set to unknown geometry type if first row has
null geometry (fix #13749)
2015-11-06 20:08:30 +11:00
Nyall Dawson
9e84fcafd8 Followup 2ac5933 with more data defined fixes
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)
2015-11-04 16:03:46 +11:00
Hugo Mercier
d16cdcf449 Add more options for filtering legend elements
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.
2015-11-03 10:39:09 +01:00
rldhont
a9e567060d [QGIS-Server] Test: more ISO compatibility for WxS capabilities 2015-11-02 22:24:42 +01:00
Juergen E. Fischer
d9c8e73fa2 'fix' PyQgsRulebasedRenderer test (followup 08185c9a) 2015-10-29 15:21:05 +01:00
Hugo Mercier
c7aeb774ce PostGIS: Allow to load TIN, PS and Triangle layers
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
2015-10-21 09:41:49 +02:00
Nyall Dawson
5f1bb6cf1f Geometry fixes:
- 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
2015-10-18 21:03:15 +11:00
Nyall Dawson
8c5f3f88a9 [geometry] Fix calculation of length/perimeter for collections
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.
2015-10-17 15:40:36 +11:00
Nyall Dawson
785d9952a0 Add a bunch of geometry unit tests against reference geometries
(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
2015-10-17 15:02:18 +11:00
Nyall Dawson
f7550b3515 Add some more basic area and length unit test cases 2015-10-16 22:12:07 +11:00
Nyall Dawson
772ab8e249 Update test mask images 2015-10-16 17:46:22 +11:00
Nyall Dawson
55c27ce710 Add some extra unit tests for geometry:
- 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)
2015-10-16 17:46:06 +11:00
Nyall Dawson
ec9fd86d30 Add missing mask from previous commit 2015-10-12 21:57:01 +11:00
Nyall Dawson
b93f2eacbe Follow up c7b9fa, fix failing tests
Looks like there's a label in the test which is placed right on the
boundary of the map, so the geos changes in c7b9fa have shifted it
slightly off the canvas and resulted in it not being drawn.

Update test mask images so this label is optional.
2015-10-12 21:56:31 +11:00
Nyall Dawson
1aefa17fbd Update TestQgsLabelingEngineV2 to use render checker, reenable on Travis 2015-10-12 18:38:29 +11:00
Nyall Dawson
80ccb39ae5 More test mask updates. Also disable qgis_labelingenginev2 on Travis
qgis_labelingenginev2 needs to be refactored to use QgsRenderChecker.
Directly comparing the two images is too fragile due and is failing
on Travis.
2015-10-10 22:07:39 +11:00
Nyall Dawson
4eb53d366a Update test mask images 2015-10-10 21:21:21 +11:00