7029 Commits

Author SHA1 Message Date
Denis Rouzaud
275736de92 removed V2 from QgsSymbolV2* 2016-08-05 08:22:21 +02:00
Denis Rouzaud
c16d1393a2 removed V2 from QgsSymbolLayerV2* 2016-08-05 08:18:01 +02:00
Nyall Dawson
c40d6d3f28 Add missing docs 2016-08-05 06:08:07 +10:00
Nyall Dawson
ed4d34fdbc QgsFields returns QgsField value instead of const references
(since QgsField is implicitly shared)
2016-08-05 06:08:07 +10:00
Nyall Dawson
967d37adc7 QgsFeature::fields() returns a value, not a pointer
Also remove all other QgsFields pointers and replace with
references/values, since QgsFields objects are implicitly shared
2016-08-05 06:07:02 +10:00
Denis Rouzaud
3e197ae74a remove QgsColorButton in favor of V2 2016-08-04 14:27:31 +02:00
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
Matthias Kuhn
8182f2970f QgsFeatureRendererV2::Capabilities to flags 2016-08-02 17:24:38 +02:00
Matthias Kuhn
2cf9243edb Split displayField into displayExpression and mapTipTemplate (#1973)
Previously there was the expressionField (a field name or an expression)
mainly used for the feature list in the form view of the dual view.
On the other hand there was the displayField which could contain either
a simple field name or a complex HTML structure with embedded expressions.
And to know what it was you could compare it's content with the field names, if
a field name matched, you used it as a displayField (original purpose) and
if not... well, you could deal with HTML if you had a use for it.

The main problem is that there are two different usages for this kind of
thing

 * plain text identifier (field or expression)
 * pretty, rich text feature info

This commit cleans up with this. You want rich text and a lot of info:
go for mapTipTemplate.
You want a plain text string to identify features: go for
the displayExpression.
2016-08-02 16:58:58 +02:00
Alexander Bruy
2134112aab [dbmanager] fix signal/slot connection 2016-08-02 16:50:27 +03:00
Denis Rouzaud
f5b11d9130 Merge pull request #3352 from 3nids/rubberband_ispolygon
QgsRubberBand: remove constructor and method with bool isPolygon
2016-08-02 15:11:13 +02:00
Denis Rouzaud
b7f4fe36e7 QgsRubberBand: remove constructor and method with bool isPolygon
use methods with Qgis::GeometryType instead
2016-08-02 13:56:02 +02:00
Martin Dobias
2482a6bbd0 Small cleanup in data items 2016-08-02 13:04:45 +02: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
Martin Dobias
9db9304627 Raster MTR improvements - part one (PR #3334) 2016-08-02 08:22:29 +02: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
f449bf2361 Make test layer comparison handle different order of features 2016-08-02 11:53:11 +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
Nyall Dawson
d075b128a8 Add missing docs 2016-08-02 07:26:11 +10:00
Martin Dobias
38b63edc46 Fix doc coverage test for "added in XXX" check 2016-08-01 23:05:37 +02:00
Tom Kralidis
f7a3fd7368 Merge pull request #3348 from tomkralidis/fix-requests-dep
ensure python-requests is available in the build
2016-08-01 10:57:30 -04:00
Nyall Dawson
4b78b1c208 Make all QgsGeometry methods return values, not pointers
Reduces likelihood of crashes and leaks
2016-08-01 22:41:55 +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
Tom Kralidis
4649e52cad ensure python-requests is available in the build 2016-08-01 08:26:06 -04:00
Alexander Bruy
98a5527406 [processing] add missed import (fix #15359) 2016-08-01 15:04:21 +03:00
Matthias Kuhn
3e33e686c1 Rename visibility presets to map themes
Because it is not only more descriptive for what it does but also
sounds more interesting.

[needs-docs]
2016-08-01 12:23:44 +02: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
Harrissou Sant-anna
ecf5543a1b fix typo in api docs (#3345) 2016-07-31 14:14:54 +02:00
Nyall Dawson
aceddae65a QgsFeature cleanup, part 1
Deprecate some QgsFeature methods which take or return pointers,
update other classes as required
2016-07-31 21:23:07 +10:00
Nyall Dawson
429fe2d4ce Merge pull request #3335 from nyalldawson/vector_layer
QgsVectorDataProvider::Capability improvements
2016-07-29 05:10:37 +10:00
Nyall Dawson
d87f2abf56 Merge pull request #3344 from nyalldawson/line_merge
[FEATURE] API + expression function for merging linestrings
2016-07-29 05:09:59 +10: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
Nyall Dawson
10c92394e7 [FEATURE] API + expression function for merging linestrings
Adds a new method to QgsGeometry for merging linestrings.
By passing a multilinestring, any connected lines will
be joined into single linestrings. Behind the scenes this
uses GEOS' line merge.

A corresponding expression function "line_merge" has also
been added.
2016-07-28 20:33:27 +10:00
Nyall Dawson
85f37eebb3 Add method to QgsAbstractGeometryV2 for boundary
Returns the closure of the combinatorial boundary of the
geometry (ie the topological boundary of the geometry).
For instance, a polygon geometry will have a boundary
consisting of the linestrings for each ring in the polygon.

Follows OGC / SQL/MM specs for boundary calculation
2016-07-28 08:16:57 +10:00
Tom Kralidis
d3af8a1ed6 Merge pull request #3336 from tomkralidis/owslib-0.11.2
upgrade OWSLib to 0.11.2
2016-07-27 10:21:23 -04:00
Nyall Dawson
26160c95c6 Merge pull request #3332 from nyalldawson/transform2
Remove the extra QgsCoordinateTransform constructors
2016-07-27 08:14:29 +10:00
Nyall Dawson
6c0d97a06b Merge pull request #3337 from nyalldawson/remove_psuedo_shader
Remove the broken, unused QgsPseudoColorShader class
2016-07-27 07:11:55 +10:00