Skip to content

Commit

Permalink
Updated to use filename_generator function which includes automatic c…
Browse files Browse the repository at this point in the history
…leanup for temporary files
  • Loading branch information
tjellicoe-tpzuk committed Jul 2, 2024
1 parent e16ac44 commit d5ea0ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eoxserver/render/mapserver/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def _create_raster_layer_objs(map_obj, extent, sr, data, filename_generator, env
splitpath = data.rsplit(":",1)
data = splitpath[0]
index = int(splitpath[1]) + 1
temp_path = "/vsimem/%s" % uuid4().hex
temp_path = filename_generator.generate()
# extract only desired index to new temporary file
gdal.Translate(temp_path, data, bandList=[index])
data = temp_path
Expand Down

0 comments on commit d5ea0ab

Please sign in to comment.