https://issues.qgis.org/https://issues.qgis.org/favicon.ico2015-03-03T18:26:45ZQGIS Issue TrackingQGIS Application - Bug report #12306: QGIS fails to load min-values for graduated style when datasource is postgres and table contains negative valueshttps://issues.qgis.org/issues/12306?journal_id=597272015-03-03T18:26:45ZMike Taves
<ul><li><strong>Affected QGIS version</strong> changed from <i>2.8.1</i> to <i>2.8.0</i></li><li><strong>Operating System</strong> deleted (<del><i>Linux Ubuntu</i></del>)</li><li><strong>Target version</strong> set to <i>Version 2.8.2</i></li></ul>This bug can be reproduced and extended to not just negative values, but values above 9999. For example, consider a continuation:<br /><pre>
truncate qgistest;
insert into qgistest (val, geo) values (-10, ST_GeomFromText('POINT(-2 1)'));
insert into qgistest (val, geo) values (-5, ST_GeomFromText('POINT(-1 1)'));
insert into qgistest (val, geo) values (75, ST_GeomFromText('POINT(5 1)'));
insert into qgistest (val, geo) values (9999, ST_GeomFromText('POINT(5 1)'));
insert into qgistest (val, geo) values (10000, ST_GeomFromText('POINT(5 1)'));
insert into qgistest (val, geo) values (12000, ST_GeomFromText('POINT(5 1)'));
</pre><br />Now the 5 equal interval classes are:
<ul>
<li>-10.0000 - 1991.8000</li>
<li>1991.8000 - 3993.6000 </li>
<li>3993.6000 - 5995.4000 </li>
<li>5995.4000 - 7997.2000 </li>
<li>7997.2000 - 9999.0000</li>
</ul>
<p>So now negative values are included, but the arbitrary high limit is now 9999. Values above that are not shown.</p>
<p>Note that QGIS 2.6 did not have this bug, and I first saw it in QGIS 2.8.0 a few weeks ago.</p>
The affected modes that exhibit behaviours of this bug are:
<ul>
<li>Equal Interval</li>
<li>Pretty Breaks</li>
</ul> QGIS Application - Bug report #12306: QGIS fails to load min-values for graduated style when datasource is postgres and table contains negative valueshttps://issues.qgis.org/issues/12306?journal_id=597292015-03-03T22:30:53ZJürgen Fischerjef@norbit.de
<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/f7b790ffbf3507ccfbf448777a59528fd18c8693" title="postgres provider: use min()/max() before casting (followup bf56457; fixes #12306)">f7b790ffbf3507ccfbf448777a59528fd18c8693</a>.</p> QGIS Application - Bug report #12306: QGIS fails to load min-values for graduated style when datasource is postgres and table contains negative valueshttps://issues.qgis.org/issues/12306?journal_id=597312015-03-03T22:54:14ZFalko Engel
<ul></ul><p>I have a similiar problem using QGIS 2.8.1 on Ubuntu with PostgreSQL 9.4 and PostGIS 2.1.5<br />I think that all different modes in the graduated style are not working correctly.</p>
<p>The modes "equal interval", "natural breaks" and "pretty breaks" never show the true maximum values and don't sort values correctly when negative values are involved. Furthermore I don't think the value 9999 is a threshold for this behaviour. Actually the limit of the displayed maximum changes each time one switches from one mode to the other.</p>
<p>I can confirm that with the same data exported to shp the problem doesn't occur.</p>
<p>One additional wish: I would be nice if one had the option to pick an individual color for NULL-values.</p>