Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgis table with float type attribute interprets null as zero. #11021

Closed
qgib opened this issue Feb 27, 2008 · 15 comments
Closed

Postgis table with float type attribute interprets null as zero. #11021

qgib opened this issue Feb 27, 2008 · 15 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Feb 27, 2008

Author Name: cgsbob - (cgsbob -)
Original Redmine Issue: 962

Redmine category:vectors
Assignee: Jürgen Fischer


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.


@qgib
Copy link
Contributor Author

qgib commented Feb 28, 2008

Author Name: Frank Warmerdam - (Frank Warmerdam -)


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?

@qgib
Copy link
Contributor Author

qgib commented Feb 28, 2008

Author Name: cgsbob - (cgsbob -)


Replying to "cgsbob":/issues/show/962:
The image I just uploaded has a bug :-) The beginning arrow coming from the pgadmin3 window should begin at record 141 (one cell below).

@qgib
Copy link
Contributor Author

qgib commented Feb 28, 2008

Author Name: cgsbob - (cgsbob -)


Replying to [comment:2 cgsbob]:

Replying to "cgsbob":/issues/show/962:
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?

@qgib
Copy link
Contributor Author

qgib commented Mar 13, 2008

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Open to Closed
  • resolution was changed from to fixed

@qgib
Copy link
Contributor Author

qgib commented Mar 25, 2008

Author Name: cgsbob - (cgsbob -)


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 #11021 meant that the null attributes would not be rendered.

@qgib
Copy link
Contributor Author

qgib commented Mar 25, 2008

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Closed to Feedback
  • resolution was changed from fixed to

@qgib
Copy link
Contributor Author

qgib commented Mar 26, 2008

Author Name: Jürgen Fischer (@jef-n)


fixed in


  • status_id was changed from Feedback to Closed
  • resolution was changed from to fixed

@qgib
Copy link
Contributor Author

qgib commented Mar 26, 2008

Author Name: cgsbob - (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.

@qgib
Copy link
Contributor Author

qgib commented Mar 26, 2008

Author Name: Jürgen Fischer (@jef-n)


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?


  • resolution was changed from fixed to
  • status_id was changed from Closed to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 26, 2008

Author Name: cgsbob - (cgsbob -)


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.

@qgib
Copy link
Contributor Author

qgib commented Mar 27, 2008

Author Name: Jürgen Fischer (@jef-n)


You probably missed the working version. might have worked, but my optimization in 9a584ed (SVN r8287) actually broke the postgres provider. I think I've fixed that in fa696cd (SVN r8291).


  • status_id was changed from Feedback to Closed
  • resolution was changed from to fixed

@qgib
Copy link
Contributor Author

qgib commented Mar 28, 2008

Author Name: Jürgen Fischer (@jef-n)


  • resolution was changed from fixed to
  • status_id was changed from Closed to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 28, 2008

Author Name: Jürgen Fischer (@jef-n)


thanks for the patience. I think I finally got it right.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to fixed

@qgib
Copy link
Contributor Author

qgib commented Mar 28, 2008

Author Name: cgsbob - (cgsbob -)


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!

@qgib
Copy link
Contributor Author

qgib commented Mar 31, 2008

Author Name: Jürgen Fischer (@jef-n)


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.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant