(status, perc)
| 198 | logger.info("Exporting raster {} with options: {}".format(input, json.dumps(opts))) |
| 199 | tmpfile = tempfile.mktemp('_raster.{}'.format(extension_for_export_format(opts.get('format', 'gtiff'))), dir=settings.MEDIA_TMP) |
| 200 | def progress_callback(status, perc): |
| 201 | self.update_state(state="PROGRESS", meta={"status": status, "progress": perc}) |
| 202 | |
| 203 | export_raster_sync(input, tmpfile, progress_callback=progress_callback, **opts) |
| 204 | result = {'file': tmpfile} |