64006 Commits

Author SHA1 Message Date
Even Rouault
93bc7c2f04 Raster rendering: enable provider-side resampling when available, and reprojection is done 2020-06-20 04:29:36 +10:00
Even Rouault
df8dd11e40 Early resampling: replicate behaviour similar to QgsRasterResampleFilter when zooming out beyond the max oversampling factor 2020-06-20 04:29:36 +10:00
Even Rouault
aaaf0f7dc4 Raster reprojector: do not use full resolution hint when provider resampling is enabled
Credits @nirvn
2020-06-20 04:29:36 +10:00
Even Rouault
904a337804 Raster layer properties dock panel: add 'Early resampling' checkbox, and move common code with raster properties dialog into a QgsResamplingUtils class 2020-06-20 04:29:36 +10:00
Even Rouault
d2497c8212 Early resampling: fix requests typical of pixel identification 2020-06-20 04:29:36 +10:00
Even Rouault
47da98c070 Raster resampling: add provider-level settings, and a switch at rasterpipe level between resamplingFilter and provider resampling
Also
* in settings UI, add a 'Early resampling' checkbox
* in raster properties UI, add similar checkbox
* serialize/deserialize new settings in QgsRasterLayer XML
2020-06-20 04:29:36 +10:00
Even Rouault
f32026c8e0 [GDAL provider] Fix misalignment of raster with overviews
Fixes #36820

The way QGIS is currently handling resampling is sub-optimal given GDAL >= 2
capability of having sub-pixel accuracy. So when a QgsRasterResampleFilter
is set, make it try to delegate resampling back to the underlying input interface,
and implement that improved resampling in the GDAL provider.

The GDAL resampling will take into account the settings of the QGIS resample
filter: zoom-in resampling kernel, zoom-out resampling kernel and max resampling
factor. The later is important to avoid performance issues if not enough overview
levels are generated (in the case, we will fallback to the generic method, which
may introduce sub-pixel shifts)
2020-06-20 04:29:36 +10:00
Even Rouault
e7cdc70f24 Revert "QgsGdalProvider::readBlock(): simplify call to GDALRasterIO()"
This reverts commit 3081f2a85c53da24f1022c0057077b1cba71d9d7.

Revert the commit. It causes too much failures on Travis-CI. See
https://api.travis-ci.org/v3/job/694715036/log.txt
Furthermore for the failed cases, I don't have locally the same differences
as on Travis-CI. So might be GDAL dependent or something else.

Not worth the huge trouble to update for nearest neighbour resampling
changes.
2020-06-20 04:29:36 +10:00
Even Rouault
45539cf124 QgsGdalProvider::readBlock(): simplify call to GDALRasterIO()
Instead of doing our own nearest neighbour resampling, use directly the
one of GDAL to avoid creating a temporary buffer. Should hopefully be
slightly more performant, and at least less complicated on QGIS side.

Update a few test cases that are sensitive to the difference in
resampling
2020-06-20 04:29:36 +10:00
Even Rouault
5cd56e35c6 QgsGdalProvider::readBlock(): code cleanups/clarifications
* Remove old / confusing comments
* Rename various variables to be hopefully clearer

Should result in no functional change, but acts as a preparation
for follow-up changes
2020-06-20 04:29:36 +10:00
Harrissou Sant-anna
f2f7236fc8
Layout new name dialog
Make the new layout dialog use the qgsnewnamedialog class
Add/enable help button to open user manual chapters
2020-06-20 04:28:18 +10:00
Nyall Dawson
847295758c [feature][gps] Add option to calculate bearing based on travel direction
For devices which report faulty bearing measurements, this option can
be used to instead calculate the GPS bearing based on the previous
two recorded locations
2020-06-20 04:26:30 +10:00
Alessandro Pasotti
66ce30c446 Code layout 2020-06-20 04:24:55 +10:00
Alessandro Pasotti
e55751bc95 Apply suggestions from code review
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2020-06-20 04:24:55 +10:00
Alessandro Pasotti
4b362629e8 GPKG and spatialite AUTOINCREMENT: get next value from sequence
for PK default value, fixes #37222

Also, fix dangling transactions for spatialite.
2020-06-20 04:24:55 +10:00
Alessandro Pasotti
2e6fdbe615 Evaluate defaults when adding new features in transaction group
Fixes #37222
2020-06-20 04:24:55 +10:00
Nyall Dawson
4dc9b38142 Add API to retrieve QGIS version used to save a QgsProject
project.lastSaveVersion()

now returns the version number used to save the project.
Also cleanup QgsProjectVersion code

Fixes #37288
2020-06-20 04:21:53 +10:00
Juergen E. Fischer
0ac73f4fe4 Bump version to 3.15 2020-06-19 14:17:00 +02:00
Juergen E. Fischer
2559994397 changelog and news update for 3.14 2020-06-19 14:15:52 +02:00
Juergen E. Fischer
3ff0592905 translation update for 3.14.0 from transifex 2020-06-19 14:15:45 +02:00
Mathieu Pellerin
714b2ef9f2
[wms] Fix broken WMS layers from servers using relative OnlineResource paths 2020-06-19 17:55:23 +07:00
Martin Dobias
21c6573db6 Review fixes + comment about merging of multi-part geometries 2020-06-19 12:54:21 +02:00
Martin Dobias
00a102c6b9 Fix performance issue when splitting polygons (fixes #34326)
Using test data with a HUGE polygon with several hundreds of thousands
of vertices and nearly a thousand of holes, split geometry was taking
really long time. On my laptop ~67 seconds for a simple split line.

With this fix, the time went down to ~10 seconds for the test polygon.

The issue was that split tool was doing an expensive exact intersection
calculation for each polygon part returned from polygonize, and then
calculating areas to see whether the original polygon part and intersected
part were more or less the same. I think that can be replaced by a much
simpler point in polygon test to figure out whether the particular
polygon part from polygonize is falls inside the original geometry
or whether it falls into a hole or exterior.

In my tests the time could be further improved to ~3 seconds by disabling
mergeGeometriesMultiTypeSplit() function - it is a bit of a mistery to me
what problem does it solve, however it has N^2 running time with N being
number of rings - but I did not feel adventurous enough to poke into it.
(mainly because there are no unit tests that would verify its behavior)
2020-06-19 12:54:21 +02:00
Denis Rouzaud
0cb8408425
more flags warnings fixes for Qt 5.15 (#37309)
* more flags warnings fixes for Qt 5.15

* fix sip compilation
2020-06-19 12:02:00 +02:00
Alessandro Pasotti
359498091e
Merge pull request #37277 from elpaso/bugfix-29264-spatialite-wrong-feature-count
Fix spatialite wrong feature count
2020-06-19 09:12:40 +02:00
nirvn
f7bb4b8f98 [temporal] Insure the output directory exists when exporting animation 2020-06-19 12:37:37 +07:00
Vincent Cloarec
f5a7d90cf2
another active vector settings trouble (#37306) 2020-06-19 07:29:27 +02:00
Denis Rouzaud
fe14dc9bb7
fix feature list combo box having identifier value further than fetching limit (#37280)
* test for feature list combo box having identifier value further than fetching limit

* fix feature list combo box having identifier value further than fetching limit

fixes #37266

* make the test a bit more robust

* fix compilation with older Qt

* correctly keep current value

* determine if keep current entry using the current index

* Revert "determine if keep current entry using the current index"

This reverts commit ff3658ba471450bc333a0a24f86e32f85da43c7f.
2020-06-19 06:54:20 +02:00
Juernjakob Dugge
1dc05957ad Explain rationale for increasing field width for reals 2020-06-19 12:35:17 +10:00
Juernjakob Dugge
9b53ca645c Don't alter the field specification for types other than real
Fixes #37254
2020-06-19 12:35:17 +10:00
Nyall Dawson
3dd267c91a Fix setting a layer's Display Name field to a field name containing
spaces or other special characters

Because we actually store the field name as an expression, we need
to make sure we correctly represent these field names as valid
expressions and not just the raw name string
2020-06-19 12:34:50 +10:00
uclaros
1e72b44721 Fix georeferencer help button 2020-06-19 09:20:41 +10:00
Denis Rouzaud
7fb552d62d fix layout 2020-06-19 08:47:23 +10:00
Denis Rouzaud
044a05d828 run sipify 2020-06-19 08:47:23 +10:00
Denis Rouzaud
43b122ede0 fix Qt 5.15 warning for flags initalization with nullptr 2020-06-19 08:47:23 +10:00
Juergen E. Fischer
5b5f1f58f8 more retries with transifex 2020-06-18 21:19:18 +02:00
Alessandro Pasotti
4a841b53bf
Merge pull request #37281 from espinafre/pgsql_provider_fix_change_features
Improvements in QgsPostgresProvider::changeFeatures
2020-06-18 18:01:38 +02:00
Alessandro Pasotti
5a6438064e Code layout 2020-06-18 09:25:13 +02:00
Alessandro Pasotti
1763dad1e6 Explain the handle ownership 2020-06-18 09:16:57 +02:00
vcloarec
a835cdfd1b fix mesh active vector dataset 2020-06-18 12:29:08 +10:00
José de Paula Rodrigues Neto Assis
9469f246d7 Code review. Remove quotation of floats for PostgreSQL.
Removed quotation of floating point values after code review by Nyall
Dawson.
2020-06-18 08:34:33 +10:00
José de Paula Rodrigues Neto Assis
6a85309587 Adjusting tests to deal with floating point madness
PostgreSQL 11 and 12 handle floating point values differently; the test
originally passed on PostgreSQL 12, but not on 11 (Travis). Now, with
floating point data truncated to only 6 digits, they run on both
versions of the DBMS.
See https://www.postgresql.org/docs/12/release-12.html
2020-06-18 08:34:33 +10:00
José de Paula Rodrigues Neto Assis
c521f39ef0 Adjusting floating point comparisons in Python tests
Turns out that what passes on Python 3.8 and PostgreSQL 12 won't pass on
Python 3.7 and PostgreSQL 11 (Travis). So we round the floating point
comparisons to 5 digits in the testcases.
2020-06-18 08:34:33 +10:00
José de Paula Rodrigues Neto Assis
44f4afe023 Fixed test for int4 where clause (pgsql)
Turns out the DBMS won't return a type name of "int", but "int4". We
changed the test accordingly to reflect what QGIS should expect from the
database.
2020-06-18 08:34:33 +10:00
José de Paula Rodrigues Neto Assis
617e0dbe8f PostgreSQL composite PK with bigint component
Bigint PostgreSQL fields are handled correctly if they are part of a
composite primary key. As a bonus, we always pass double values as
quoted to the DBMS (but not cast to text). With this one can work with
tables with real/double primary keys without the penalty of casting
these values to text. Fixes #37126.
2020-06-18 08:34:33 +10:00
Samweli
e73074b72d update time parameters in wmst getfeatureinfo 2020-06-18 08:30:51 +10:00
José de Paula Rodrigues Neto Assis
3f593795ce Improvements in QgsPostgresProvider::changeFeatures
Included support for json/jsonb in this method, as there already exists
for QgsPostgresProvider::changeAttributeValues; fixed how the provider
deals with bigint primary keys in this case; added a few tests that
exercise changing of attributes, geometries, and primary keys of
features.
2020-06-17 19:26:50 -03:00
uclaros
4df49cc26d Give default focus to from map canvas button 2020-06-18 05:59:06 +10:00
Blottiere Paul
7bed52c7f9 Add test 2020-06-18 05:55:53 +10:00
Blottiere Paul
7ad14fcd4f Fix lexer/parser for raster calculator and min/max functions 2020-06-18 05:55:53 +10:00