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

GDAL Rasterize does not rasterize vectors with field 0 #20801

Closed
qgib opened this issue May 4, 2015 · 9 comments
Closed

GDAL Rasterize does not rasterize vectors with field 0 #20801

qgib opened this issue May 4, 2015 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented May 4, 2015

Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 12695
Affected QGIS version: 2.8.1
Redmine category:processing/gdal
Assignee: Giovanni Manghi


All records are rasterized, except those with value of the selected field = 0. This seems inappropriate

@qgib
Copy link
Contributor Author

qgib commented May 4, 2015

Author Name: Giovanni Manghi (@gioman)


Cannot confirm on qgis master. Please attach sample data.


  • status_id was changed from Open to Feedback
  • assigned_to_id was changed from Victor Olaya to Giovanni Manghi

@qgib
Copy link
Contributor Author

qgib commented May 4, 2015

Author Name: Paolo Cavallini (@pcav)


Done with the basins from exercise data.
Thanks.

@qgib
Copy link
Contributor Author

qgib commented May 4, 2015

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Done with the basins from exercise data.
Thanks.

if you mean the training manual exercise data then I cannot see any "basins" layer. Better attach the data is giving you problems.

@qgib
Copy link
Contributor Author

qgib commented May 5, 2015

@qgib
Copy link
Contributor Author

qgib commented May 6, 2015

Author Name: Giovanni Manghi (@gioman)


I tested on both QGIS master and 2.8.1 on both Linux and Windows and in all cases, with the provided vector, there are no issues and the polygon with attribute = 0 are correctly rasterized to pixels with value = 0.

If you use the tool and choose "byte" as type for output you must pay attention to the value used for nodata, as -9999 cannot fit in such type and so it is automatically changed to 0.

@qgib
Copy link
Contributor Author

qgib commented May 6, 2015

Author Name: Paolo Cavallini (@pcav)


Got it, thanks. Perhaps a better default could be chosen for nulls?

@qgib
Copy link
Contributor Author

qgib commented May 7, 2015

Author Name: Giovanni Manghi (@gioman)


maybe is better to change the default type to int16?

@qgib
Copy link
Contributor Author

qgib commented May 7, 2015

Author Name: Paolo Cavallini (@pcav)


Fixed with fb141e7
Thanks.

@qgib
Copy link
Contributor Author

qgib commented May 7, 2015

Author Name: Paolo Cavallini (@pcav)


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

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib closed this as completed May 25, 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! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant