59148 Commits

Author SHA1 Message Date
Denis Rouzaud
f341b34a66
do not limit the number of classes in logarithmic method (#33223)
this was preventing from setting enough classes
2019-12-04 11:11:08 +01:00
Nyall Dawson
7746061b46 [FEATURE][processing] New algorithm "Repair Shapefile"
Uses GDAL to repair shapefiles which have a broken or missing .SHX file
2019-12-04 19:58:02 +10:00
Nyall Dawson
b4bc7cbffd iface.newProject() should return False if a new project could not
be created (e.g. if the user opts to cancel when prompted to save the
current project)
2019-12-04 19:02:46 +10:00
rldhont
caf8cfafa4 [Tests] Update QgsVectorLayer readSld to test read label 2019-12-04 17:13:01 +10:00
rldhont
e6559ca69e [Bugfix] QgsVectorLayer: Read SLD Labeling
The error was:
* QgsRenderer did not exclude SLD TextSymbolzer as a rendering configuration.
* QgsVectorLayer did not well detect SLD Text Symbolizer
* QgsVectorLayer did not well read SLD Labeling produced by QgsVectorLayer

The QgsOgcUtils and QgsSymbolLayerUtils classes have to be enhanced for a better homogenized capabilities.
2019-12-04 17:13:01 +10:00
Sandro Santilli
66ba86f1f8 PointCloud is unavailable when you can't read its metadata
Fixes #32972
2019-12-04 16:59:24 +10:00
Sandro Santilli
30fe748469 Add test for pointcloud layers fetching and related permissions
This commit is expected to fail, lacking an actual fix

See #32972
2019-12-04 16:59:24 +10:00
Sandro Santilli
5ad7be5a7b Add pcpoint as a supported spatial type 2019-12-04 16:59:24 +10:00
Sandro Santilli
66ea653e16 Do not use pcpatch type name when not available 2019-12-04 16:59:24 +10:00
Nyall Dawson
9a710f2441 Fix wording 2019-12-04 16:50:52 +10:00
Nyall Dawson
2774df2f74 [FEATURE] Show "Open Document..." action when right clicking certain
files in the browser, allowing them to be opened with the default
application for that file type

E.g. PDFs will open with the default PDF viewer.

Works with PDF, ODS, XLS(X), CSV, TXT, PNG, JPEG, TIFF, SVG
(other types will likely need more work, since they aren't
currently shown in the browser)
2019-12-04 16:50:52 +10:00
Nyall Dawson
66456a30e7 [labeling] When a layer is set to "blocking" mode, expose the obstacle
settings widget to allow users to tweak the obstacle behavior

Previously these settings were stuck inside the disabled label settings
widget, which meant that to edit them you had to temporarily enable simple
labels, tweak the setting, and then set back to obstacle mode... woot.
2019-12-04 14:47:36 +10:00
Nyall Dawson
e70db922d0 Avoid fragile combo box index based logic 2019-12-04 14:47:36 +10:00
Nyall Dawson
d63714ae63 Fix spelling 2019-12-04 14:47:36 +10:00
Nyall Dawson
22ea01b0fb Add a helpful label explaining obstacle weight 2019-12-04 14:47:36 +10:00
Nyall Dawson
7e6c6e721b Fix build 2019-12-04 14:47:36 +10:00
Nyall Dawson
02fffdc64b [needs-docs] Move label obstacle settings to "placement" tab
and show detailed settings in a stacked panel widget

Because:

1. The settings belong next to the placement settings, because they
affect label placement directly (and are closely associated with the
label priority setting in this tab)

2. The label settings widget is ridiculously complex and overwhelming
even for experienced QGIS users. By moving detailed settings into
stacked panels we can avoid the initial complexity of the label settings
whilst also allowing us more flexibility to expose additional settings
in future without adding to the mess. So in future, I propose we move
all detailed settings to sub panels, and leave only the initial "enable"
setting at the top level (e.g. [x] "Repeat levels" -> click settings -> see
all repeat settings).
2019-12-04 14:47:36 +10:00
Nyall Dawson
cf43104806 Add some unit tests for label settings widgets 2019-12-04 14:47:36 +10:00
Nyall Dawson
ed93ebd91c Add QgsLabelObstacleSettingsWidget widget for customising label obstacle settings 2019-12-04 14:47:36 +10:00
Nyall Dawson
de2b60d7ef Hookup data defined properties support for QgsLabelSettingsWidgetBase 2019-12-04 14:47:36 +10:00
Nyall Dawson
060cfb4eeb [api] New class QgsLabelSettingsWidgetBase
Base class for widgets which allow customisation of label engine properties,
such as label placement settings.
2019-12-04 14:47:36 +10:00
vcloarec
14c0d2c668 adds guard to prevent crash with mesh vector renderer
If the vector renderer factory returns a null ptr, this prevents QGIS crashing
.
2019-12-04 13:31:19 +10:00
Nyall Dawson
b736bf9a44 Huge speedup when labels are set to "boundary" obstacle mode
Because GEOS prepared predicates are "stubbed out" for many relation types,
such as overlaps and touches, we can get a HUGE speedup by reworking
the obstacle boundary check to utilise an intersects and within check instead
(with the same results)
2019-12-04 13:25:21 +10:00
Denis Rouzaud
42685043ad
shorter commit messages for PyQGIS docs jobs (#33189) 2019-12-03 12:02:38 +01:00
Nyall Dawson
23460272d4 Fix warnings 2019-12-03 19:38:24 +10:00
Nyall Dawson
316fd50b73 Fix tests 2019-12-03 19:38:24 +10:00
Nyall Dawson
9f63f49230 Move label obstacle settings out to their own class, and monkey patch around
to maintain current API

QgsPalLayerSettings is way too heavy, and we need to start refactoring
this into smaller atomic components
2019-12-03 19:38:24 +10:00
Nyall Dawson
f145fa96c8 [labeling] Default polygon obstacle mode is now Boundary avoidance
(This works better with the new placement engine logic)
2019-12-03 19:38:24 +10:00
Nyall Dawson
b235d31b8f Move QgsPalLayerSettings default values to header 2019-12-03 19:38:24 +10:00
Nyall Dawson
964681f0c1 Fix capitalizationation 2019-12-03 19:38:24 +10:00
Vincent Cloarec
7f415ca7a7 [FEATURE] Static particle traces for rendering mesh vector dataset (#33165)
* [FEATURE] Static particle traces for rendering mesh vector dataset

This PR permits to display directly in QGIS static particle traces for vector datasets in mesh layer without any plugin.
The user can choose in the mesh layer properties window :
- the color
- the size of the traces (line width)
- the count of particles
- the maximum length of the particle's tail
2019-12-03 08:13:36 +01:00
Nyall Dawson
ea5b4234ab Default to label placement engine v2 for newly created projects (for QGIS 3.12) 2019-12-03 13:48:45 +10:00
Nyall Dawson
9904fe8621 Refine behavior of obstacle weight slider to match feature weight slider 2019-12-03 13:48:45 +10:00
Nyall Dawson
435287260c [labels] Ensure that we show labels where we've ripped away all the candidates
when showing "unplaced labels"
2019-12-03 13:48:45 +10:00
Nyall Dawson
2c7f89a769 Fix tests 2019-12-03 13:48:45 +10:00
Nyall Dawson
19b8d43388 [needs-docs] When running in label engine v2 mode, discard any candidates where
they collide with an obstacle feature of greater weight when compared
to the label's priority

Previously, obstacle weight was used ONLY to rank a features' label
candidates relative to each other, but was never used to actually prune candidates
completely. This meant that the labeling obstacle functionality was
confusing and frustrating for users to work with -- because despite
setting layers as the maximum possible blocking weight, you'd still
see labels being placed over these features (e.g. where the labeling
engine had no other choice).

Now, (when a project is set to v2 labeling engine mode), labels will
NEVER be placed over obstacles of greater weight. This means that
labels will potentially be omitted if the only choice is to place
them over a high weighting obstacle. But ultimately, that's much
more understandable for users -- they've manually set a particular
layer to a high obstacle factor, so we should respect that and
never place labels on these features.

In the end, this change makes the labeling placement much simpler
to understand for users, and should give power users a much
nicer experience all round.

Funded by the QGIS grants program
2019-12-03 13:48:45 +10:00
Nyall Dawson
bee6ab846e Fix obstacle factor is ignored when a layer is set to blocking mode
It was only correctly being respected for fully labeled layers
2019-12-03 13:48:45 +10:00
Nyall Dawson
7f4226d209 Update labeling tests to use engine v2, update expected reference images 2019-12-03 13:48:45 +10:00
Nyall Dawson
499f240ca7 More raw double arrays to vectors 2019-12-03 13:48:45 +10:00
Juergen E. Fischer
fe9dcf1f33 azure-pipelines: fix dependency package reference 2019-12-03 01:10:18 +01:00
Alessandro Pasotti
af1c087919
Merge pull request #33185 from elpaso/mxe-64bit
Mxe 64bit
2019-12-02 10:47:02 +01:00
Matthias Kuhn
678a877704
Merge pull request #33163 from m-kuhn/dxf_server_params
Add DXF server export params NO_MTEXT and FORCE_2D
2019-12-02 08:17:06 +01:00
Matthias Kuhn
574e0ebaa1 [db_manager] Allow opening .sql files
and not only .SQL files
also allow any file extension

Fix #33173
2019-12-02 01:43:28 +10:00
Matthias Kuhn
0eee45aa16 Remove empty file 2019-12-02 01:43:06 +10:00
Matthias Kuhn
ba87ae6a3c Fix tests 2019-12-01 10:07:34 +01:00
Matthias Kuhn
e87ea5ef85 Add dox 2019-12-01 10:04:15 +01:00
Matthias Kuhn
66ef33b48b
Merge pull request #33171 from DelazJ/patch-11
Remove wrong tooltip applied to any unset vector properties tab
2019-12-01 10:01:59 +01:00
Matthias Kuhn
2bd4689091 Capizalize undocumented parameter 2019-12-01 08:39:41 +01:00
Harrissou Sant-anna
6b1dfa771a
Remove wrong tooltip applied to any unset vector properties tab
and add one to the mask tab
2019-12-01 01:23:58 +01:00
Juergen E. Fischer
4c234f21b4 add azure pipeline badge 2019-11-30 21:10:32 +01:00