43 Commits

Author SHA1 Message Date
Alexander Bruy
8525448b2a add tests 2025-09-29 14:05:03 +10:00
Nyall Dawson
931e681b89 Fix visible gaps in between xyz tiles
In some circumstances there can be a visible <=2 pixel-wide gap
between adjacent tiles in xyz layers

Rework the image destination rect calculation to an integer
based calculation, as we'll always be drawing the tiles using
a painter with a pixel-based image device, and ensure that
the destination rect is always expanded to the nearest pixel
(instead of shrunk)
2025-04-24 16:00:08 +10:00
Mathieu Pellerin
fa9f86769b
Processing raster rank algorithm (#60605) 2025-03-03 14:20:54 +07:00
Alexander Bruy
bf2a6df16a round width and height to the nearest integer in native raster creation
Processing algorithms to match behaviour of gdal_rasterize (fix #43547)
2025-02-14 07:36:43 +10:00
Denis Rouzaud
920cc5d5c0
fix nodata value in virtual raster layers (#60084) 2025-01-09 08:30:35 +01:00
Owen Parkins
13403e705b
[FEATURE] Use TIFFTAG_DOCUMENTNAME as layer name if available (#57146)
Originally the GDAL data provider ignores any metadata
associated with tiff documents. Many documents contain
metadata that provides the name and description of the
document. This is more important to provide to the user
 when dealing with sublayers where users are unable to
provide a name externally by renaming the file.

This commit allows for sublayers to be defined by
this metadata and provided to the user for sublayer
selection.

Fixes qgis/QGIS#57077
2024-05-02 23:46:03 +02:00
Nyall Dawson
128dffc28c
Don't create alpha bands for non-rotated, south up rasters
Fixes #50879
2023-05-31 11:35:58 +10:00
Vincent Cloarec
3ca858af66
Global map terrain shading (#51535)
* QgsShadingRendering and pipe to render global elevation map

* gdal utils with datatype and resampling method enum

* raster layer elevation map

* optimize raster elevation map with rotation

* handle  no data value in the map elevation raster pipe

* mesh layer and some little fixes

* fix nodata and hillshading z factor

* render shading on layout

* activate/deactivate the shading from ui

* shading only for layer that have elevation

* apply Z scale and offset of layer elevation properties

* ui settings

* allow elevation from point cloud even edl is deactivate for pointcloud

* fix ui

* sipify

* Shading renderer widget in styling panel

* icone for shading renderer settings widget

* two methods to combin elevation

* rewording

* remove check box at the bottom of canvas

* use band of elevation properties

* fix styling pannel

* render shading in layout

* keep EDL point cloud shading individually

* add shading rendering tests

* add missing code for local EDL for point cloud

* shading inactive by default

* rework raster layer resampling

* improve nodata in elevation map

* don't allow elevation map with != size to be combined

* remove EDL from point cloud

* renaming

* sipify

* colorize tests

* renaming

* RGB32

* renaming leftover

* some ui fixes

* fix border for EDL alg

* fix EDL closed next to nodata value

* fix first shading when activated

* renaming and typo

* fixes for doc, doxygen, indentation and spelling

* remove leftover member

* fix clang-tidy

* fix edl tests

* fix dll export

* minor fixes

* adapt images of tests

* fix narrowing

* fix indentation

* sipify

* WIP

* minor ui changes
2023-01-26 15:02:16 +01:00
Alessandro Pasotti
79ac5e5f8b New test for multi value classes in paletted RAT 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
7d2c64242e Fix test 2022-11-09 09:46:13 +10:00
Martin Dobias
dda53897a2 Use Even's code suggestions + add tests 2022-02-14 07:55:09 -08:00
root676
d254d06eb1 add float64 raster testinputs 2021-01-14 13:04:16 +10:00
root676
f7aa9ae74c add byte raster testinputs 2021-01-14 13:04:16 +10:00
Clemens Raffler
13a43de935
Fix Cell Statistics NoData handling
Fixes #40092
2020-11-18 07:10:49 +10:00
root676
83dcd279b5 add value-testrasters 2020-07-29 08:29:18 +10:00
root676
084190bbd1 update test and testdata 2020-07-02 15:03:51 +10:00
root676
76690bf8ee add cellstatistics alg tests 2020-07-02 15:03:51 +10:00
root676
b9b7c4dbb9 [feature] add native Round raster algorithm 2020-04-13 07:34:25 +10:00
Alessandro Pasotti
79219dae23 Forward port of histogram binding fix with a bonus test
Fwd port of PR #30033
Fixes #29700

With a new test for the bug.
2019-06-09 10:25:50 +02:00
Peter Petrik
7a12f11392 fix when GDALGetRasterScale returns 0 (gdal 2.3 affected for some datasets) 2019-02-01 06:56:26 +11:00
AndrewAnnex
9b4cb7a269 added unit test and test raster 2018-10-09 14:36:05 +10:00
B. Seignovert
cb144b3cfe [RASTER] Generate band name with GTiff EXTRA_DIM
Band names can also be retrieved from GeoTIFF files.
2018-07-03 09:09:34 +10:00
Nyall Dawson
603365c386 Fix some crashes in paletted raster renderer
- handle negative color values
- don't crash when calculating unique values in bad rasters
2017-04-03 12:08:08 +10: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
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
Even Rouault
0f16eb869c [GDAL provider] Expose GDAL mask band as a pseudo alpha band.
Some TIFF formulations, for example RGB TIFF with JPEG YCbCr compression, cannot
include a regular alpha band and instead use the GDAL mask band mechanism. Such
mask bands were ignored up to now. Now expose them as if they were alpha bands.
2017-02-21 23:20:09 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Sandro Santilli
57ff59aa2d Ignore files generated during "make check" 2016-06-16 18:38:36 +02:00
Even Rouault
86f6e7eb0d Merge pull request #3142 from rouault/identify_result_float_precision
Do not print excessive decimals when identifying value on a Float32 raster
2016-05-30 17:46:08 +02:00
Even Rouault
f3b635dcbb [GDAL provider] Ignore nodata value that are not representable in the data type.
This is related to commit e0d38ba3f912b7ae6b34e66a44e529ec37394458. In case
we have to deal with an inconsitent raster where the nodata value is set to
a value not representable in the data type, ignore it. Otherwise, a NaN value
in a Byte raster would be cast as 0.
2016-05-29 12:55:23 +02:00
Even Rouault
147a68c0a0 Do not print excessive decimals when identifying value on a Float32 raster
Was reported in https://lists.osgeo.org/pipermail/qgis-user/2016-April/036045.html
2016-05-29 12:43:20 +02:00
Even Rouault
e0d38ba3f9 QgsRasterFileWriter::writeDataRaster(): do not set nodata on output when unneeded
Currently if the source raster has no nodata value, the writer will still write
nan as the output nodata value, ignoring the flag that specifies if there is a
nodata value or not. On a raster with byte data type, this will cause
confusion on reading since the nodata value will be somehow cast as 0.

Make QgsRasterChecker check for nodata consistency between source and target, and
add a test file that shows the issue.
2016-05-28 10:52:36 +02:00
Juergen E. Fischer
15539f34ce more Quantum GIS => QGIS updates 2013-05-30 16:19:19 +02:00
Tim Sutton
2fbe172dd1 Created test to replicate issue #7023 2013-01-22 11:07:50 +02:00
Juergen E. Fischer
54e50e7803 remove raster metadata from test data to make tests run without changing git tracked files 2012-12-25 19:29:00 +01:00
Radim Blazek
76115ec886 Raster statistics and histogram moved from QgsRasterDataProvider to QgsRasterInterface 2012-12-17 18:29:08 +01:00
Radim Blazek
5a6401c983 VSI/CPLMalloc/Free replaced by QgsMalloc/Free where feasible 2012-10-16 11:10:43 +02:00
Tim Sutton
9b0fee38de Added asWktPolygon method to QgsRectangle with a unit test. Discovered QgsRectangle tests were missing their main method causing them to not run. Then discovered that some of these tests fail, one of which remains unresolved. 2012-09-10 16:04:22 +02:00
Radim Blazek
9286429baa - QgsRenderChecker moved to core + Python bindings
- raster transparency python test
2012-09-04 20:31:59 +02:00
Radim Blazek
5a5928e37a WCS test server instructions 2012-07-19 12:47:57 +02:00
Radim Blazek
09bd0f639d better wcs mapfile mimetypes 2012-07-19 09:40:43 +02:00
Radim Blazek
d1e7242255 wcs test unit data 2012-07-18 19:29:11 +02:00