18959 Commits

Author SHA1 Message Date
Nyall Dawson
fdb53fe0bf Add a test hash 2021-02-08 13:23:40 +10:00
Nyall Dawson
735c62d93b No need to compare result from GDAL contour alg -- we already have lots of tests covering the creation
of the matching GDAL command, and we can trust that GDAL will generate contours correctly

Avoids fragility in the test when underlying GDAL contour algorithm/logic changes
2021-02-08 13:23:40 +10:00
Nyall Dawson
25886c30de A bit of repairs to vector tiles algorithm test 2021-02-08 13:23:39 +10:00
Nyall Dawson
465fe14ea8 More tolerance in some tests 2021-02-08 13:23:39 +10:00
Nyall Dawson
c9ca4febfe Add secondary reference layer for tapered buffer alg 2021-02-08 13:23:39 +10:00
Nyall Dawson
3b57b53851 Fix passing geometry compare options to checkLayersEqual 2021-02-08 13:23:39 +10:00
Nyall Dawson
5ad24de4cc Temporarily disable the Find Projection test, which is very slow to run on proj 6+ builds 2021-02-08 13:23:39 +10:00
Nyall Dawson
f545d13aa6 Bit less noise in Find Projection algorithm 2021-02-08 13:23:39 +10:00
Nyall Dawson
e0c6b37615 Fix some saga tests 2021-02-08 13:23:39 +10:00
Nyall Dawson
b106c209a3 Fix some more processing alg tests 2021-02-08 13:23:39 +10:00
Nyall Dawson
9ba0bd9944 Allow casting date/datetime values to string to compare to expected results 2021-02-08 13:23:39 +10:00
Nyall Dawson
b0994a5574 Fix running tests where the same layer is used for multiple parameters 2021-02-08 13:23:39 +10:00
Nyall Dawson
4eed1d29e9 Add another reference hash 2021-02-08 13:23:39 +10:00
Nyall Dawson
589efd52f4 Fix expected test results 2021-02-08 13:23:39 +10:00
Nyall Dawson
fffeecccd6 More tolerance in Processing QGIS algorithms pt 1 test 2021-02-08 13:23:39 +10:00
Nyall Dawson
846d1fe0e6 [processing] Add option to ignore part order when comparing geometries to expected results 2021-02-08 13:23:39 +10:00
Nyall Dawson
19b4b1aa64 When loading GML layers in processing tests, FORCE detection of
SRS. Newer GDAL versions won't do this by default, but we need
to determine the actual/expected CRS for these layers in order
to compare correctly.
2021-02-08 13:23:37 +10:00
Nyall Dawson
0aab3073d8 Fix Python based data providers on newer SIP versions 2021-02-08 13:23:37 +10:00
Nyall Dawson
4984de792d Use TRANSFER_BACK annotation instead of FACTORY for QgsProviderRegistry::createProvider
Paraphrasing Phil Thomson's advice on https://www.riverbankcomputing.com/pipermail/pyqt/2017-July/039450.html:

"
/Factory/ is used when the instance returned is guaranteed to be new to Python.
In this case it isn't because it has already been seen when being returned by by the python function
creating the provider subclass.

(However for a different sub-class implemented in C++ then it would be the first time it was seen
by Python so the /Factory/ on create() would be correct.)

You might try using /TransferBack/ on createProvider() instead - that might be the best compromise.
2021-02-08 13:23:37 +10:00
Nyall Dawson
cd2df66674 Use unique_ptr 2021-02-08 13:23:37 +10:00
Nyall Dawson
8e57368133
Merge pull request #41355 from elpaso/bugfix-gh41342-gpkg-create-table-from-file-browser
GPKG Allow table creation from file browser
2021-02-08 10:34:28 +10:00
nirvn
e82df36c0d Add point cloud layer icon in the map layer model 2021-02-07 12:48:48 +07:00
Nyall Dawson
d0882d0f06 When auto selecting the default identifier field for a layer,
prefer something like "admin_name" over "type_name".

By penalising results with "type", "class", "cat" in their names
we are less likely to accidentally select a category field as the
friendly identifier when a better one exists.

Also add tests for this logic.
2021-02-06 10:10:51 +10:00
Alessandro Pasotti
5733970f84 Add DB connections factory to data items 2021-02-05 12:15:25 +01:00
Nyall Dawson
f5d3164e2c [processing] Input parameter name for in place algorithms is not
always fixed, so ensure we correctly obtain and use the correct
input parameter name
2021-02-03 12:38:35 +10:00
Nyall Dawson
c6895d969a [processing] Correctly set IN_PLACE configuration option when running in place algorithms through locator filter 2021-02-03 12:38:35 +10:00
Nyall Dawson
46dbd8b2d6 [processing] Fix exception in algorithm locator filter if an
algorithm has no group set

The group isn't mandatory
2021-02-02 14:51:33 +10:00
Giovanni Manghi
ffff5e1899 Fix the Profile From Lines SAGA tool 2021-02-02 06:51:04 +10:00
Nyall Dawson
13fbcd1cff Expose additional GDAL supported resampling methods as options
for "early" raster resampling

Notably, this adds the "Average" resampling as an option for
early resampling methods. (A nice side effect is that we also
get mode, cubic spline, Lanczos, ... for free!)

Fixes #40746
2021-02-01 07:58:20 +10:00
Nyall Dawson
c253bee452 Fix typo 2021-01-31 05:41:22 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Harrissou Sant-anna
8a8d2a2c66 Fix some formatting in pyQGIS doc 2021-01-30 08:25:03 +10:00
Nyall Dawson
249d6815bf Move 3d options tab up to a more natural position 2021-01-30 06:51:13 +10:00
Nyall Dawson
7b28cc6b0c Fix paper-cut when selecting projection from widget where it looks
like the user has made a selection, but they've only selected one
of the projection category headings and so when they click OK they
see no change.

Now instead we disable the OK button in this dialog whenever the
user has a non-crs list item selected.
2021-01-29 11:25:06 +10:00
Nyall Dawson
6ab0e4d954 Fix doxygen warning by renaming function 2021-01-29 09:17:58 +10:00
Nyall Dawson
6606471938 Sipify 2021-01-29 09:17:58 +10:00
Nyall Dawson
339516a4a9 Add API to limit the acceptable scale difference when searching
for any matching cache image in QgsMapRendererCache
2021-01-29 09:17:58 +10:00
Nyall Dawson
ead6d0651b Allow specifying an explicit extent and map to pixel when
setting a cache image, and prefer any cached image with
parameters which exactly match the current cache parameters

This allows us to properly handle the case where:
- one map job is canceled, but some layers did finish rendering
- while the canceling is occuring on a different thread, we start
a new map render using the same cache and set new extent/map to pixel
for it
- the canceled job cleans up and stores the cache images for
the layers which DID finish rendering -- in this case we need
to explicitly state the previous extent/map to pixel when storing
the cache image, as they won't match the cache's current parameters
2021-01-29 09:17:58 +10:00
Nyall Dawson
ebf16b052b Move a bunch of QgsMapToPixel methods to header so that they can be
optimised by the compiler, and add equality operator to QgsMapToPixel
2021-01-29 09:17:58 +10:00
Nyall Dawson
c64216963b Apply same logic as we use for rendering preview cached versions
of vector layers to point cloud layer renders
2021-01-29 09:17:58 +10:00
Nyall Dawson
a138921179 Ensure all layer render subclasses correctly return false if the
rendering is aborted early
2021-01-29 09:17:58 +10:00
Denis Rouzaud
e071f31a58 add an argument to configure preview length in QgsExpression::formatPreviewString 2021-01-28 15:18:32 +01:00
Stefan Uhrig
ca98f882b9 Improve documentation of QgsMapTool class members 2021-01-28 12:18:42 +10:00
Peter Petrik
0a74eef133 ifdef out whole class on iOS 2021-01-28 06:18:20 +10:00
Peter Petrik
6a1bb9c01d fix sip 2021-01-28 06:18:20 +10:00
Peter Petrik
ed45bc1319 do not use QProcess on iOS 2021-01-28 06:18:20 +10:00
Nyall Dawson
d6c8133b92 Dox 2021-01-28 02:25:09 +10:00
Nyall Dawson
ddf6245f36 Move responsibility for retrieving lists of custom user CRSes to
QgsCoordinateReferenceSystemRegistry

This was the last bit of untested, direct sql database access relating
to custom projections. Now everything is nice and central and protected
by unit tests.
2021-01-28 02:25:09 +10:00
Nyall Dawson
8e26132404 More logic to QgsCoordinateReferenceSystemRegistry 2021-01-28 02:25:09 +10:00
Nyall Dawson
fae30b56ab Move logic for removing user crs to QgsCoordinateReferenceSystemRegistry 2021-01-28 02:25:09 +10:00