Open chau-intl opened 3 years ago
Yes, you can!
Just choose the desired raster bands on options tab / Show Bands / Selected bands and click on the little button right side as shown in figure below.
But as far as I can tell that only limits what I see in the table
tab and not the actual QGIS request to the raster layer. See the getValue method.
So if my raster contains 3 bands and I only select one band as you have shown in the image, QGIS will return the values for all 3 bands but value tool only displays the value for the band I selected. Thus if my raster contains 1000 bands the values for all 1000 bands will be fetched but value tool only displays what I configured the layer to show.
Does that make sense?
You are right, the tool algorithm could be optimized to fetch only what it requested by user. Maybe I improve it someday. Thank you for the comments! And sorry for my delayed answer!
Should be adressed now, but one should use QGIS 3.22 because of a bug in previous version of QGIS with the sampling method I used.
When I hover over a cell in QGIS
value tool
will send anidentify
request to the selected raster layer. If I have a raster layer with thousands of bands this look up takes quite a while and QGIS freezes mean while.Would it be possible some how to configure the tool to either lookup all, specific or maybe just the visible bands?
It looks like the QgsRasterDataProvider has a sample function which can be used on individual bands instead of all bands like the identify does.