Skip to content

Commit

Permalink
Merge pull request #521 from EOxServer/dem-raster-mime-types
Browse files Browse the repository at this point in the history
add mime type of raster outputs of dem processes
  • Loading branch information
Lubomír Doležal committed Apr 27, 2022
2 parents cf9ea1d + 0ec3871 commit efa79ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eoxserver/services/ows/wps/processes/get_dem_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ def execute(coverage, identifier, bbox, result, z_factor, interval, scale, azimu
_output = CDByteBuffer(
fid.read(), filename=output_filename,
)
if getattr(_output, 'mime_type', None) is None:
setattr(_output, 'mime_type', result['mime_type'])
gdal.Unlink(output_filename)
gdal.Unlink(tmp_ds)
return _output
2 changes: 2 additions & 0 deletions eoxserver/services/ows/wps/processes/get_height_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def execute(coverage, line, interval, method, profile, **kwarg):

_output = CDByteBuffer(
image_data.read(), filename=output_filename,)
if getattr(_output, 'mime_type', None) is None:
setattr(_output, 'mime_type', profile['mime_type'])
tmp_ds = None
return _output

Expand Down

0 comments on commit efa79ef

Please sign in to comment.