Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/OpenDroneMap/WebODM
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed May 7, 2024
2 parents 5c663b8 + 568e80a commit f0cd13a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/raster_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ def export_raster(input, output, **opts):
output_raster = output
jpg_background = 255 # white

# KMZ is special, we just export it as PNG with EPSG:4326
# KMZ is special, we just export it as GeoTIFF
# and then call GDAL to tile/package it
kmz = export_format == "kmz"
if kmz:
export_format = "png"
epsg = 4326
export_format = "gtiff-rgb"
path_base, _ = os.path.splitext(output)
output_raster = path_base + ".png"
output_raster = path_base + ".kmz.tif"

if export_format == "jpg":
driver = "JPEG"
Expand Down Expand Up @@ -282,4 +281,4 @@ def write_band(arr, dst, band_num):
if kmz:
subprocess.check_output(["gdal_translate", "-of", "KMLSUPEROVERLAY",
"-co", "Name={}".format(name),
"-co", "FORMAT=PNG", output_raster, output])
"-co", "FORMAT=AUTO", output_raster, output])

0 comments on commit f0cd13a

Please sign in to comment.