14302 Commits

Author SHA1 Message Date
Peter Petrik
11f10c10c2 add documentation 2018-12-07 15:54:16 +01:00
Peter Petrik
fa1ddb1f7a fix spellcheck 2018-12-07 15:54:16 +01:00
Peter Petrik
28071728f1 [mesh] use MDAL 0.1.0 API in QGIS. Allows lazy loading of formats and effective transfer of data
introduce MeshDataBlock

use mesh block in rendering

calculate magnitude

use new mesh API

fix bug for memory layer

fix SIP, sip is unable to work with qvector<qgsmeshvertex>

fix tests

implement new MDAL min/max api

improve mesh documentation

fix travis build
2018-12-07 15:54:16 +01:00
Alessandro Pasotti
16922a3041
Merge pull request #8612 from elpaso/vector-legend-toggle-items
Add a toggle action to vector layer legend items [feature]
2018-12-07 09:36:14 +01:00
Alessandro Pasotti
465479056d Move toggle action first and fix since 3.6 2018-12-07 08:07:18 +01:00
Nyall Dawson
048d526542 Add unit tests, standardise method names 2018-12-07 08:08:52 +10:00
Nyall Dawson
34f6e371a7 [FEATURE][layouts] Add new grid frame style "Zebra (Nautical)",
which shows nautical-style blocks in the grid corners when a
margin is set for the grid.
2018-12-07 08:08:52 +10:00
Nyall Dawson
11258c05b0 [FEATURE][layouts] Don't draw diagonals on line border grid style when a
margin is set

Instead, split this behaviour off into a new "Line border (Nautical)"
grid style. It's a very specific type of effect and won't always
be desirable when using margins with the line border style.
2018-12-07 08:08:52 +10:00
Nyall Dawson
470cd0b619 Code style fixes 2018-12-07 08:08:52 +10:00
konst
d794bdb74c [FEATURE] [needs-docs] Add the grid frame MARGIN In the "Print Layout" map grid 2018-12-07 08:08:52 +10:00
Nyall Dawson
e6ec1ec53e [FEATURE][API] Add iterator for QgsGeometryCollection
Iterates over the geometries in the collection, allowing this type
of code:

  gc = QgsGeometryCollection()
  gc.fromWkt('GeometryCollection( Point(1 2), Point(11 12), LineString(33 34, 44 45))')
  for part in gc:
    print(part.asWkt())
2018-12-07 05:51:27 +10:00
Nyall Dawson
e23527bf92 Use TypeHint annotation to indicate correct return type when sip code returns SIP_PYOBJECT
Provides correct return type hints to IDEs (and hopefully PyQGIS docs too!)
2018-12-07 05:51:27 +10:00
Nyall Dawson
4bba8ae64d [FEATURE][API] Add some nice PyQGIS API for working with geometry collections
- Calling removeGeometry with an invalid index will now raise an IndexError
- Calling collection[0] will return the first geometry in the collection,
collection[1] the second, etc. And negative indices return from the end
of the collection, so collection[-1] returns the last geometry in the collection.
- Geometries can be deleted by calling `del collection[1]` (deletes the
second geometry from the collection). Also supports negative indices
to count from the end of the collection.
2018-12-07 05:51:27 +10:00
Nyall Dawson
f3b72608a1 Add message bar to QgsSymbolWidgetContext 2018-12-06 14:31:49 +10:00
Nyall Dawson
b95400806a [FEATURE][processing] Native "split lines by maximum length" algorithm
This algorithm takes an input (multi)line (or curve) layer, and splits
each feature into multiple parts such that no part is longer then
the specified maximum length.

Supports data-defined maximum length property, and edit in place operation.

Credit to @NathanW2 for the inspiration!
2018-12-06 10:01:31 +10:00
Nyall Dawson
9d28a9699c Add a new widget QgsImageSourceLineEdit, based on QgsSvgSourceLineEdit
Allows images to be set to base64 embedded images, remote urls, etc
when used alongside QgsImageCache
2018-12-06 09:22:50 +10:00
Nyall Dawson
cce5c4e802 [console] Correctly save settings when exiting app
The closeEvent approach which was previously used is not reliable
on application exit, so manually force a settings save in this case too.

Avoids loss of command history when closing QGIS

Also remove the manual "Save" history action, as it's redundant
2018-12-06 05:42:47 +10:00
Nyall Dawson
1f1bbbaeb6 [console] Fix saving scripts sometimes defaults to QGIS bin folder 2018-12-06 05:42:47 +10:00
Alessandro Pasotti
ff99f1b825 [feature] Add a toggle action to vector layer legend items 2018-12-05 12:34:43 +01:00
nirvn
c6425338ee [FEATURE] Raster image marker 2018-12-05 15:44:44 +07:00
nirvn
60442980dd Add dox comment, fix travis 2018-12-05 11:14:13 +07:00
nirvn
ad4b876866 Add opacity parameter to image cache 2018-12-05 11:14:13 +07:00
Nyall Dawson
c1df802769 Add method to QgsImageCache to retrieve original image size 2018-12-05 11:14:13 +07:00
Nyall Dawson
84838d1ec6 [FEATURE][API] Add a content cache for raster images
This new class QgsImageCache is the equivalent of QgsSvgCache
but for raster images.

QgsImageCache stores pre-rendered resampled versions of raster
image files, allowing efficient reuse without incurring the
cost of resampling on every render.

Additionally, it offers the other benefits QgsSvgCache has,
such as thread safety, ability to transparently download remote
images, and support for base64 encoded strings.
2018-12-05 11:14:13 +07:00
Nyall Dawson
cdba8f5621 Use QgsAbstractContentCache base class for QgsSvgCache 2018-12-05 11:14:13 +07:00
Nyall Dawson
22496dc139 Create a new abtract base class for file content caches (e.g. QgsSvgCache)
Generalise QgsSvgCache and split off into a common base class so
that we can re-use code with alternative similar caches, e.g. a
raster image cache.
2018-12-05 11:14:13 +07:00
Nyall Dawson
d79cee1fe1 [needs-docs][processing] Rename "remove duplicates by attribute" to
"delete duplicates by attribute"

for consistency with "delete duplicate geometries". Also add some
tags to delete duplicate geometries algorithm.
2018-12-05 07:36:13 +10:00
Nyall Dawson
9c1653f00a [processing] Fix exception on launching refactor fields
(The logic with parameter widget_wrapper metadata is very gross -
but there's nothing we can do about it till 4.0!)

Fixes #20707
2018-12-05 04:47:55 +10:00
Nyall Dawson
0ba37fcb72 [processing][SAGA] Add unit test for RGB composite 2018-12-05 04:47:33 +10:00
Nyall Dawson
71b32f072c [processing][SAGA] Fix output type for RGB Composite should be tif, not sdat format 2018-12-05 04:47:33 +10:00
Nyall Dawson
ff786f2223 Add group method to QgsSettings
Is present in the QSettings API, but missing from QgsSettings
2018-12-05 04:46:58 +10:00
Luigi Pirelli
c39e2b83da
Merge pull request #8445 from NaturalGIS/add_te_paramater_in_gdal_clip_by_mask
add the -te and -te_srs and -multi parameters to the gdalwarp tool used to clip rasters by mask layers
2018-12-04 11:32:52 +01:00
Giovanni Manghi
25bfca492f partial fix for SAGA RGB composite tool 2018-12-04 11:49:20 +10:00
Nyall Dawson
455e04ea66 [processing][SAGA] Fix definition of Patching algorithm
And add unit test

Fixes #20698
2018-12-04 10:36:38 +10:00
Nyall Dawson
4212deabe8 [processing][saga] Add unit test for point distances alg 2018-12-03 18:11:24 +10:00
Nyall Dawson
ef2fff0820 [processing][SAGA] Fix default output format for geometry-less tables 2018-12-03 18:11:24 +10:00
Nyall Dawson
4bca7838bf [processing] Add method for providers to specify a different list
of supported output formats when an output has no geometry
2018-12-03 18:11:24 +10:00
Luigi Pirelli
e1b3524b5d
Merge pull request #8443 from NaturalGIS/fix_saga_point_distances
fix the SAGA Points Distances tool
2018-12-02 23:36:38 +01:00
Alessandro Pasotti
0af1ce40a8
Merge pull request #8571 from elpaso/bugfix-20601-rastercalc-duplicated-layer-names
Fix rastercalc duplicated layer names
2018-11-30 10:17:38 +01:00
volaya
e546129f5c [processing] fixed update of MultipleInputPanel after alg is run
Fixes #20670
2018-11-30 09:17:07 +01:00
Alessandro Pasotti
50e5414232 Coding style and SIP_DEPRECATED 2018-11-30 09:03:28 +01:00
Nyall Dawson
3a66b92522 [processing] Fix crash when running model through modeler dialog
Fixes #20676
2018-11-30 10:02:52 +10:00
Denis Rouzaud
dde309439c
Merge pull request #8560 from 3nids/locator_context
Add context menu for locator filter results
2018-11-29 15:28:30 -04:00
Nyall Dawson
59d2c5301f [processing] Fix exception when parameter metadata is set to extend inbuilt wrapper type 2018-11-30 05:02:59 +10:00
Nyall Dawson
d72c4d001f [processing] Allow parameter metadata to set the number of decimal places
to show in numeric/distance widgets

E.g. to only show 2 decimal places:

  # only show two decimal places in parameter's widgets, not 6:
  param.setMetadata( {'widget_wrapper':
    { 'decimals': 2 }
  })
2018-11-30 05:02:59 +10:00
Denis Rouzaud
157c8f4987 more doc 2018-11-29 14:28:14 -04:00
Alessandro Pasotti
1672d434ce Raster calc: refresh layers list if a layer is renamed or added/removed
Fixes #20601 - bug: Raster calculator produces empty results layer and no error message if input layer is one that has been renamed in QGIS layers panel
2018-11-29 18:30:01 +01:00
Denis Rouzaud
c13b419d21 fix python bindings 2018-11-29 12:50:48 -04:00
Denis Rouzaud
e03537a4cf fix typo 2018-11-29 08:27:15 -04:00
Denis Rouzaud
f24daa2b69 allow to use icons too 2018-11-29 08:15:12 -04:00