-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
"Clip raster by mask layer" produces different results than "Clipper" from Raster Menu #17998
Comments
Author Name: Filipe Dias (@fsdias) SAGA 2.10/"Clip grid with polygon" produced a raster with the same statistics as the output from "clip raster with mask layer" and assigned -32767 as NoDataValue |
Author Name: Giovanni Manghi (@gioman) The different stats are explained because all the pixels that have 0 value are evidently counted in the stats (that does not happens for NO DATA). If you need to have NO DATA in the output from the tool in the raster menu then you must check the "no data value" option (and set it to 0).
|
Author Name: Filipe Dias (@fsdias) Giovanni Manghi wrote:
You're right But one issue remains: if the original raster doesn't have a NoDataValue, then the tool in the processing toolbox automatically assigns it to 0. The function "clipper" does not do this.
|
Author Name: Giovanni Manghi (@gioman) Filipe Dias wrote:
to me makes much more sense that the areas outside the clipped area are NO DATA rather than 0. So in this sense the processing tool acts better by default than the tool in th vector menu, that has the option unchecked. |
Author Name: Filipe Dias (@fsdias) There is that. But maybe the tool in the Raster Menu was designed that way because of some use case? Anyway, it's important that both tools behave the same way. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Alexander Bruy (@alexbruy) Works fine in master. There is a minor difference in statistics cause by the fact that Processing tool aligns the coordinates of the extent of the output file to the values of the resolution ("-tap" option). Please reopen if necessary.
|
Author Name: Filipe Dias (@fsdias)
Original Redmine Issue: 9400
Affected QGIS version: 2.4.0
Redmine category:processing/gdal
Assignee: Alexander Bruy
I tried clipping a raster with "Clipper" from the Raster Menu and "Clip with mask layer" from the Processing Toolbox and obtained different results
The outputs of both functions had:
different raster statistics (Layer properties ->Metadata->Band 1)
handled no "NoDataValues" differently. While Clipper kept "NoDataValue" undefined, Clip with mask layer assigned "0" as NoDataValue, even though I set "none" in Nodata value
Am I missing something? I attached test data to reproduce the issue
The text was updated successfully, but these errors were encountered: