24 Commits

Author SHA1 Message Date
Nyall Dawson
e5b8b32e04 Make paletted raster widget behave the same as categorized widget
when changing current band

Now the widget asks users if they want to delete existing categories
when they switch a band, just like how the categorized renderer
widget asks when the categorized field is changed.
2017-06-05 09:50:44 +10:00
Denis Rouzaud
07fa24781c sipify core raster part 1 2017-06-01 13:33:16 +02:00
Denis Rouzaud
85f3b81b55 remove double spaces in sip files
fix indentation
2017-05-03 08:02:14 +02:00
Denis Rouzaud
7d459149c7 [sip] align missing bits and replace nullptr by 0 2017-05-02 08:09:53 +02:00
Denis Rouzaud
7b60d89d6c align pointer and reference in sip files batch 2 2017-05-01 20:00:51 +02:00
Nyall Dawson
d03844d24e [FEATURE] Allow classifying paletted renderer using unique values
from a raster layer

Adds an easy way to style discrete rasters such as landuse classes
using the Paletted renderer. Just select the Paletted renderer,
pick a band, then hit the "Add Unique Values" button. The unique
pixel values will be fetched from the layer and a color assigned
to each using the currently selected color ramp.

Fix #14845

Sponsored by
- Stéphane Henriod
- Satelligence (http://satelligence.com/)
- Bird's Eye View (https://www.birdseyeviewgis.com/)
- + other anonymous backers
2017-04-03 12:08:08 +10:00
Nyall Dawson
7eb63d99dc [FEATURE] Implement saving paletted raster renderer color tables
Use the .clr/gdal file format, but add the labels on the ends of
the lines. Seems other importers like ArcMap just ignore these.
2017-04-03 12:07:50 +10:00
Nyall Dawson
d542a1a442 Add method to load paletted renderer classes from file 2017-04-03 12:07:50 +10:00
Nyall Dawson
a6d3af7c26 Add method to read paletted color data from string 2017-04-03 12:07:50 +10:00
Nyall Dawson
93cfde0c09 Enable reordering of paletted raster entries 2017-04-03 12:07:50 +10:00
Nyall Dawson
bfe96214b2 [FEATURE] Add a color ramp combo to paletted raster renderer
Allows rapid recoloring of palette to match a color ramp
2017-04-03 12:07:50 +10:00
Nyall Dawson
b7cd9dcb56 Rework paletted raster renderer widget
- Switch to a real model
- Allow adding new rows and deleting multiple selected rows
- Allow changing colors inline in style dock (no modal color picker)
2017-04-03 12:07:50 +10:00
Nyall Dawson
a157db7627 Refactor QgsPalettedRasterRenderer to allow "gaps" in pixel values
Previously the renderer required that pixel values followed
sequential numerical order. This refactor allows values to
be skipped, so that only certain color index will be rendered.
2017-04-03 12:07:50 +10:00
Nyall Dawson
634d5ffb8a Mark QgsRasterRenderer::legendSymbologyItems as /Out/ in sip 2017-03-23 10:15:30 +10:00
nirvn
f02e4ad98f [FEATURE][raster] transparency support for paletted renderer 2016-12-14 14:24:02 +07:00
Martin Dobias
b6b5afd885 [FEATURE] Ability to cancel rendering of rasters + WMS/WCS support
The improvement allows immediate cancellation of raster rendering
in progress. Until now, even when map rendering got cancelled
(e.g. by zooming of panning canvas), the GUI got blocked while waiting
for raster layers to finish their rendering (only vector layers have
had support for cancellation). This should allow for much smoother
user experience while browsing maps including rasters.

The cancellation is supported currently by WMS/WMTS and WCS providers.
GDAL provider may also get support thanks to improvements in GDAL 2.

Funded by Land Information New Zealand.
2016-07-24 23:16:33 +02:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Nyall Dawson
60816af372 Correctly mark some raster classes copy/assignment as private
As they haven't been properly implemented yet and the classes
violate the rule of three
2016-01-20 17:06:04 +11:00
Nyall Dawson
cdf21b7c3e Return derived classes from clone() methods, avoids need to
dynamic_cast results
2015-11-12 20:29:06 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Juergen E. Fischer
74e7314c36 update sip bindings II 2014-01-27 09:22:53 +01:00
Radim Blazek
24bcec43d5 [FEATURE] labels support in QgsPalettedRasterRenderer, fixes #8886 2013-11-02 18:21:31 +01:00
Juergen E. Fischer
558dcf26db fix QgsPalettedRasterRenderer sip binding 2013-03-11 16:21:25 +01:00