42748 Commits

Author SHA1 Message Date
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
lbartoletti
16cad4d14f - Add Signals start/stopCapturing
- fix QSpinBox -> QgsSpinBox
2017-10-22 22:03:27 +02: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
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
Juergen E. Fischer
25b0421752 follow up f243b8448e2 2017-10-21 17:55:28 +02:00
Juergen E. Fischer
f243b8448e postgres: add support for partitioned tables (implements #17302) 2017-10-21 17:39:18 +02:00
Juergen E. Fischer
e6f5236527 postgres provider: queries have an unknown relation type 2017-10-21 17:39:18 +02: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
49071808ac [Browser] Fix invalid detection of OGR VRT by GDAL provider, and fix broken detection of OGR VRT (fixes #16806) 2017-10-21 00:09:27 +02:00
Even Rouault
cc96f51e62 [OGR/browser] More consistant use of GDAL API 2017-10-20 23:26:29 +02:00
Even Rouault
feaa8b812b [OGR provider] subLayers(): avoid emitting error on a geometry less layer 2017-10-20 21:46:20 +02:00
Even Rouault
c130f9fc1c [OGR provider] Avoid (harmless) OGR errors when trying to convert GeoPackage from WAL to DELETE mode 2017-10-20 21:42:58 +02:00
Richard Duivenvoorde
32852fb42c fix tab clicks in plugin manager 2017-10-20 18:29:19 +02:00
Even Rouault
a733ace362 Merge pull request #5409 from rouault/fix_gpkg_many_layers
[OGR provider] Allow opening (GeoPackage) datasets with many layers
2017-10-20 18:06:52 +02:00
Even Rouault
c9b0a2b167 [OGR provider] Speed-up layer addition to the canvas when selected from the data source manager 2017-10-20 17:37:42 +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
Even Rouault
e59f1d5d48 Move static variable to function scope 2017-10-20 17:37:26 +02:00
Matthias Kuhn
08443c20d8
Revert "Avoid type quotation errors in value exists check"
This reverts commit 6ce4b607c522d5db35227d2ae5f20259d4e384f0.
2017-10-20 17:11:32 +02:00
Even Rouault
fc016ec615 Application termination: fix crash caused by 5288aed5503205948f3785590e3b27d325340afe when layers are still opened at exit 2017-10-20 16:29:19 +02:00
Matthias Kuhn
6ce4b607c5
Avoid type quotation errors in value exists check 2017-10-20 16:14:01 +02:00
Matthias Kuhn
a01f153ec1
Feature validation should not spam the log 2017-10-20 16:14:01 +02:00
Even Rouault
5288aed550 QGisApp: fix potential crash at application closing linked to mDataSourceManagerDialog destruction closing GDAL datasets after GDAL has been shut down 2017-10-20 14:10:58 +02:00
rldhont
0f3d14a005 Merge pull request #5408 from rldhont/server-handlerequest-project
[Server][FEATURE] Handle request from QgsServer with a QgsProject
2017-10-20 11:13:15 +02:00
rldhont
efb84fd2ca Merge pull request #5337 from dmarteau/qgis_utils_refactoring
Disable message hook and import override at runtime
2017-10-20 10:25:45 +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
Nyall Dawson
8d64e2e6ef Also add unique_ptrs for other geos classes 2017-10-20 12:16:48 +11:00
Nyall Dawson
b2add8cf46 Another attempt to avoid Travis warnings 2017-10-20 12:16:48 +11:00
Nyall Dawson
4e586818ef Fix warning if building without 3d
(AKA hurry up Fedora 27, I want Qt 5.9 already)
2017-10-20 09:07:23 +10: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
Martin Dobias
79bc5d4bf7 Save state of 3D map views in projects + restore them on project load 2017-10-19 09:26:30 +02:00
Martin Dobias
2aaff6a331 Move code useful for 3D view out of 2D map canvas dock code 2017-10-19 09:26:30 +02:00
Nyall Dawson
ac7e041a4c Revert "Fix build warnings on Travis"
Hey clang - how about you don't through warnings if
fixing them breaks the build?

This reverts commit e28a555497e9984d261c6a054502c875b6994a89.
2017-10-19 16:14:12 +10:00
Nyall Dawson
e28a555497 Fix build warnings on Travis 2017-10-19 14:25:01 +10:00
Nyall Dawson
8927fb57c2 Merge pull request #5369 from nyalldawson/toolbox_order
[processing] Always list native algorithms before 3rd party providers
2017-10-19 15:23:22 +11:00
Nyall Dawson
4ce166241e Allow processing providers to specify a long name, and show it in tooltips
Add version number to gdal provider long name
2017-10-19 13:12:31 +10:00
Nyall Dawson
a33376fe09 Drop version and count from algorithm item in tree view 2017-10-19 12:01:40 +10:00
Nyall Dawson
925ec6098c [processing] Always list native algorithms before 3rd party providers
This change ensures that searching for algorithms always returns
native algorithms before matching 3rd party algorithms

TODO: we really need to replace the toolbox tree with a proper
model and redo the sorting/filtering using a sort/filter proxy
model.
2017-10-19 12:01:40 +10: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
b855ad1e72 Merge pull request #5366 from DelazJ/effectsalign
Vertically align color widget in Effect properties dialog
2017-10-19 12:48:47 +11:00