549 Commits

Author SHA1 Message Date
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
Nyall Dawson
d1be2ff214 Fix hardcoded border for raster legend items (fix #13540)
Previously raster legend items always had a fixed black border.
Now there's options to change the color/width of this border or
disable it entirely.
2015-10-09 06:12:37 +11:00
Nyall Dawson
228d816b3b Merge pull request #2330 from boundlessgeo/master-2_11-auth-system
Authentication configuration system with master password
2015-09-26 05:45:28 +10:00
Nyall Dawson
2f343008c1 [FEATURE][composer] Add fit page to contents option
New option in the composition panel, with optional extra margins
to add

Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Nyall Dawson
2215d48712 [FEATURE][composer] Add option to hide pages from view/export
Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Larry Shaffer
c519e06e29 [auth system] Add PKI test data 2015-09-21 08:51:19 -06:00
Martin Dobias
d43176af60 Fix server labeling tests
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:11 +08:00
Martin Dobias
6cc1f4c2cb Fix unit tests and issues with cached layers
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Martin Dobias
1d0d0e0662 [FEATURE] New API for labeling engine (QgsLabelingEngineV2)
The idea is to make the engine more flexible compared to QgsPalLabeling implementation:
- abstract dealing with text labels / diagrams from the engine itself
- allow multiple types of labels per layer
- support custom label providers (e.g. implemented by plugins)
- make the labeling engine independent from map rendering engine
- make it easier to auto-test the labeling engine and its components

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Matthias Kuhn
93e9204b43 Add test for rulebased renderer else rule 2015-09-08 17:03:21 +02:00
Nyall Dawson
5ae2881c81 Update test mask 2015-09-07 20:24:57 +10:00
Nyall Dawson
9133538a74 [FEATURE][composer] Advanced customisation of cell background color
for attribute tables

This allows users to set differing colors for alternating rows and
columns, first/last row/column and header row. Fixes #5131.

Sponsored by Ville de Morges
2015-09-05 22:06:31 +10:00
Nyall Dawson
f9fa9793f0 [pal] Improved test for candidate against polygon obstacles
Previous test was just checking point in polygon for the corner,
mid points and center. This test was not sufficient for narrow
or small polygons which were not covered by these points
but were still covering parts of the label candidate.

Now, the area of the intersection between the obstacle polygon
and the label candidate is used to calculate the obstacle
cost.
2015-08-31 12:20:14 +10:00
Nyall Dawson
0c5475545f Cleanup control_images folder by grouping some tests in subfolders 2015-08-30 20:15:25 +10:00
Nyall Dawson
253e13154e Start on placement test suite for labeling
Sponsored by City of Uster
2015-08-28 12:47:56 +10:00
Nyall Dawson
9aecf9f236 Test mask update 2015-08-25 08:42:25 +10:00
Nyall Dawson
46114659a8 More robust maprotation label test
Previous test was too reliant on platform-specific font rendering
2015-08-24 12:49:50 +10:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Nyall Dawson
4bf8b131e3 Port conditional styles to expression contexts 2015-08-22 19:01:43 +10:00
Nyall Dawson
86ace247c5 Test mask updates 2015-08-22 18:52:22 +10:00
Nyall Dawson
b87e5f7573 [FEATURE][composer] Data defined style preset for composer maps
Sponsored by City of Uster
2015-08-19 20:43:19 +10:00
Nyall Dawson
612df6ae14 [FEATURE][composer] Auto wrapping for text in fixed width columns
in attribute tables

Sponsored by City of Uster
2015-08-19 06:08:22 +10:00
Nyall Dawson
759f842bc3 [FEATURE][composer] Vertical alignment control for attribute tables
Sponsored by City of Uster
2015-08-19 05:16:12 +10:00
Nyall Dawson
372534eb89 [composer] Add proper handling of multiline text in attribute tables
Previously multi-line text would overflow onto neighbouring cells.
Now rows will be expanded to fit required height of text.
Fix #10273.

Sponsored by City of Uster
2015-08-19 05:16:12 +10:00
Nyall Dawson
7527638d43 [FEATURE][composer] Data defined control over map layers
Adds new data defined control for the map layers to show in a
composer map. Expression result should be a | delimited list of
layer names which will be shown in the map.

Sponsored by City of Uster
2015-08-17 23:46:13 +10:00
Nyall Dawson
a89550ac48 Update label server test mask images for OSX 2015-08-12 23:38:42 +10:00
Matthias Kuhn
a37b3e27d5 Remove executable flag on a bunch of files 2015-07-20 15:45:44 +02:00
Juergen E. Fischer
3acabad3a1 fix PyQgsServer test in nightlies 2015-07-18 16:56:26 +02:00
Nyall Dawson
f9917b55c3 Remove expected failure from shapefile provider unique values test
Failure was caused by GDAL bug #6020, which has now been fixed
in GDAL. It turns out the values are only incorrect if the first
feature in the file has a null value, so I've rearranged the
features in the reference shapefile to avoid this.
2015-07-12 19:55:54 +10:00
Nyall Dawson
368eaa258b Add support to generate_test_mask_image for mismatched sizes,
add masks for legend renderer tests
2015-07-10 18:09:28 +10:00
Marco Hugentobler
f0835ec3e5 Change order of headers in server tests 2015-07-07 17:20:27 +02:00
Nyall Dawson
8e488caa23 Update test mask image for Windows 2015-07-06 20:13:04 +10:00
Nyall Dawson
ee6a924387 More Win test mask updates 2015-07-06 08:29:50 +10:00
Juergen E. Fischer
5b54e260d4 various windows test fixes:
* .gitignore sort and remove duplicates
* show more warnings in tests
* add/update masks for rendering checks on windows
* fix delimited text provider tests
* disable QgsLogger and QgsPalLabelingServer on windows
2015-07-05 03:45:01 +02:00
elpaso
132fa0d25b re-enabled PyQgsServer, reverted setenv 2015-07-03 09:05:49 +02:00
elpaso
11a7522d9f Fixed PyQgsServer tests.
Still disabled in Travis because of random failures
2015-07-03 09:04:47 +02:00
Nyall Dawson
339dbf1b18 OSX test mask images 2015-07-02 21:48:46 +10:00
Nyall Dawson
b7afe396e4 [tests] Switch composer picture remote url test to use a local
python server, avoids dependance on remote service
2015-07-02 13:39:40 +10:00
Juergen E. Fischer
d429f195b6 Some fixes to the tests on windows:
* defer initialization of map settings until after QgsApplication is initialized
* disable local server test
* set ogr encoding in qgsserver testproject.qgs
2015-07-01 18:09:30 +02:00
Juergen E. Fischer
984f03f499 restore points files 2015-07-01 10:57:54 +02:00