4569 Commits

Author SHA1 Message Date
lbartoletti
0d89504ee5 ADD GML export to QgsTriangle 2017-10-23 14:29:08 +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
Larry Shaffer
c66de14055 [auth] Add PKCS8 to PKCS1 key conversion for macOS (deps on libtasn1)
See description of QgsAuthCertUtils::pkcs8PrivateKey.

This fix may be needed on other platforms (untested at this point),
because Qt5 QSslkey class *still* does not directly support creation
using non-PKCS1 PEM- or DER-encoded data, though QCA, whose qca-ossl
plugin is linked to OpenSSL, does support PKCS1 and PKCS8.
2017-10-18 16:07:04 -06:00
Larry Shaffer
8107f91037 [auth] Move inline file reads to static func; add PKCS#8 sniffing func 2017-10-18 16:07:04 -06: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
Martin Dobias
277b508637 Fix test 2017-10-14 17:27:16 +02:00
Martin Dobias
7e34beec8c New API for traversal of geometry's vertices using iterator pattern
Introducing:
1. STL-style iterator: QgsAbstractGeometry::vertex_iterator
2. Java-style iterator: QgsVertexIterator (built on top of STL-style)

The iterators are modeled after Qt's STL-style and Java-style iterators,
the idea is to replace nextVertex() method and later introduce iterators
for other bits (e.g. part_iterator, ring_iterator).
2017-10-14 13:23:14 +02:00
Alessandro Pasotti
f804f0b12b [auth] Port to QGIS3 and re-enable python test for QGIS auth system 2017-10-13 13:00:23 +02:00
Alessandro Pasotti
25cd27a513 [auth] Add tests for CA utility methods 2017-10-13 12:59:30 +02:00
Nyall Dawson
24a9c522e3 Move qgsAsConst to qgis::as_const
So it's more inline with the std::as_const implementation which
it fills in for, and allows us to 'polyfill' other c++>11
features into the qgis:: namespace.
2017-10-13 19:47:37 +10:00
Martin Dobias
ca0aa72bf1 [needs-docs] Remove OpenStreetMap integration in analysis lib + app
- unmaintained and barely working anymore
- clunky GUI
- not supporting .pbf
- there are other python plugins doing the same thing better
- nobody is using it anymore

https://lists.osgeo.org/pipermail/qgis-developer/2017-October/050103.html
2017-10-13 09:39:47 +02:00
Blottiere Paul
6447beefe8 Add some tests 2017-10-13 08:34:52 +01:00
Nyall Dawson
9a3b547d33 Merge pull request #5330 from nyalldawson/layout_next
[layouts] Port group handling
2017-10-13 13:02:44 +10:00
rldhont
24a68547e2 [Server][WFS] Update GML GetFeature document 2017-10-12 13:50:03 +02:00
rldhont
0d350b8865 [Server][WFS][Feature] Support resultType=hits from GetFeature 1.1.0 2017-10-12 13:49:51 +02:00