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

Processing: GDAL Proximity - incorrect result if "Values" is not filled #22117

Closed
qgib opened this issue Jan 15, 2016 · 5 comments
Closed

Processing: GDAL Proximity - incorrect result if "Values" is not filled #22117

qgib opened this issue Jan 15, 2016 · 5 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
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 15, 2016

Author Name: Filipe Dias (@fsdias)
Original Redmine Issue: 14115
Affected QGIS version: 2.12.2
Redmine category:processing/gdal
Assignee: Victor Olaya


Rasterize (GDAL Rasterize) the attached shapefile using ID as value

Run Proximity with the resulting raster

Output raster has the same value in every pixel

Proximity grid from SAGA GIS works as expected and generates a raster with distances.


@qgib
Copy link
Contributor Author

qgib commented Jan 15, 2016

Author Name: Filipe Dias (@fsdias)


  • 9472 was configured as roads.zip

@qgib
Copy link
Contributor Author

qgib commented Jan 17, 2016

Author Name: Alexander Bruy (@alexbruy)


Running gdal_proximity.py from command line gives same result, so seems this is GDAL issue not Processing. Please submit ticket to GDAL track.


  • resolution was changed from to up/downstream
  • status_id was changed from Open to Rejected

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Filipe Dias (@fsdias)


Alexander, thanks for testing.

I filled "Values" with 10 (the ID value with which the roads raster was created) and it worked as expected.

It seems the algorithm needs the user to fill it with the appropriate value. Does this still qualify as a GDAL bug?


  • subject was changed from Processing: GDAL Proximity appears to be broken to Processing: GDAL Proximity - incorrect result if "Values" is not filled

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Alexander Bruy (@alexbruy)


With passed "Values" it produces correct result. I still think that this is GDAL bug, as from documentation, "values" is

A list of target pixel values in the source image to be considered target pixels. If not specified, all non-zero pixels will be considered target pixels.

Maybe it takes in account also NODATA values


  • status_id was changed from Rejected to Feedback
  • resolution was changed from up/downstream to

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2016

Author Name: Giovanni Manghi (@gioman)


I really don't see anything wrong here. GDAL expects a list of values and so (of course) does QGIS. If not provided it uses all non zero pixels. Someone could argue about nulls, but that must be done in the gdal tracker.


  • resolution was changed from to invalid
  • 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 added this to the Version 2.14 milestone 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