2965 Commits

Author SHA1 Message Date
Nyall Dawson
ef147599df Add some helpful utility functions to QgsSymbol 2021-03-06 16:37:46 +10:00
nirvn
7eaa5b7074 [FEATURE][locator] Add a nominatim locator filter 2021-03-05 09:31:48 +07:00
Nyall Dawson
c6370c7f52
Speed up QGIS compilation by removing all Qt Module-wide includes
Refs https://www.kdab.com/beware-of-qt-module-wide-includes/
2021-03-05 11:23:15 +10:00
Nyall Dawson
afccd31720 Add method to add a linestring to compound curves where we extend
the existing final part if it's a linestring and the newly added
curve is also a linestring, instead of adding a whole new curve
2021-03-05 04:28:31 +10:00
Alessandro Pasotti
0908a0990e Add missing sip factory 2021-03-05 04:28:12 +10:00
Nyall Dawson
dfe734f650 [feature] Add per-field control over whether last entered field
values should be reused when creating new features

While there has long been a global option that causes ALL field
values for ALL layers to be remembered and reused during a QGIS
session when creating new features, this new setting offers
per-layer, per-field control over whether values should be
reused.

It allows for finer control over form behavior, where eg some
values may be desirable to reuse but others should be cleared
or set from default value expressions.
2021-03-04 15:21:07 +10:00
Nyall Dawson
b8baabf3f4 [FEATURE] Add new snapping option for "Line Endpoints"
When enabled, this snapping mode snaps to the beginning or end
vertex of lines only. When snapping to a polygon layer, only
the first vertex in rings will be snapped to.

Refs Natural resources Canada Contract: 3000720707
2021-03-04 12:20:39 +10:00
Alessandro Pasotti
675e150108 Remove deprecated calls 2021-03-02 12:25:15 +01:00
Alessandro Pasotti
d762646b81 Add SIP_DEPRECATED 2021-03-02 11:39:55 +01:00
Alessandro Pasotti
dccef52208 Support vector and raster mime URIs at the same time
Fixes #41563
2021-03-02 11:20:28 +01:00
Alessandro Pasotti
c6699b28b2
Merge pull request #41823 from elpaso/bugfix-gh41800-server-geprint-accesscontrol
Server WMS GetPrint accesscontrol support
2021-03-02 07:58:12 +01:00
Nyall Dawson
4c50469bd0 Spelling 2021-03-01 10:35:43 +10:00
Nyall Dawson
4240e20248 Add API to QgsProviderRegistry to obtain user friendly warning messages
for when a URI cannot be opened in a QGIS install, but the URI
matches a format which could potentially be opened in a different QGIS
install.

This can be used to show user-friendly warning messages advising user why
a particular uri cannot be opened on their QGIS install. For example, if
a QGIS install is built without the PDAL library then las/laz files are
unusable, and this method can be used to retrieve a user-friendly warning
as to why the las/laz files cannot be used on their QGIS build.

Instead of just showing the user a generic "not a valid or recognized data
source" error, we can use this api to show more helpful URIs about the
specific uri.

Initially intended to help advise users why LAS/LAZ files cannot be
opened on their QGIS install, but also could be used e.g. by mdal
to advise users about missing third party libraries preventing
them from opening certain mesh files, etc....
2021-03-01 10:09:06 +10:00
Alessandro Pasotti
59202c47a4 spell 2021-02-27 08:48:16 +01:00
Alessandro Pasotti
2318d761b2 QGIS 3 style doxy 2021-02-27 08:48:16 +01:00
Alessandro Pasotti
0470b5ff03 Server access control GetPrint support
Fixes #41800
2021-02-27 08:48:16 +01:00
Alessandro Pasotti
6d02a2abb0 Fix server getPrint accesscontrol for map items
Fixes #41800
2021-02-27 08:48:16 +01:00
tschmetzer
28c289d8ab
Improve QgsVectorLayer description (#41796)
Improve QgsVectorLayer description providing some more background explanation
2021-02-26 06:44:36 +10:00
tschmetzer
22026cc642
Add information about matching number of fields condition (#41799) 2021-02-26 06:43:40 +10:00
Nyall Dawson
cc9cbeca54 Use the GeographicLib routines exposed through PROJ for all ellipsoidal
calculations

Since GRASS upstream is moving away from the previous calculations which
all of QGIS' ellipsoidal distance/areas formulas are based on, let's
follow suit and delegate all these calculations to the GeographicLib
routines exposed through the PROJ api.

Refs https://github.com/OSGeo/grass/pull/1283
2021-02-25 16:35:37 +10:00
Nyall Dawson
6ab4ecfa58 Another attempt 2021-02-25 11:08:56 +10:00
Nyall Dawson
73658c5910 Fix mac build 2021-02-25 11:08:56 +10:00
Nyall Dawson
bd82925df3 Replace qgis::make_unique with std::make_unique
Now that we require c++14 features, we don't need to use the custom
backported version anymore...
2021-02-25 11:08:56 +10:00
Matthias Kuhn
b3dae9ad1a
Merge pull request #41539 from elpaso/bugfix-gh41477-editbuffer-passthrough
Bugfix gh41477 editbuffer passthrough
2021-02-24 14:42:49 +01:00
Nyall Dawson
14f2ab53b1 When attempting to precalculated nodes during an expression prepare
stage, be more intelligent about compiling AND or OR nodes

We can take advantage of the fact that and AND node will ALWAYS
be false if either input node is static and evaluates to FALSE,
and that OR nodes will always be true if either input is static
and evaluates to TRUE.

In some cases this allows us the shortcut and cut out non-static
nodes during preparation, resulting in faster evaluation and
more easily compiled expressions...
2021-02-24 12:39:36 +10:00
Nyall Dawson
d007901f14 Allow QgsRectangle constructors to bypass the automatic normalization
step, when they know in advance they are already normalized

This step isn't free, and can add up when many rectangles are
constructed
2021-02-23 16:02:06 +10:00
Nyall Dawson
b15be66472 Spelling 2021-02-23 15:49:23 +10:00
Nyall Dawson
d84da56dca Add rendered callout details to QgsLabelingResults for retrieval after a map render completes 2021-02-23 15:49:23 +10:00
Nyall Dawson
4f39cf6d6c Move QgsLabelingResults out to its own file 2021-02-23 15:49:23 +10:00
Nyall Dawson
a513f5a1e6 Move QgsLabelPosition out to own file 2021-02-23 15:49:23 +10:00
Nyall Dawson
ee25819b75 [FEATURE][labeling] Add data defined control over callout origin
and destination points

Allows users to data define the starting and ending points for
label callout lines, which is useful when needing to manually
control the exact placement of individual callout lines.
2021-02-23 13:41:58 +10:00
Nyall Dawson
d2e0e8d3b0 Add method for a callout to obtain a transform from the original
associated layer's crs to the destination map crs
2021-02-23 13:41:58 +10:00
Nyall Dawson
af0fb8bb87 [processing] Fix GDAL algorithms hang when gdal command is not available to run 2021-02-21 15:04:31 +10:00
Peter Petrik
da5f9db091
add circle vector tile layer support (#41584)
* fix #41529: add circle vector tile layer support
2021-02-20 08:01:02 +10:00
Nyall Dawson
8324317e22 [layouts] Correctly set data defined html url or attribute table
source property on the parent multiframe object, not the child frame

Fixes #41590
Fixes #36647
2021-02-20 06:12:35 +10:00
Nyall Dawson
c8d61499ff [processing] Instead of a hidden parameter for verbose model logging,
add an explicit log level getter/setter to QgsProcessingContext which
algorithms can use to determine an appropriate level of feedback
to push to users.

Initially the verbose log only triggers the full verbose output
of model executions (which is also used when running models through
the model designer), but the intention is that more algorithms
will fine tune their output based on the logging level.

qgis_process also gains a new --verbose switch to enable verbose
log output.
2021-02-20 05:04:00 +10:00
Alessandro Pasotti
faed480a73 mxe -> fedora mingw64 from Sourcepole
Replace MXE with fedora mingw64 cross build recipe with python.

Thanks to Sandro Mani!
2021-02-19 08:54:18 +01:00
Alessandro Pasotti
7b2fc4c1f8 More doxy nonsense, pt 2 2021-02-19 08:15:29 +10:00
Nyall Dawson
7dfef3a0b1 Newer doxygen versions don't auto convert the first line in a class'
documentation to a brief note, so we have to do it explicitly...
2021-02-19 08:15:29 +10:00
Nedjima Belgacem
d80c27d94b
Fix 3D point cloud position when layer CRS != project CRS (#41538)
* hopefully fixes CRS problem

* fix the 3D map position shift

* remove qDebug

* add catch throw around transformInPlace

* switch to using QgsCoordinateTransform::transform

* move QgsCoordinateTransform to transform context

* remove TODO and fix layout

* add docs

* rename variable

* hadle bounding box coordinate transformation
2021-02-18 09:41:39 +01:00
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
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
Alessandro Pasotti
e89c163118 Complete test coverage for edit buffer
Fix tests
2021-02-13 11:54:16 +01: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
Alessandro Pasotti
8cb15c3260 Editing buffer passthrough 2021-02-12 19:00:57 +01: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