https://issues.qgis.org/https://issues.qgis.org/favicon.ico2011-07-25T07:11:43ZQGIS Issue TrackingQGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=253162011-07-25T07:11:43ZPaolo Cavallinicavallini@faunalia.it
<ul><li><strong>Tracker</strong> changed from <i>Bug report</i> to <i>4</i></li><li><strong>Start date</strong> set to <i>2011-07-25</i></li><li><strong>Pull Request or Patch supplied</strong> set to <i>No</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=270162011-12-16T11:44:36ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Target version</strong> changed from <i>Version 1.7.0</i> to <i>Version 1.7.4</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=279492011-12-20T11:58:45ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>Setting "No data value" has effect on rendering - pixels are rendered transparent.</p>
<p>It does not have effect on identify tool (and similar) and it cannot be easily fixed. While the no data value is set on layer, QgsRasterLayer::identify() calls QgsRasterDataProvider::identify(), and the provider does not know about the no data value set by user on the raster layer. The reason why raster provider returns textual results (QMap<QString, QString>), which can hardly be modified by layer, is to allow for example WMS provider to represent various strange results, e.g. feature attributes, non just a raster value.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=281462011-12-24T04:51:22ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Assignee</strong> deleted (<del><i>Redmine Admin</i></del>)</li><li><strong>Subject</strong> changed from <i>setting the "no data value" in raster properties has no effect</i> to <i>setting "no data value" in raster properties is not working</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>6</i></li></ul><p>Actually in QGIS 1.7.3 and master setting the "no data value" has no effect on the pixel value. The only effect it has is turning the pixels with a certain value transparent, but for this we already have the "transparent pixel list".</p>
<p>The function of "no data value" should be to make pixels of a certain value as NULL.</p>
<p>I add that this field would be much better if could accept many values, separated by a comma (or with a selector that shows all the unique values).</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=281712011-12-24T06:47:20ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Crashes QGIS or corrupts data</strong> set to <i>No</i></li><li><strong>Subject</strong> changed from <i>setting "no data value" in raster properties is not working</i> to <i>"No data value" in raster properties is not working</i></li><li><strong>Affected QGIS version</strong> set to <i>master</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=281882011-12-25T07:29:57ZAlexander Bruy
<ul></ul><p>See also <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/4312" title="Raster custom NULL are not honoured (Closed)">#4312</a> and <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/4313" title="Custom NULL value for rasters is retained (Closed)">#4313</a></p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=301802012-04-15T06:46:37ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Priority</strong> changed from <i>6</i> to <i>High</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=302102012-04-15T07:23:03ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Tracker</strong> changed from <i>4</i> to <i>Bug report</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=309972012-04-16T04:28:05ZPaolo Cavallinicavallini@faunalia.it
<ul><li><strong>Target version</strong> changed from <i>Version 1.7.4</i> to <i>Version 1.8.0</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=346242012-09-04T10:01:16ZPaolo Cavallinicavallini@faunalia.it
<ul><li><strong>Target version</strong> changed from <i>Version 1.8.0</i> to <i>Version 2.0.0</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=355912012-10-05T02:06:25ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Operating System</strong> deleted (<del><i>All</i></del>)</li><li><strong>Status info</strong> deleted (<del><i>0</i></del>)</li><li><strong>Subject</strong> changed from <i>"No data value" in raster properties is not working</i> to <i>"additional no data value" has no effect (identify, raster calculator, etc.)</i></li></ul><p>Just spoke with both Radim and Marco at the developer meeting and they agree that this ticket should be stay open.</p>
<p>Even after all the latest changes in rasters the original issue is still there:</p>
<p>manually choosing a "additional no data value" has the only effect to make that values transparent. Both the identify tools and the raster calculator tools take into account the original pixel value.</p>
<p>This is confusing for users as they expect to be able to turn to NULLs the values defined in "additional no data value", and have those pixels considered as NULLs by all QGIS tools in that particular project.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=355922012-10-05T02:08:06ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Giovanni Manghi wrote:</p>
<blockquote>
<p>Just spoke with both Radim and Marco at the developer meeting and they agree that this ticket should be stay open.</p>
<p>Even after all the latest changes in rasters the original issue is still there:</p>
<p>manually choosing a "additional no data value" has the only effect to make that values transparent. Both the identify tools and the raster calculator tools take into account the original pixel value.</p>
<p>This is confusing for users as they expect to be able to turn to NULLs the values defined in "additional no data value", and have those pixels considered as NULLs by all QGIS tools in that particular project.</p>
</blockquote>
<p>Also histograms are affected, as the the values defined in "additional no data value" are still computed.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=355932012-10-05T02:09:01ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Subject</strong> changed from <i>"additional no data value" has no effect (identify, raster calculator, etc.)</i> to <i>"additional no data value" has no effect (identify, raster calculator, histograms, etc.)</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=355942012-10-05T02:10:12ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>see also <a class="issue tracker-1 status-5 priority-5 priority- closed" href="https://issues.qgis.org/issues/1380" title="No Data values are counted as values in the histogram (Closed)">#1380</a></p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=379992012-12-30T08:51:02ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=397212013-03-31T06:25:50ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>at least the identify seems fixed, histograms and raster calc are still affected.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=397892013-04-03T00:42:10ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>Giovanni Manghi wrote:</p>
<blockquote>
<p>at least the identify seems fixed, histograms and raster calc are still affected.</p>
</blockquote>
<p>Statistics and histogram should be fixed for GDAL in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/8e7ffd74dde847ce061b72b45f60d39e51672828" title="consider user no data values in GDAL raster statistics and histogram, fixes partialy #3840">8e7ffd7</a>. AFAIK, the raster calculator has to be changed to read data from QGIS providers (it is using GDAL directly) but it is not planned for 2.0. Marco, can you comment?</p>
<p>If the calculator is the only problem left, I would suggest to close this issue and create a new one for raster calculator.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=397962013-04-03T05:00:51ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=468182013-12-06T06:58:53ZMikhail Titov
<ul><li><strong>File</strong> <a href="/attachments/download/6548/osgeo4w-gdal-1.10.1-qgis-dev-nodata-extra-range-fail.png">osgeo4w-gdal-1.10.1-qgis-dev-nodata-extra-range-fail.png</a> added</li><li><strong>File</strong> <a href="/attachments/download/6546/osgeo4w-gdal-1.10.1-qgis-dev-nodata.png">osgeo4w-gdal-1.10.1-qgis-dev-nodata.png</a> added</li><li><strong>File</strong> <a href="/attachments/download/6547/osgeo4w-gdal-1.10.1-qgis-dev-nodata-extra.png">osgeo4w-gdal-1.10.1-qgis-dev-nodata-extra.png</a> added</li></ul><p>Just an update that this is still a problem with QGIS nightly build from OSGeo4W.</p>
<p>gdalinfo seems to report correct NODATA and stats, however QGIS-dev (1e8635c) shows bogus data. I'm attaching screenshots with correct gdalinfo output, messed up info in QGIS master, and I attach sample GeoTIFF to play with.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=468192013-12-06T07:01:39ZMikhail Titov
<ul><li><strong>File</strong> <a href="/attachments/download/6549/dem.tif">dem.tif</a> added</li></ul><p>I forgot to attach GeoTiff</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=468202013-12-06T07:26:22ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Target version</strong> changed from <i>Version 2.0.0</i> to <i>Future Release - High Priority</i></li><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li></ul> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=468582013-12-09T07:39:13ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>The new problem is not that additional no data value is ignored but that the original data source no data value (-999.9) is ignored, right?</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=468602013-12-09T09:28:45ZMikhail Titov
<ul></ul><p>I would not call it entirely new problem. I feel like these are all related. While true, that original negative fractional NODATA value is not respected, I cannot override it with additional no data value setting either.</p>
<p>If I use identity tool on original data as is, it reports empty areas as having 9999 value (instead of NODATA=-999.9). Histogram tool is also affected. If I set additional value to 9999, identity tool says the value on one of those cells is -999.8999 alike. I suspect there is direct float comparison, (perhaps with different bit width/precision storage, otherwise it got to work if read from GDAL) and mutual exclusion for NODATA setting, so 2 values can't be respected at the same time. I did not look at the code. It is just my guess from observed behavior.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=469572013-12-14T02:22:46ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>The problem is that the decimal no data value -999.9 cannot be represented with sufficient precision by the raster data type float32. -999.9 converted to float32 results in -999.9000244140625. No data value is stored in the raster as double, i.e. -999.89999999999997726 which cannot be represented by float32. The correct no data value for float32 data type could only be -999.9000244140625.</p>
<p>A solution could be to pass no data doubles given by GDALGetRasterNoDataValue through actual data type to get a representable value.</p>
<p>Until we fix that, you can simply disable (uncheck) original nonrepresentable no data value in transparency tab and everything should work as expected.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=469582013-12-14T03:03:28ZRadim Blazekradim.blazek@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Fixed in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/c4b248066da828c8f00f068053e50eff301ae663" title="convert GDAL no data value to a value representable by data type, fixes #3840">c4b248066da828c8f00f068053e50eff301ae663</a>.</p> QGIS Application - Bug report #3840: "additional no data value" has no effect (identify, raster calculator, histograms, etc.)https://issues.qgis.org/issues/3840?journal_id=469592013-12-14T03:07:10ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>Fixed.</p>
<p>The next bug report will be: "Why QGIS gives no data value -999.9000244140625 while GDAL -999.89999999999997726?"</p>