5576 Commits

Author SHA1 Message Date
Blottiere Paul
c09e10ceb2 Update doc and sip binding 2019-04-09 15:43:11 +02:00
Blottiere Paul
911ef98677 Update sip binding 2019-04-09 15:43:11 +02:00
Nyall Dawson
933559b655 [processing] Report provider version string alongside QGIS version in log
Helpful for debugging and reproducability of results
2019-04-08 16:59:15 +10:00
Nyall Dawson
708bf4425b [processing] Add version method to QgsProcessingProvider
Allows retrieving provider version
2019-04-08 16:59:15 +10:00
Nyall Dawson
d3016d73d4 [processing] Add method to specify additional expression context variables
which will be available to a parameter when it is evaluated.

Specifying variables via this method is for metadata purposes only.
It is the algorithm's responsibility to correctly set the value of
these additional variables in all expression context used when evaluating
the parameter, in whichever way is appropriate for that particular variable.
2019-04-08 07:07:12 +10:00
Nyall Dawson
ee51551baa Add method to retrieve highlighted variable list from QgsExpressionContext 2019-04-08 07:07:12 +10:00
nirvn
9fd5509ad0 Add a aggregation method to concatenate unique values 2019-04-05 12:01:06 +07:00
Nyall Dawson
426382c919 [FEATURE] Average line angles for marker and hashed line symbology
Previously, when marker or hash lines were rendered using interval
or center point place placement, the symbol angles were determined
by taking the exact line orientation at the position of the symbol.

This often leads to undesirable rendering effects, where little
jaggies or corners in lines which occur at the position of the
symbol cause the marker or hash line to be oriented at a very
different angle to what the eye expects to see.

With this new option, the angle is instead calculated by averaging
the line over a specified distance either side of the symbol. E.g.
averaging the line angle over 4mm means we take the points along
the line 2mm from either side of the symbol placement, and use these
instead to calculate the line angle for that symbol. This has the
effect of smoothing (or removing) any tiny local deviations from
the overall line direction, resulting in much nicer visual
orientation of marker or hash lines.

Like all symbol settings, the average angle smoothing distance
can be set using mm/pixels/map units/etc, and supports data-defined
values.

Closed rings also correctly consider wrapping around these average
angles from the start/end vertex.

(Sponsored by an anonymous corporate backer)
2019-04-05 12:00:47 +10:00
Nyall Dawson
c2cac5aab0 Use unique_ptrs for proj object storage
Sponsored by ICSM
2019-04-05 11:33:08 +10:00
Nyall Dawson
f8f319b6e0 Fix dox 2019-04-03 02:31:27 +10:00
Nyall Dawson
48d2a37057 [FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.

To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.

This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.

The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-04-03 02:31:27 +10:00
Nyall Dawson
8d6e3dc911 [FEATURE][API] Add method to QgsSpatialIndex to perform
nearest neighbor search based on QgsGeometry to QgsGeometries

Previously only point - geometry was possible. But with this
change, you can safely and accurately use QgsSpatialIndex
to determine the nearest neighbours between any types of
geometries.
2019-04-03 02:31:03 +10:00
Nyall Dawson
6248bb8eea Fix failing TestQgsJsonUtils 2019-04-02 14:34:46 +10:00
Matthias Kuhn
1bb3f99f0e Properly convert to QgsVectorLayerEditpassTrough subclass 2019-04-02 06:18:45 +10:00
Nyall Dawson
7674e1657b [processing] Include version information at start of log
Start the log text with QGIS/Qt/GEOS/GDAL version information strings.
This is helpful for debugging and accountability.
2019-04-02 06:16:45 +10:00
Juergen E. Fischer
88513284d4 fix removal of temporary directories (fixes #21292) 2019-04-01 14:18:30 +02:00
Nyall Dawson
9820e6b222 Revert "fix removal of temporary directories"
This reverts commit b141349c90be91f191f612b7e2a349adde3c6349, which
causes crashes in almost every unit test.
2019-04-01 09:30:50 +10:00
Andrea Giudiceandrea
70f3bd7f60 deleteShapeFile(): delete also ".cpg", ".sbn", ".sbx", ".idm", ".ind" files
Make QgsVectorFileWriter::deleteShapeFile() delete ".cpg" (and ".sbn", ".sbx", ".idm", ".ind") files along with ".shp", ".shx", ".dbf", ".prj", ".qix", ".qpj" ones.
2019-04-01 08:37:36 +10:00
Juergen E. Fischer
b141349c90 fix removal of temporary directories 2019-04-01 00:02:12 +02:00
Alessandro Pasotti
5b5cc50b9e
Merge pull request #9620 from elpaso/bugfix-badlayers-storage
Bugfix badlayers storage
2019-03-28 08:14:53 +01:00
Denis Rouzaud
631c7016db
scope enum for QgsProcessing::LayerHint (#9639) 2019-03-27 17:23:36 -05:00
Nyall Dawson
858e5d0209 Sipify 2019-03-27 12:53:15 +10:00
Nyall Dawson
545e8bcf2c Add utility class for proj to Python bindings 2019-03-27 12:53:15 +10:00
Denis Rouzaud
60682885c0
Small tweak to enum Python docs (#9631)
original credits to @nyalldawson
2019-03-26 14:00:37 -05:00
Denis Rouzaud
f000956e86
Merge pull request #9437 from 3nids/maplayertype_enum
create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
2019-03-26 10:28:34 -05:00
henrik
cf63e00500 Added tests for PointDisplacementRenderer labels. 2019-03-26 18:17:12 +10:00
henrik
6fb06738ec [FEATURE] [needs-docs] Point Displacement label distance factor
Adds label distance factor spinbox to Point Displacement symbology
window. Calculates label distance based on the current symbology
diagonal instead of a general maximum diagonal.

Replaces the hard coded distance "symbolDiagonal/2.0" with
"symbolDiagonal*mLabelDistanceFactor", where mLabelDistanceFactor is set
to the spinbox value.

 It's an old feature request (Point displacement labels adjustable
offsets "https://issues.qgis.org/issues/5945").
2019-03-26 18:17:12 +10:00
Alessandro Pasotti
09fe865094
Merge pull request #9616 from elpaso/html-widget
HTML form widget
2019-03-26 08:04:50 +01:00
Alessandro Pasotti
0aa326b9f9 Enable webview tools and fix some minor dox issues 2019-03-25 18:09:13 +01:00
Denis Rouzaud
e232817e5b add missing doc 2019-03-25 11:00:17 -05:00
Alessandro Pasotti
e75308e700 Add test case for the layer store when re-adding a fixed layer 2019-03-25 15:03:46 +01:00
Alessandro Pasotti
eb3e18ddaa Added note in the documentation about the new behavior 2019-03-25 12:39:44 +01:00
Denis Rouzaud
9a6ddbd5c1 also monkey patch the former enum type 2019-03-24 21:40:33 -05:00
Denis Rouzaud
38c2d4a03d fix dox for unnested enums 2019-03-24 21:40:33 -05:00
Denis Rouzaud
f45314245c run sipify 2019-03-24 21:40:33 -05:00
Denis Rouzaud
375a0aa253 create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
the enum is moved out of the class
this will allow forward declaration more easily since the enum is not nested in the class
2019-03-24 21:40:33 -05:00
Alessandro Pasotti
b165258e6d [feature][needs-docs] HTML form widget
Shameless clone of QML widget, with some webview quirks.

Funded by ARPA Piemonte
2019-03-23 16:41:16 +01:00
Juergen E. Fischer
2af3535216 [needsbackport] apply an alternative fix for #20826
Partly reverts c9e761649, which removed the synchronizatiion of
credential requests (eg. in a project that has multiple layers from the
same postgresql database without credentials) and led to multiple
concurrent requests for the same credentials.

Some of which were silently discarded, when events processed in the
dialogs exec() event loop tried to reinvoke the dialog and caused
invalid layers.

Authentications caused by network requests can still cause this.

The credential cache is now guarded by a separate mutex.
2019-03-23 16:08:25 +01:00
Harrissou Sant-anna
f998ec9bb4 Remove duplicate word 2019-03-22 12:44:27 +10:00
Nyall Dawson
427ea515a5 Deprecate some more methods 2019-03-22 12:16:22 +10:00
Nyall Dawson
16a64ed84d Deprecate some methods, dox++ 2019-03-22 12:16:22 +10:00
Nyall Dawson
fa202795b0 Dox++ 2019-03-22 12:16:22 +10:00
Blottiere Paul
e9067834eb
Merge pull request #9362 from pblottiere/legend_json
Add json format for legend
2019-03-21 09:17:42 +01:00
Nyall Dawson
1dc447e1f2 Dox++ 2019-03-21 12:44:16 +10:00
Blottiere Paul
90b46f6a38 Add context in doc 2019-03-20 09:56:30 +00:00
Blottiere Paul
4efd410840 Update sip 2019-03-20 09:33:17 +00:00
Blottiere Paul
0cdd80d723 Update doc 2019-03-20 09:00:26 +00:00
Blottiere Paul
89a1b1a1ac Rename methods 2019-03-20 08:55:50 +00:00
Sandro Mani
0996c93d09 [Bugfix] Ensure order by attribute indices are valid 2019-03-19 16:22:18 +01:00
Blottiere Paul
7adb1145c6 Update SIP binding 2019-03-19 14:38:04 +00:00