3629 Commits

Author SHA1 Message Date
Matthias Kuhn
bb79d13e82 Remove deprecated Qgis::WKBType and API cleanup (#3325)
* Remove deprecated Qgis::WKBType and API cleanup

Renames QgsWKBTypes to QgsWkbTypes

Replaces usage of the enums:

* Qgis::WKBType with QgsWkbTypes::Type
* Qgis::GeometryType with QgsWkbTypes::GeometryType

Their values should be forward compatible (a fact that was already
explited up to now by casting between the types)

Renames some SSLxxx to SslXxx and URIxxx to UriXxx

* Fix build warnings and simplify type handling

* Add a fixer to rewrite imports

* The forgotten rebase conflictThe forgotten rebase conflicts

* QgsDataSourcURI > QgsDataSourceUri

* QgsWKBTypes > QgsWkbTypes

* Qgis.WKBGeom > QgsWkbTypes.Geom

* Further python fixes

* Guess what... Qgis::wkbDimensions != QgsWkbTypes::wkbDimensions

* Fix tests

* Python 3 updates

* [travis] pull request caching cannot be disabled

so at least use it in r/w mode

* Fix python3 print in plugins
2016-08-04 09:10:08 +02:00
Nyall Dawson
d1aa03a09b Better clip for very separate features 2016-08-03 13:41:22 +10:00
Nyall Dawson
71ebdb8f69 [FEATURE] Optimise processing clip algorithm
Before the algorithm was written to optimise clipping a few
features against thousands of mask features. The revised algorithm
is optimised for clipping thousands of input features against
a few mask features.

Given that this second operation is much more likely, it makes
sense to optimise for this use case.

I've also applied some other optimisations like taking advantage
of spatial indexes on the providers, using prepared geometries
and also only applying an intersection operation if the geometry
isn't wholly contained by the mask geometry.

Benchmarks:

clipping roads layer with 1 million lines against 2 polygons

before: 5 mins 30 seconds
after: 10 seconds

clipping address layer with 5 million points against 2 polygons

before: 50 minutes
after: 30 seconds
2016-08-03 13:15:03 +10:00
Alexander Bruy
2134112aab [dbmanager] fix signal/slot connection 2016-08-02 16:50:27 +03:00
Alexander Bruy
517f4e1f7f [processing] fix import 2016-08-02 12:14:16 +03:00
Alexander Bruy
02e846ab5e expand all groups if filter applied 2016-08-02 11:23:51 +03:00
Alexander Bruy
592c33f41e [FEATURE][processing] add search to Get Scripts and Models dialog (fix #12067) 2016-08-02 11:23:25 +03:00
Nyall Dawson
4bfdcf0927 Fix expected test data 2016-08-02 13:50:59 +10:00
Nyall Dawson
60147e8147 Remove use of constGeometry 2016-08-02 13:50:59 +10:00
Nyall Dawson
bb54b4f41a [FEATURE] Make processing dissolve algorithm accept multiple fields
This allows you to dissolve based on more than one field value
2016-08-02 11:54:02 +10:00
Nyall Dawson
fda93dfc57 [processing] Fix broken multi field selection widget 2016-08-02 11:53:11 +10:00
Nyall Dawson
0455b6600d [processing] Fix multipart to singlepart handling of null geometry 2016-08-02 11:53:11 +10:00
Nyall Dawson
ccfd4c36be [processing] Add test for dissolve using field values 2016-08-02 11:52:37 +10:00
Nyall Dawson
30fcaed634 [FEATURE][processing] New algorithm for merging connected lines
This algorithm joins all connected parts of MultiLineString
geometries into single LineString geometries.

If any parts of the input MultiLineString geometries are not
connected, the resultant geometry will be a MultiLineString
containing any lines which could be merged and any non-connected
line parts.
2016-08-02 11:51:44 +10:00
Nyall Dawson
e259e62941 Merge pull request #3349 from nyalldawson/feature_geom
Mega API break - fix QgsFeature geometry getters/setters
2016-08-02 09:21:25 +10:00
Nyall Dawson
b7ca001c9c Add __nonzero__ and __bool__ methods to QgsGeometry 2016-08-02 08:39:58 +10:00
Alexander Bruy
1d2b0b4ca7 [processing] don't apply additional parameter if offset curve operation is used (fix #15342) 2016-08-01 15:26:58 +03:00
Alexander Bruy
98a5527406 [processing] add missed import (fix #15359) 2016-08-01 15:04:21 +03:00
Nyall Dawson
bd7d913379 Refine QgsFeature geometry getters/setters
All pointer based methods have been removed.

Now we have only:

  void setGeometry( const QgsGeometry& geom )

and

  QgsGeometry geometry() const

Benefits include avoiding a whole lot of tricky pointer lifetime
issues, potential memory leaks, and finally closing #777, which
has survived for over 9 years!...

Impacts on PyQGIS code:
- no more need for the messy
  g = QgsGeometry( feature.geometry() )
  workaround, just use g = feature.geometry() instead
- IMPORTANT: you can no longer test whether a feature has geometry
 using `if f.geometry():`, since QgsFeature::geometry() will
 *always* return an object. Instead, use
 `if not f.geometry().isEmpty():`, or preferably the new method
 `if not f.hasGeometry():`

Fix #777
2016-08-01 16:25:46 +10:00
radosuav
1da60c530d [Processing] Fix exception on right click ToolboxAction (#3347) 2016-08-01 00:09:23 +02:00
Alexander Bruy
7f6bae1f5e [processing] use '-te_crs' parameter only if supported by GDAL 2016-07-28 13:39:22 +03:00
Alexander Bruy
572a60b7af [GdalTools] add missed signals (fix #15348)
follow up 9db908ccbc
2016-07-28 13:38:00 +03:00
rldhont
153b1c1d0e Merge pull request #3322 from rldhont/db_manager_update_sql_layer
[DB Manager] Add the ability to update SQL Layer
2016-07-26 15:36:11 +02:00
Alexander Bruy
b3a38f4018 [processing] fix issues with exported layers in GDAL provider 2016-07-26 15:00:26 +03:00
Alexander Bruy
6ccf7264a6 [processing] fix condition in warp alg 2016-07-26 15:00:26 +03:00
Alexander Bruy
01dd338677 [processing] fix dialog title 2016-07-25 16:24:44 +03:00
Alexander Bruy
48cca3bc12 [processing] always use user-defined default folder for scripts/models 2016-07-25 16:22:21 +03:00
Alexander Bruy
b167c09e44 [processing] use default models folder when adding model from file (fix #15335) 2016-07-25 14:17:46 +03:00
Alexander Bruy
4e94963af5 [processing] different shortcut for commander (fix #15334) 2016-07-25 14:13:48 +03:00
Alexander Bruy
2fbb617d61 [processing] also fix case without dissolving 2016-07-22 15:43:04 +03:00
Alexander Bruy
9976c30c9a [processing] fix buffer tool 2016-07-22 15:37:16 +03:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
volaya
df2ca2e607 [processing] use SilentProgress by default if no progress object is passed 2016-07-21 07:01:17 +02:00
volaya
6c486758c2 [processing] changed saga decorated group name 2016-07-21 07:01:16 +02:00
rldhont
c1cdfe860d [DB Manager] Add the ability to update SQL Layer 2016-07-20 12:20:01 +02:00
Akbar Gumbira
20a2a20025 [processing] Fix add script from file. 2016-07-18 13:11:54 +02:00
volaya
a0bfc4c99e [processing] do not remove menus when exiting config dialog 2016-07-18 09:07:05 +02:00
Nyall Dawson
6c6f3c1e34 Remove deprecated members from QgsMapLayer 2016-07-15 06:02:45 +10:00
Nyall Dawson
2db7fca7a6 [processing] Add tests for clip algorithm 2016-07-14 08:05:59 +10:00
Nyall Dawson
9e1ddcb54d [processing] Allow modification of feature request when using
vector.features

Allows for optimising the request through subsets of attributes
or no geometry fetching
2016-07-13 12:06:41 +10:00
Juergen E. Fischer
e451b9ad6f indentation and spelling fixes 2016-07-08 12:59:38 +02:00
Martin Dobias
47eae5865a [processing] Fix preconfigured alg creation (fixes #15100) 2016-07-05 19:32:33 +02:00
Matthias Kuhn
143cfab104 [processing] Difference: don't ignore invalid geometries by default
Fix #9297
2016-07-04 00:43:36 +02:00
Juergen E. Fischer
a6954b2771 [dbmanager] re-enable line number again (followup 5e36de7 and d9f934f) 2016-07-03 20:22:13 +02:00
Matthias Kuhn
f6710b0528 python3 fixes 2016-07-03 14:54:26 +02:00
Matthias Kuhn
5e36de70b0 [dbmanager] Fix error when opening SQL window 2016-07-03 14:48:17 +02:00
Alexander Bruy
a12152c724 Merge pull request #3238 from medspx/processing_g7_raster_tests
[processing] more grass7 unit tests and their fixes
2016-06-29 19:49:58 +03:00
Alexander Bruy
0f6e8da645 Merge pull request #3234 from aharfoot/GDALTools_bugfix
fix bug in GDALTools Assign Projection
2016-06-29 19:17:06 +03:00
Alexander Bruy
1b60b088a2 [processing] support more field types 2016-06-27 14:18:31 +03:00
Médéric RIBREUX
ef4a0d8d08 Move problematics tests at the end of tests... 2016-06-26 21:20:19 +02:00