43033 Commits

Author SHA1 Message Date
Sandro Mani
84184d453f [Geometry checker] Use map crs for geometry and errorLocation in CheckErrors, overall code cleanup 2017-10-23 17:25:06 +02:00
Sandro Mani
1642eb1601 [Geometry checker] Adapt for API changes 2017-10-23 17:25:06 +02:00
Sandro Mani
b52b2c51e4 [Geometry checker] Introduce QgsGeometryCheckerUtils::LayerFeatures 2017-10-23 17:25:06 +02:00
Sandro Mani
821eb4096a [Geometry checker] Initial multilayer support for contained check 2017-10-23 17:25:06 +02:00
Sandro Mani
55cf125480 [Geometry checker] Initial multilayer support for duplicate check 2017-10-23 17:25:06 +02:00
Sandro Mani
3d8ffcb184 [Geometry checker] Initial multilayer support for overlap check 2017-10-23 17:25:06 +02:00
Sandro Mani
dd12b132c5 [Geometry checker] Add multi-layer support to gap check 2017-10-23 17:25:06 +02:00
Sandro Mani
23affe4fae [Geometry checker] Store error values in map units, perform topology checks in map CRS 2017-10-23 17:25:06 +02:00
Sandro Mani
46e3ef7395 [Geometry checker] Ensure headers appear in project tree 2017-10-23 17:25:06 +02:00
Sandro Mani
e7efde2c31 [Geometry checker] Make checks report affected are in selected crs 2017-10-23 17:25:06 +02:00
Sandro Mani
2a92bfb2c9 [Geometry checker] Introduce QgsGeometryCheckerContext 2017-10-23 17:25:06 +02:00
Sandro Mani
31cc65df49 [Geometry checker] Initial multi-layer support 2017-10-23 17:25:06 +02:00
Alessandro Pasotti
1ecdb1dc44 [auth] Menu option and configuration for auto clear auth cache 2017-10-23 16:02:56 +02:00
Alessandro Pasotti
cde36f3247 [auth] Clear network authentication cache on SSL errors 2017-10-23 16:02:18 +02:00
Even Rouault
e3fc73f41e Merge pull request #5415 from rouault/use_layername
[OGR provider/askUserForOGRSublayers] Use layername= instead of layerid= when no ambiguity
2017-10-23 14:48:34 +02:00
lbartoletti
0d89504ee5 ADD GML export to QgsTriangle 2017-10-23 14:29:08 +02:00
rldhont
a6964b51bc Merge pull request #5413 from rldhont/server-bugfix-display
[Server][Bugfix] Test if the environ variable DISPLAY is defined
2017-10-23 14:20:23 +02:00
Nyall Dawson
1d043f3c5a Update test 2017-10-23 20:35:54 +11:00
Nyall Dawson
d8dc0f92de Make gpkg the first choice for processing vector outputs 2017-10-23 20:35:54 +11:00
rldhont
7bfd60ab78 [Server][Bugfix] Test if the environ variable DISPLAY is defined 2017-10-23 11:35:46 +02:00
Even Rouault
1822b76c1a [OGR provider/askUserForOGRSublayers] Use layername= instead of layerid= when no ambiguity (#16135)
When composing URI, use layer names if layer names are unique. This will
be more stable in case the datasource get layers added/removed (for example for
GeoPackage)
2017-10-23 11:04:20 +02: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
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
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
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
Marco Hugentobler
c99388804a Move creation of datasource uri for external wms layers to QgsWMSParameters 2017-10-20 11:19:02 +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