Bug report #962
Postgis table with float type attribute interprets null as zero.
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Jürgen Fischer | ||
Category: | Vectors | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Debian | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 11021 |
Description
I tried to use Symbology>Continuous Color on a field that has nulls and noticed that these null values are interpreted as 0. As a result, I am getting a lot of black dots on my map (which I hoped would not show up on my map) along with white to red colored dots.
I also notice that "Open attribute table" shows these fields as 0 instead of null.
Associated revisions
fix #962: the image of the previously rendered feature was used instead of an empty one.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8294 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #962: the image of the previously rendered feature was used instead of an empty one.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8294 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Frank Warmerdam - over 16 years ago
I chatted about this very briefly on IRC and Bob reasonable suggested that the attribute table ought to show the field as NULL (perhaps blank) and the rendering might just not draw features with null fields for classification.
I skimmed the OGR provider and I see it makes no effort to distingish between NULL and non-null fields. Is it intended that providers can return features with NULL attributes marked in some fashion in the attribute map? Perhaps, those attributes should just not be added to the attribute map for that feature?
Skimming the Postgres provider, it also seems to make no effort to distingish between null and non-null field values.
Perhaps the problem is just at the provider level?
#2 Updated by cgsbob - over 16 years ago
Replying to cgsbob:
The image I just uploaded has a bug :-) The beginning arrow coming from the pgadmin3 window should begin at record 141 (one cell below).
#3 Updated by cgsbob - over 16 years ago
Replying to [comment:2 cgsbob]:
Replying to cgsbob:
The image I just uploaded has a bug :-) The beginning arrow coming from the pgadmin3 window should begin at record 141 (one cell below).
Disregard this the comment above...it is correct. Is there a way to delete comments?
#4 Updated by Jürgen Fischer over 16 years ago
- Status changed from Open to Closed
- Resolution set to fixed
#5 Updated by cgsbob - over 16 years ago
Replying to [comment:5 jef]:
I see that the attribute table now shows nulls as NULL, but the feature is still rendered as black dots. I was hoping that fixing #962 meant that the null attributes would not be rendered.
#6 Updated by Jürgen Fischer over 16 years ago
- Status changed from Closed to Feedback
- Resolution deleted (
fixed)
#7 Updated by Jürgen Fischer over 16 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
fixed in
#8 Updated by cgsbob - over 16 years ago
Replying to [comment:8 jef]:
fixed in
I wish this was an easier bug to fix, but there is still a problem :-) The null point features the color range white to red). When you zoom in these null point features disappears.
#9 Updated by Jürgen Fischer over 16 years ago
- Resolution deleted (
fixed) - Status changed from Closed to Feedback
Replying to [comment:9 cgsbob]:
Replying to [comment:8 jef]:
fixed in
I wish this was an easier bug to fix, but there is still a problem :-) The null point features the color range white to red). When you zoom in these null point features disappears.
Sorry, I don't get what you're saying. Did you post get mixed up?
#10 Updated by cgsbob - over 16 years ago
Replying to [comment:10 jef]:
Replying to [comment:9 cgsbob]:
Replying to [comment:8 jef]:
fixed in
I wish this was an easier bug to fix, but there is still a problem :-) The null point features the color range white to red). When you zoom in these null point features disappears.
Sorry, I don't get what you're saying. Did you post get mixed up?
Yes, I did mix up my post. I was trying to say that the features that have null attribute still appear in my map and when I zoom in those features they disappear. I'll upload some pics to demonstrate.
#11 Updated by Jürgen Fischer over 16 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
#12 Updated by Jürgen Fischer over 16 years ago
- Resolution deleted (
fixed) - Status changed from Closed to Feedback
#13 Updated by Jürgen Fischer over 16 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
thanks for the patience. I think I finally got it right.
#14 Updated by cgsbob - over 16 years ago
Replying to [comment:14 jef]:
thanks for the patience. I think I finally got it right.
I just updated from svn. Everything (well, almost everything :) ) is all right. One little cosmetic change you can make is to update the extent.
Thanks for all your work!
#15 Updated by Jürgen Fischer over 16 years ago
Replying to [comment:15 cgsbob]:
One little cosmetic change you can make is to update the extent.
I don't think the is a rendering issue. If you don't want to handle the null features at all, I'd suggest that you filter them out using a where clause.