4529 Commits

Author SHA1 Message Date
Sandro Mani
ea0e09b322 Merge pull request #5410 from manisandro/geomchecker
[FEATURE][Geometry checker] Support checking multiple layers at once, add new checks
2017-10-23 23:32:45 +02:00
Nyall Dawson
46a6f25d6f Merge pull request #5418 from nyalldawson/from_polyline
Rename QgsGeometry::fromPolyline as QgsGeometry::fromPolylineXY
2017-10-24 08:21:30 +11:00
Sandro Mani
9a2393ea92 [Geometry checker] Qt < 5.9 compatibility fix 2017-10-23 17:25:08 +02:00
Sandro Mani
15b5da8fea [Geometry checker] Fix incorrect change parametrization in QgsGeometryCheck::replaceFeatureGeometryPart 2017-10-23 17:25:08 +02:00
Sandro Mani
084660a47f [Geometry checker] More change tracking tests 2017-10-23 17:25:08 +02:00
Sandro Mani
876418c44e [Geometry checker] Add more fixError tests 2017-10-23 17:25:08 +02:00
Sandro Mani
4a6cdbe36b [Geometry checker] Add a first series of fixError tests 2017-10-23 17:25:08 +02:00
Sandro Mani
0ffd00da98 [Geometry checker] Add TestQgsGeometryChecks::createTestContext variant which copies the testdata to a temporary dir 2017-10-23 17:25:08 +02:00
Sandro Mani
d71f62c711 [Geometry checker] Make TestQgsGeometryChecks::searchCheckErrors return the list of matching errors instead of just the number of matches 2017-10-23 17:25:08 +02:00
Sandro Mani
1372536297 [Geometry checker] Add follow boundaries check 2017-10-23 17:25:08 +02:00
Sandro Mani
c44fa1da5c [Geometry checker] Finish gap check test 2017-10-23 17:25:08 +02:00
Sandro Mani
6b3309cd45 [Geometry checker] Add more tests 2017-10-23 17:25:08 +02:00
Sandro Mani
07dc429573 [Geometry checker] Some initial tests 2017-10-23 17:25:07 +02:00
Nyall Dawson
1d043f3c5a Update test 2017-10-23 20:35:54 +11:00
Nyall Dawson
a48c2e8fd4 Merge pull request #4947 from lbartoletti/regularShape_gui
[FEATURE][needs-docs] Add gui to draw Circle, Ellipse, Rectangle and Regular Polygon
2017-10-23 16:04:23 +11:00
Nyall Dawson
5d675720bb Optimise calculation of QgsGeometry::vertexNrFromVertexId
By moving logic to abstract geometry subclasses so that they
can trivially retrieve the vertex number, instead of relying
on the inefficient coordinateSequence method.

Has flow on speed boosts to many geometry operations like
calculation of closest points in a geometry, which will
benefit snapping related operations.
2017-10-23 08:03:22 +11:00
Nyall Dawson
2e8e72d02d Optimise determination of adjacent vertices and move to QgsAbstractGeometry
Previously the method in QgsGeometryUtils was relying on
QgsAbstractGeometry::coordinateSequence, which is an absolute
performance killer.

Instead move to optimised methods in the various abstract
geometry subclasses which rely only on trivial calculations.
2017-10-23 08:03:22 +11:00
Nyall Dawson
51fb66541d Fix QgsVectorFileWriter use of transactions while writing
Previously the writer was only using transactions in some
cases (when calling the static writeAsVectorFormat method).

This changes the writer to always use a transaction when
possible.

Fixes the map renderer job test using gpkg from timing out after
taking forever to running twice the speed of the shapefile
version. Similar benefits across other parts of qgis,
which are writing files without using the static method, e.g.
processing.
2017-10-22 21:43:36 +11:00
Nyall Dawson
c4f3832af2 Rename QgsGeometry::fromPolyline as QgsGeometry::fromPolylineXY
and add new QgsGeometry::fromPolyline which uses QgsPoint

We want to encourage people not to use the QgsPointXY method, as it drops
Z/M values. So it's moved across to a different name to make way
for a new QgsGeometry::fromPolyline which uses a QgsPoint list
instead of QgsPointXY, thus keeping Z/M values intact.

Similarly, QgsPolyline now is a list of QgsPoint (keeping z/m values)
and the old 2d QgsPolyline type was renamed to QgsPolylineXY.

Making the QgsPoint method the "preferred" method and making linestrings
just as easy to create from z/m dimensioned points as 2d points is
important to push people to write code which does not discard
these important dimensions.

As a bonus, the QgsPoint methods are more efficient anyway, since
they don't require creation of a temporary list.
2017-10-22 18:10:14 +10:00
Nyall Dawson
10a2867cab Partially revert 28daa1a0
Using gpkg for this test is causing intermittent travis
timeouts.

.
.
.
.

Team Shapefile FTW ;)
2017-10-22 12:09:43 +10:00
Nyall Dawson
15af45f6b6 Fix QgsGeometry::angleAtVertex returned wrong angle for start/end
of closed linestrings

The average angle of adjacent segments should be used in this case
2017-10-22 11:59:51 +11:00
Matthias Kuhn
6428fed8a3 Merge pull request #5385 from jachym/geopackage
Put GeoPackage at first place in the menu
2017-10-21 16:33:20 +02:00
Even Rouault
8f3d44d4e9 [OGR provider] Allow opening (GeoPackage) datasets with many layers
Currently each time you instanciate a QgsOgrProvider layer, a GDAL dataset is
created. In the case of GeoPackage, this means a SQLite connection and a file
handle. As GDAL enables Spatialite function on GeoPackage connections, we are
bound to Spatialite limits, and Spatialite has a hard limit on a maximum of
64 simultaneous connections. Thus we cannot open more than 64 layers of the
same GeoPackage.
This commits enables sharing of the same GDALDataset object among several
QgsOgrProvider object. Care is made to reuse a GDALDataset object only if the
QgsOgrProvider do not point to the same layer. Mutexes are also taken to
allow safe instanciation and use of QgsOgrProvider objects from multiple
threads (but a same QgsOgrProvider should not be used by more than one thread
at a time)
2017-10-20 17:37:42 +02:00
rldhont
7b455d8700 [Server][FEATURE] Handle request from QgsServer with a QgsProject
With this commit, it's posssible to handle a request from a QgsProject without writing it to the disk.

```python
server = QgsServer()
project = QgsProject()
vlayer = QgsVectorLayer("/path/to/shapefile/file.shp", "layer_name_you_like", "ogr")
project.addMapLayer(vlayer)

query_string = 'https://www.qgis.org/?SERVICE=WMS&VERSION=1.3&REQUEST=GetCapabilities'
request = QgsBufferServerRequest(query_string, QgsServerRequest.GetMethod, {}, data)
response = QgsBufferServerResponse()
server.handleRequest(request, response, project)
```
2017-10-20 09:44:24 +02:00
Matthias Kuhn
13a00aae30 Merge pull request #5399 from pblottiere/server_flaky_tests
[server] WIP : reactivate flaky server tests for WMS requests
2017-10-20 08:26:04 +02:00
Alessandro Pasotti
a411669dae Merge pull request #5226 from aaime/rule_labels
Also export rule based labelling in SLD. Follows up to ticket #8925
2017-10-19 17:58:25 +02:00
Blottiere Paul
3c18232c34 Unskip test_wms_getprint_srs (GetPrint has been refactored since) 2017-10-19 15:29:27 +01:00
Blottiere Paul
e90f601a15 Add some tests to validate assertXMLEqual 2017-10-19 15:29:27 +01:00
Blottiere Paul
e50a8aa31e Split WMS tests to detect flaky behavior 2017-10-19 15:29:27 +01:00
rldhont
e7d7295a64 Merge pull request #5405 from rldhont/server-wms-test-enhancement
[Server][Tests] Fix WMS tests locally
2017-10-19 15:51:37 +02:00
Jachym Cepicky
28daa1a0e0 Adding more default SHP->GPKG changes 2017-10-19 15:45:04 +02:00
Andrea Aime
aa594f5397 Also export rule based labelling. Follow up to #8925 2017-10-19 14:55:37 +02:00
rldhont
dc6bdc2919 [Server][Tests] Fix WMS tests locally 2017-10-19 14:48:48 +02:00
Nyall Dawson
325168ee1f Merge pull request #5392 from nyalldawson/file_downloader
Split QgsFileDownloader into separate core/gui classes
2017-10-19 12:59:07 +11:00
Nyall Dawson
6fe89fd3c4 Replace GEOSGeomScopedPtr with unique_ptr with custom deleter
And make greater use of it through QgsGeos to avoid potential
memory leaks.
2017-10-19 11:52:10 +11:00
Nyall Dawson
406425d68a Rename method, docs and api breaks documentation 2017-10-19 07:29:48 +10:00
Nyall Dawson
30da28a7b0 Fix qt warnings thrown by QgsFileDownloader 2017-10-19 07:21:17 +10:00
Nyall Dawson
587072cae9 Split QgsFileDownloader into separate core/gui classes
So that the guts of this class can be used from non-gui code
2017-10-19 06:32:50 +10:00
Nyall Dawson
f77377e6ae Fix crash in QgsGeometry::splitGeometry 2017-10-19 07:30:50 +11:00
Alessandro Pasotti
a7765ca966 Merge pull request #5380 from boundlessgeo/bd_2272_pki_parsed_ca
[auth] Allow to optionally add CAs from PKI bundle to the trusted CAs for the configured connection
2017-10-18 11:47:30 +02:00
Alessandro Pasotti
b1c45d57a6 [auth] Use QGIS test certificates 2017-10-17 18:11:58 +02:00
Blottiere Paul
c645479625 Merge pull request #5360 from pblottiere/server_bugfix_ogc_getmap_bbox
[server][bugfix] Fix OGC test getmap bbox
2017-10-17 13:34:20 +01:00
Blottiere Paul
a3971ee0cd Update unit tests 2017-10-17 10:17:49 +01:00
rldhont
ab107d0e8c Merge pull request #5297 from dmarteau/wfs_1_1_0
[Server][FEATURE][needs-docs] Support WFS 1.1.0
2017-10-17 10:09:31 +02:00
Matthias Kuhn
9ff66936cd Add debug output to spatialite test 2017-10-17 00:46:36 +02:00
Matthias Kuhn
83212e760a [travis] Stabilize spatialite tests 2017-10-16 16:25:35 +02:00
Nyall Dawson
54f8825350 Fix processing tests 2017-10-16 20:10:37 +11:00
Alessandro Pasotti
d293e8f6ed [auth] Add method to exclude self-signed CAs from a list of certificates 2017-10-16 10:52:40 +02:00
Matthias Kuhn
d4635d042d Merge pull request #5317 from pblottiere/bugfix_style
[bugfix] Fixes #17234 save/load styles from Postgres when a service file is used
2017-10-16 10:27:10 +02:00
Nyall Dawson
f579f1a449 Move bounds retrieval to QgsCoordinateReferenceSystem
Allows reuse in scripts/plugins/etc
2017-10-16 14:14:22 +11:00