qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.5k stars 2.99k forks source link

raster looses green band on saving #51099

Closed RatInTheField closed 1 year ago

RatInTheField commented 1 year ago

What is the bug or the crash?

Using tool Clip Raster By Extent, I clipped a raster to a new extent expressed by drawing on the screen. The raster was saved under the correct file name, but only showed red and blue bands. Green was not visible, giving the image a strong magenta cast. The issues can be worked around by setting the Properties for the new raster layer, by setting Green band to 'band 2,Green'.

This issue has been noted, but not yet reported when using the plugin 'Freehand Raster Georeferencer'

Steps to reproduce the issue

1 select Clip To Extent 2 select an input raster 3 select an extent 4 identify an output file 5 Run the task 6 Observe that the new raster layer shows only Red and Blue layers

Versions

QGIS version 3.28.0-Firenze QGIS code revision ed3ad0430f3 Qt version 5.15.3 Python version 3.9.5 Compiled against GDAL/OGR 3.5.2 Running against GDAL/OGR 3.5.3 PROJ version 9.1.0 EPSG Registry database version v10.074 (2022-08-01) GEOS version 3.10.3-CAPI-1.16.1 SQLite version 3.39.4 PDAL version 2.4.3 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009

Active Python plugins batch_gps_importer version 1.0.1 DataPlotly 3.9.2 easy_raster_splitter 2.0 FreehandRasterGeoreferencer 0.8.3 GpxSegmentImporter 2.5 ImportPhotos 3.0.4 InvisibleLayersAndGroups 2.2 itemmap_cropper 0.1 LandSurveyCodesImport v0.3.0 LAStools 1.4 latlontools 3.6.6 pluginbuilder3 3.2.1 PointConnector 2.0 pointsamplingtool 0.5.4 qchainage 3.0.1 QCopycanvas 0.5 qfieldsync v4.2.0 qProf 0.5.0 qtiles 1.7.1 quick_map_services 0.19.32 raster_tracer 0.3.2 shapefile_encoding_fixer 0.7 slyr_community 4.0.6 volume_calculation_tool 0.4 wbt_for_qgis 1.0.5 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99 sagaprovider 2.12.99

Supported QGIS version

New profile

Additional context

Issue does not replicate in new QGIS profile??!

agiudiceandrea commented 1 year ago

Issue does not replicate in new QGIS profile??!

@RatInTheField, could you please clarify if the issue does occur or doesn't occur using a new QGIS user profile, what is the relation of the issue with the 'Freehand Raster Georeferencer' plugin you mentioned in the report and if with "Clip To Extent" you mean the "Clip raster by extent" GDAL processing algorithm? Could you please provide a sample raster layer and an extent in order to reproduce the issue?

github-actions[bot] commented 1 year ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

RatInTheField commented 1 year ago

@RatInTheField, could you please clarify if the issue does occur or doesn't occur using a new QGIS user profile,

The issue did NOT recur in new profile

what is the relation of the issue with the 'Freehand Raster Georeferencer' plugin you mentioned in the report

Freehand Raster Georeferencer was the first tool that I noticed that triggered the issue

and if with "Clip To Extent" you mean the "Clip raster by extent" GDAL processing algorithm?

Yes

Qgis_query_20221219_comp.docx

I hope these help, let me know if you need anything else

agiudiceandrea commented 1 year ago

The issue did NOT recur in new profile Freehand Raster Georeferencer was the first tool that I noticed that triggered the issue

This means the issue is very likely not actually a QGIS issue, but it may be due to the Freehand Raster Georeferencer plugin or one of the other plugins installed in your user profile. Anyway, I've tried using the "Freehand Raster Georeferencer" 0.8.3 plugin using QGIS 3.28.2 on Windows and the exported georeferenced raster layer is correctly displayed in QGIS with red, green and blue bands. Could you please provide a sample raster layer that doesn't show the green band when imported in QGIS?

It seems to me the info contained in the attached MS Word file don't show any issue with the "Clip raster by extent" GDAL processing algorithm. Could you please clarify this aspect?

github-actions[bot] commented 1 year ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

github-actions[bot] commented 1 year ago

While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. Or, if you have any further questions, there are also further support channels that can help you.