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: Clip raster by mask (GDAL) throws an error if the output is a temporary file #23482

Closed
qgib opened this issue Sep 12, 2016 · 11 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 Sep 12, 2016

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


It works if the user selects "save to file".

2016-09-13T09:33:17 0 GDAL execution console output
2016-09-13T09:34:01 0 GDAL execution console output
2016-09-13T09:34:01 2 Error loading result layer:
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/processing/gui/Postprocessing.py", line 75, in handleAlgorithmResults
out.name))
File "/usr/share/qgis/python/plugins/processing/tools/dataobjects.py", line 199, in load
+ '
Check the processing framework log to look for errors')
RuntimeError: Could not load layer: /tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d75a7af7c70740fb95780428b2fbf124/OUTPUT.tif
Check the processing framework log to look for errors


@qgib
Copy link
Contributor Author

qgib commented Sep 12, 2016

Author Name: Victor Olaya (@volaya)


just tried in master and it works

Can you confirm that the file is not created?

Aslo, other algorithms work when using temporary filenames?

@qgib
Copy link
Contributor Author

qgib commented Sep 13, 2016

Author Name: Filipe Dias (@fsdias)


The file is correctly generated. I went to:

/tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d61725a001ca42c39103e38932849a37

and loaded "Extent.tiff" into QGIS sucessfully.

It seems there is something wrong with the import

@qgib
Copy link
Contributor Author

qgib commented Sep 13, 2016

Author Name: Filipe Dias (@fsdias)


I only tried this with GDAL Slope and works as expected

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Alexander Bruy (@alexbruy)


Are you sure that file correctly generated? Because path from your comment

/tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d61725a001ca42c39103e38932849a37

is not the same as path in the error message

/tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d75a7af7c70740fb95780428b2fbf124

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Filipe Dias (@fsdias)


Yes, I am sure. The paths are different because I tried to run it a second time.

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Alexander Bruy (@alexbruy)


Works for me with QGIS 2.16.2 (7854fe2). Also tested with master and master_2 — same result, works fine.

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Filipe Dias (@fsdias)


I've narrowed it down. With the attached files do the following:

  • use "Polygon from layer extent" on "shape.shp" and save it as temporary file

  • use the above temporary file in "Clip raster by mask layer"

  • result in the screenshot


  • 10388 was configured as screenshot.png

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Filipe Dias (@fsdias)


  • 10389 was configured as issue.tar.gz

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Victor Olaya (@volaya)


The error is that it is creating a Extent.tif file...while it should be called OUTPUT.tif

No idea why that is happening. I will check

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Alexander Bruy (@alexbruy)


This happens because of exporting vector layers (to handle selection) and updating command with new layer names/paths. Already fixed in master, master_2 and backported to 2.14 and 2.16. Please test with latest versions and report.

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2016

Author Name: Filipe Dias (@fsdias)


Great. I will keep and eye out for this bug in the next point release.


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open 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