190 Commits

Author SHA1 Message Date
Denis Rouzaud
2cc632ee5d follow up QVariant 2021-01-03 20:16:56 +01:00
Mathieu Pellerin
14136a15cb
[ui] Insure color/value changes in the colormap tree are reflected in the color ramp button of the color ramp shader widget (#40671) 2020-12-28 20:01:48 +07:00
Juergen E. Fischer
7719668453 fix build (take II; followup 1c9d89a7c3d) 2020-12-19 22:57:54 +01:00
Nyall Dawson
a0accab0c2 Add QgsColorRampLegendNodeSettings to QgsSingleBandGrayRenderer 2020-12-18 12:03:26 +10:00
Nyall Dawson
45d2edda16 QgsColorRampShader can have color ramp legend node settings 2020-12-18 12:03:26 +10:00
Nyall Dawson
e48286c0d4 Pass QgsReadWriteContext onto QgsColorRampShader read/writeXml methods 2020-12-18 12:03:26 +10:00
Nyall Dawson
60aea700d1 Forward declare more classes 2020-12-18 12:03:26 +10:00
Nyall Dawson
0d7b95fa67 Generate more descriptive legends for raster layers
- include band name details where its useful
- create a legend for multiband raster renderer
2020-12-17 04:57:56 +10:00
Nyall Dawson
d7ce1a3167 Create color ramp legend nodes for pseudocolor or grayscale rasters or
point clouds using a Linear color ramp based renderer
2020-12-16 18:46:53 +10:00
Matthias Kuhn
0d55e61145 Add QgsRasterDataProvider::Capability::ReloadData for gdal, ams and wcs provider 2020-12-14 09:02:16 +10:00
Nyall Dawson
f21ca86a91 Cleanup api, fix crash 2020-12-07 11:42:39 +10:00
Nyall Dawson
60ce8eb9af Use new api to return nice legend items for raster contour renderer
Instead of no legend, we now create a legend with the contour symbols!
2020-12-07 11:42:39 +10:00
Nyall Dawson
6932985d82 Add api to allow raster layer renderers to create different legend node types,
instead of forcing them to always use the solid color blocks created by QgsRasterSymbolLegendNode
2020-12-07 11:42:39 +10:00
NEDJIMAbelgacem
7f26477c81 add comparison operator for QgsColorRampShader 2020-12-03 22:27:20 +01:00
Nyall Dawson
28c2788989 Spelling 2020-11-16 19:38:07 +10:00
Nyall Dawson
bf8ccad89e Add contrast enhancement options for point cloud RGB renderer 2020-11-16 19:38:07 +10:00
Nyall Dawson
0056bb1580 Proxy QgsRasterLayer::setOpacity/opacity to QgsRasterRenderer::setOpacity
This allows layer opacity for raster layers to be set and retrieved using
the exact same API as all other map layer types
2020-11-13 21:27:06 +10:00
Alessandro Pasotti
3f11294dfd
Merge pull request #39778 from elpaso/bugfix-gh39757-shared-locale-sort
Bugfix gh39757 shared locale sort
2020-11-13 10:38:49 +01:00
Nyall Dawson
819fc50b0e Don't use generic "QgsMapLayer" class name in map layer Python repr
strings

Rather use actual layer subclass type, e.g. QgsVectorLayer
2020-11-12 16:05:52 +10:00
Alessandro Pasotti
02552e489a Raster shader: store label precision 2020-11-09 15:40:43 +01:00
Nyall Dawson
add4fec46a Improve QgsRasterIdentifyResult docs 2020-10-26 13:26:43 +10:00
Nyall Dawson
d3adc10ec3 Move some todos so they don't sit between member doxygen and declaration
Sipify doesn't handle this, and drops off the docstring from the python method
2020-10-21 09:32:15 +10:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Nyall Dawson
4ee9feb56b Sipify 2020-10-09 11:20:09 +10:00
Alessandro Pasotti
09fe306f80 Raster paletted/unique float support
Fixes #39058 an adds some small improvements in the
progress feedback.
2020-10-06 08:39:26 +10:00
vcloarec
299709994d change return type of QgsRasterDataProvider::clone() 2020-10-03 05:57:18 +10:00
Nyall Dawson
44fb4f5f85 Dox 2020-09-18 04:34:57 +10:00
Nyall Dawson
d4a2dddac5 Tag some inexpensive, frequently called methods with the HoldGIL annotation
This prevents the Python GIL from being released before calling the method
(which is the default behaviour). For very cheap to call c++ methods the
cost of releasing the GIL can outweigh the cost of the c++ call, which means
it's more efficient to retain the hold on the GIL.

Ideally we'd do this everywhere, and switch to an explicit ReleaseGIL
annotation on functions which are slow or risky (raise exceptions, or
do something which can cause a GIL deadlock). But those are very tricky
to identify, so instead just explicitly hold the gil on cheap methods
which are likely to be called many times and could have an impact on
script performance.
2020-09-18 04:34:57 +10:00
Nyall Dawson
afd7698460 Extract utility functions for saving and reading raster color map definitions
to file to new QgsRasterRendererUtils class
2020-09-16 06:12:35 +10:00
rldhont
45e9ecb1c2 Trust layer metadata propagation
The trust flag at the projetc level is only used to read vector layer extent from xml, not from provider.

This flag was not available at the vector layer and data provider level.

We propose a new QgsMapLayer reading flag to propagate the trust layer metadata prohect's read flag an d a new provider options to trust datasource config.
Trusting the datasource config means that the provider can use estimated metadata, the primary key is unique and the detectable geometry type and srid are the same as the requested.
2020-09-09 09:35:32 +02:00
Nyall Dawson
f496173bd7 Fix messy doxygen blocks which mess with sipify script
Fixes #38291
2020-08-20 17:01:35 +10:00
Dmitry Shachnev
7e93859dfd Replace deprecated sipTransferBreak with sipTransferTo 2020-07-21 13:18:40 +10:00
Harrissou Sant-anna
d4e60173bc Fix after review 2020-07-21 10:13:45 +10:00
Harrissou Sant-anna
5c83cd07cc Move some cpp code samples to python 2020-07-21 10:13:45 +10:00
Alexander Bruy
6a6f7ff885 typo 2020-07-01 07:01:58 +03:00
Alexander Bruy
9734b76e59 doxymentation 2020-06-30 16:01:26 +03:00
Alexander Bruy
0214b4f01a move gamma correction code inside brightness/contrast filter 2020-06-30 15:42:33 +03:00
Alexander Bruy
cfa5c5bf83 fix tests 2020-06-30 15:42:33 +03:00
Alexander Bruy
80544696b4 gamma correction filter pipe for rasters (fix #13512) 2020-06-30 15:41:57 +03: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
Nyall Dawson
8d4f00b0af Remove TODO comments included in public API documentation
This is just "airing our dirty laundry". We don't want/need end users
to see this.
2020-06-15 13:43:58 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Blottiere Paul
7ac386bf0b Fix use of deleted function for QgsLinearMinMaxEnhancementWithClip 2020-06-12 08:45:13 +10:00
Nyall Dawson
c795ddb1e9 Updates 2020-06-11 13:29:59 +10:00
Martin Dobias
68bbf46ebb Add QgsRasterDataProvider::transformCoordinates()
This is useful when client needs to find out image space coordinates of a point
in map layer coordinates or vice versa. For warped VRT rasters this can't be
simply done by using geotransform matrix because the transform may be more complex.

This may be also useful functionality for identify tool to show source raster
image coordinates.
2020-05-18 09:20:32 +10:00
Alessandro Pasotti
f029b1f959 Fix xyx OSM tiles too many downloads
Fixes #34813 by introducing a Prefetch rendering flag
and raster provider capability that can be set by
a provider when prefetching of out-of-viewport tiles
is allowed. For now it is only denied (hardcoded) for
OSM but the implementation allows per-layer setting when
a GUI element to set the flag will been created.
2020-05-13 13:41:40 +02:00
nirvn
ec32e3248e Address flag comment 2020-05-10 14:02:11 +07:00
nirvn
9be36fdbf3 [temporal] Optimize canvas rendering by avoiding needless cache clearing 2020-05-10 14:02:11 +07:00
Nyall Dawson
702675ca64 Forward declare QgsMapLayerTemporalProperty subclasses instead of including in header
Speeds up recompilation time
2020-05-10 17:01:44 +10:00