19015 Commits

Author SHA1 Message Date
Nyall Dawson
eba9ffa46e Add option to control the plain text display method for fields using
the checkbox form widget

In QGIS 2.x we always displayed the underlying raw value of a field
using the checkbox widget in the attribute table or in identify results
(i.e. the text display of the field would always match the value
the user had set for the checked or unchecked representation status,
e.g. "yes"/"no", "present"/"absent", etc)

This was changed in 3.0 so that the representation status ONLY affected
how the underlying stored values are mapped to a boolean true or false
value, and accordingly the attribute table/identify results started
only showing "true" or "false" strings.

This new setting allows users to control whether they want plain text
displays of the field to use the 3.x "true"/"false" behavior (the
default), or if they want to see the 2.x style actual field value.
2021-02-16 11:17:28 +10:00
Nyall Dawson
fd657bee96 Fix misleading error message when an attribute form fails to
save changes

Regardless of the reason why the saving failed, a message about
invalid JSON was always shown... which is totally confusing for
users when a table has NO json fields or values (ノ`Д´)ノ
2021-02-16 09:42:19 +10:00
Giovanni Manghi
92a4899210
fix GRASS v_net_visibility module (#41515)
Fixes #41030
2021-02-16 08:54:36 +10:00
Nyall Dawson
48ce042c84 Take advantage of pre-computed static expression nodes when determining
the referenced fields of an expression

Avoids some cases where use of various expression functions which
normally trigger all attributes to be requested, yet can be pre-computed
during prepare stages, cause non-provider fields to be listed in
the referenced columns and accordingly prevent expression compilation.

Notably this can occur when using an expression like:

   aggregate( .... , filter:=
"some_child_field"=attribute(@atlas_feature, 'some_atlas_field_name') )

where the whole attribute(@atlas_feature....) part is a constant
static value and can be compiled down to a trivial, index-friendly
"some_child_field"=### filter for the aggregate provider request.
Ultimately giving a big performance boost to the atlas!
2021-02-15 12:12:00 +10:00
Loïc Bartoletti
e336b831c2 Remove automagic fix and tiny refacto 2021-02-13 09:25:19 +10:00
Loïc Bartoletti
7e7732218b Add a message if a geometry was fixed 2021-02-13 09:25:19 +10:00
Richard Duivenvoorde
80251ac97d Make FindBestFrameNumberForFramestart a lot faster 2021-02-13 06:41:56 +10:00
Nyall Dawson
22a4b881d3 Sipify 2021-02-12 15:41:14 +10:00
Nyall Dawson
980d9697a0 Simple line can cause tile artifacts if it's a dashed line 2021-02-12 15:41:14 +10:00
Nyall Dawson
f75c53bbd8 Add QgsSymbol::canCauseArtifactsBetweenAdjacentTiles()
Returns True if ANY of the symbol layers contained in the symbol
can cause tile rendering artifacts
2021-02-12 15:41:14 +10:00
Nyall Dawson
bdf5e4fe3b Add QgsSymbolLayer::canCauseArtifactsBetweenAdjacentTiles()
Returns true if the symbol layer rendering can cause visible
artifacts across a single feature when the feature is rendered
as a series of adjacent map tiles each containing a portion
of the feature's geometry.

This depends on the symbol layer derived class itself - eg
a simple solid color fill won't show any artifacts, but a shapeburst
fill WILL.
2021-02-12 15:41:14 +10:00
Nyall Dawson
d5e2051818 Spelling 2021-02-12 15:41:14 +10:00
Nyall Dawson
4b921d9ee9 Respect project "avoid tile artefacts" setting when rendering
a project using WMS services

Fixes #37679
2021-02-12 15:41:14 +10:00
Nyall Dawson
cf43c60717 Fix clazy warnings 2021-02-12 12:42:22 +10:00
Nyall Dawson
8fa29ac6d2 When we are compiling expressions to handoff to backend providers,
check if a node has already been determined to evaluate to a static,
precalculated value, and if so, use this value for the node instead
of attempting to compile the actual contents of the node itself

If we are certain that a node is static and will never change,
the this potentially allows us to short-cut a large part of the
filter expressions content. We already use this short-cut when
evaluating expressions on the QGIS side since years, and its
proven to be stable and reliable. By respecting this during
expression compilation we can offer a huge speed up to certain
filter expressions, especially those which utilise QGIS variables
which are known to be static (such as atlas variables, map scales,
etc). Previously ANY use of a qgis variable would always cause
expression compilation to fail and require a full set of feature
fetching from the provider.

(Resulted in orders of magnitude faster atlas export for a complex
atlas.)
2021-02-12 06:05:56 +10:00
Nyall Dawson
f41292a276
Merge pull request #41483 from nyalldawson/octagon
Add "octagon" and "square with corners" shapes to simple marker
2021-02-11 17:36:15 +10:00
Nyall Dawson
c582967b6e Add "octagon", "asterisk" and "square with corners" shapes to simple marker
available shapes
2021-02-11 16:01:50 +10:00
Luigi Pirelli
2f7d6defee Added sanity check of links between graphicitems showing error in dialog. Fixes #40724 #39260 2021-02-11 11:47:28 +10:00
NEDJIMAbelgacem
5de28dd580 return maximum screen space in 3D 2021-02-10 13:49:28 +01:00
NEDJIMAbelgacem
86a71391df remove point budget approach from 2D rendering 2021-02-10 13:49:28 +01:00
Belgacem
6019168a86 make point cloud rendering better and make UI for point budget 2021-02-10 13:49:28 +01:00
Belgacem
eb1ff089a6 implementation of point budget in 2D 2021-02-10 13:49:28 +01:00
Nyall Dawson
b4025442e8 [processing] Automatically load the native and 3d providers
when a script calls Processing.initialize() if they are not
already loaded

This means the following ugly code can be avoided:

    Processing.initialize()
    QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms(QgsApplication.processingRegistry()))
    QgsApplication.processingRegistry().addProvider(Qgs3DAlgorithms(QgsApplication.processingRegistry()))

and instead the call to Processing.initialize() is sufficient to load
ALL providers

Fixes #41310
2021-02-09 20:13:01 +10:00
Nyall Dawson
cc5cbabaa3 Avoid API break 2021-02-09 20:12:37 +10:00
Harrissou Sant-anna
3a952a6981 Remove Add ArcGIS map service button
after it's merged with feature service

(cherry picked from commit 82797ac8d28e50a03c2190d7a8df1d740f688c5f)
2021-02-09 20:12:37 +10:00
Nyall Dawson
645397e83d Fix restoring previous GDAL alg raster creation options when running an algorithm from processing history 2021-02-09 15:14:44 +10:00
Nyall Dawson
c6613593c7 Don't loop through all selected features multiple times (once per
field) when the attribute form is opened.

This is incredibly expensive, yet only required in a very very small
corner case (field is from a joined layer without the upsert on edit
capabilities).

Refine logic to avoid the scan wherever we can.

Fixes #41366
Fixes #36863
2021-02-09 10:24:45 +10:00
Nyall Dawson
c7a25c6275 Split grass raster tests into two blocks 2021-02-09 09:31:44 +10:00
Nyall Dawson
5a46dee738
Merge pull request #41260 from qgis/test-focal
Update test base image and move CI to Github workflow
2021-02-08 18:13:55 +10:00
Nyall Dawson
2bc9f98bdd Another SAGA hash 2021-02-08 13:23:41 +10:00
Nyall Dawson
36a07f795a SAGA test hash 2021-02-08 13:23:41 +10:00
Nyall Dawson
2aacc6def0 Saga tolerance 2021-02-08 13:23:41 +10:00
Nyall Dawson
4005768f5b Check in mask files 2021-02-08 13:23:41 +10:00
Nyall Dawson
63bc64d1fa SAGA test tolerance 2021-02-08 13:23:41 +10:00
Nyall Dawson
6f8833d070 More saga test tolerance 2021-02-08 13:23:40 +10:00
Nyall Dawson
973682baa3 Use QgsRenderChecker to compare png images when comparing processing result
directories
2021-02-08 13:23:40 +10:00
Nyall Dawson
1af083415a Use a different technique to compare expected vs result directories in processing tests, which allows us to compare the
contents of files using a more flexible approach
2021-02-08 13:23:40 +10:00
Nyall Dawson
32df2d7966 SAGA silliness 2021-02-08 13:23:40 +10:00
Nyall Dawson
6c0fbe822e More tolerance in SAGA tests 2021-02-08 13:23:40 +10:00
Nyall Dawson
22fc50f6bf Disable r.rescale test -- cause intermitten segfaults in GRASS on CI (not our fault) 2021-02-08 13:23:40 +10:00
Nyall Dawson
7e691b561e Disable the i.pansharpen test -- GRASS on CI raises a python exception when running this tool (not our fault) 2021-02-08 13:23:40 +10:00
Nyall Dawson
39acbf86c7 More SAGA test nonsense 2021-02-08 13:23:40 +10:00
Nyall Dawson
bbe2ffeeef Disable some SAGA tests, make others more tolerant
Life is too short to deal with SAGA
2021-02-08 13:23:40 +10:00
Nyall Dawson
deea4fbe58 Update grass tests 2021-02-08 13:23:40 +10:00
Nyall Dawson
3f2dc1504f On newer GRASS versions i.eb.hsebal01 requires a raster layer for vapourpressureactual, not a numeric value 2021-02-08 13:23:40 +10:00
Nyall Dawson
1629a576dc Add grass raster hashes 2021-02-08 13:23:40 +10:00
Nyall Dawson
1be431d93e v.rast.stats refuses to create shapefiles in newer grass versions, so use a different format 2021-02-08 13:23:40 +10:00
Nyall Dawson
404d2bc563 Add a reference hash 2021-02-08 13:23:40 +10:00
Nyall Dawson
0573a8dba6 Fix crs of reference dataset 2021-02-08 13:23:40 +10:00
Nyall Dawson
43b5f00267 Trust GDAL gives correct results given that we are confident we are creating the correct command line string 2021-02-08 13:23:40 +10:00