34011 Commits

Author SHA1 Message Date
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
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
Matthias Kuhn
ea0f4da58c Sort attribute table by value for numerical columns
Fix #15318
Fix #15295
2016-08-01 16:31:16 +02: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
Nathan
8f5272e42c Swtich to ~/.qgis-dev for user folder
Avoids errors on QGIS 2.x API plugins now we have broken
API in for 3.x
2016-07-30 19:51:15 +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
635c00923e Merge pull request #3343 from nirvn/statusbar_imp
[gui] gray lock icon, and flat style for extent button
2016-07-28 18:41:16 +10:00
nirvn
6bd15ff79e [gui] gray lock icon, and flat style for extent button 2016-07-28 15:29:28 +07:00
Nyall Dawson
27697e6efc Improve polygon perimeter labeling
This commit changes the way polygon perimeter labeling works.
Previously the polygon would be clipped to the view extent, and
then the boundary of the clipped polygon used for perimeter
labeling.

This tended to push the labels to the outside of the map extent
(the clip boundary), since that's the longest straight section
of the resultant geometry.

Now, the boundary is taken *before* the clip, so that perimeter
based labels will never be placed on the artificial boundary
created at the map's extent.
2016-07-28 18:21:49 +10:00
Nyall Dawson
bc73c56e14 Merge pull request #3341 from nyalldawson/boundary
New method for calculating geometry boundary
2016-07-28 10:12:49 +10:00
Nyall Dawson
1a4ceb1680 [FEATURE] Expression function for calculating geometry boundary
The new 'boundary(...)' function returns a geometry's topological
boundary, ie for polygons this is a multilinestring representing
the polygons rings
2016-07-28 08:16:57 +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
ee09131df8 Revert "Bump default number of label candidates"
AKA f***ing label tests!!!

This reverts commit cd22d4fbc3962ee6772fde588b34c9a2efdc1f3a.
2016-07-27 15:36:36 +10:00
Nyall Dawson
9db46ef16e Revert "Default to cartographic label placement for point layers"
This reverts commit e0609d675af69ea6d90477456ff4561bd95fa9e6.
2016-07-27 15:36:27 +10:00
Nyall Dawson
e0609d675a Default to cartographic label placement for point layers
It's much nicer than "around point"
2016-07-27 13:58:56 +10:00
Nyall Dawson
cd22d4fbc3 Bump default number of label candidates
Results in much nicer label placement and little to no speed
regression in most cases
2016-07-27 13:52:20 +10:00
Nyall Dawson
5f33991e7b [FEATURE] Label polygons using curved labels along perimeter
This adds a new mode for labeling polygons, where the perimeter
of the polygon is labeled using curved labeling.
2016-07-27 13:36:49 +10:00
Frits van Veen
c0b1684058 Fix labeling using perimeter with repeating label distance set
If the visible part of a polygon is clipped and becomes a multipolygon, only
one label is plotted on the wrong side of the polygon.

Settings:
Placement: Using Perimeter
Allowed positions: Below line / Line orientation dependent position checked
Repeat: 100 mm

Fix #15341
2016-07-27 11:02:06 +10:00
Nyall Dawson
530a85216e Fix map not refreshed after using pan to selected (fix #15324) 2016-07-27 09:50:49 +10: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
Nyall Dawson
4a3924ca3f Remove the extra QgsCoordinateTransform constructors
...and leave only:

QgsCoordinateTransform( const QgsCoordinateReferenceSystem& source,
                        const QgsCoordinateReferenceSystem& destination );

The other constructors were not used anyway in QGIS code,
had awkward/confusing API, and no unit tests.
2016-07-27 07:10:46 +10:00
Nyall Dawson
3d6688cce5 Add labeling tests for letter/word spacing 2016-07-27 06:37:16 +10:00
Nyall Dawson
5228de353c Update curved label test reference images 2016-07-27 06:37:16 +10:00
Nyall Dawson
449fcad8ce [labels] Fix word and letter spacing truncated to integers 2016-07-27 06:37:16 +10:00
Frits van Veen
22fdb6ab9f [labeling] Curved labels are now angled per character
...instead of shifted along base line (fix #15210)
2016-07-27 06:37:16 +10: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
Juergen E. Fischer
3138cab6fa fix build (followup f6b09ea) 2016-07-26 08:54:29 +02:00
Nyall Dawson
76c4cae0a3 Fix text annotation edit background should match frame background
Otherwise white text is not visible. Fix #10553.
2016-07-26 15:52:46 +10:00
Nyall Dawson
0fa6499bef Merge pull request #3329 from nyalldawson/annotations
Add an interface class for annotations, remove some hacks
2016-07-26 12:39:18 +10:00
Nyall Dawson
68b621ace6 Merge pull request #3314 from nyalldawson/units
Consolidate unit handling in QgsUnitTypes
2016-07-26 11:14:35 +10:00
Nyall Dawson
1e9274adbb Docs 2016-07-26 11:11:05 +10:00