Skip to content

Add cutline to downloadable assets when/if available #1699

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

Merged
merged 12 commits into from
Jul 18, 2025
1 change: 1 addition & 0 deletions app/models/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class Task(models.Model):
'orthophoto.png': os.path.join('odm_orthophoto', 'odm_orthophoto.png'),
'orthophoto.mbtiles': os.path.join('odm_orthophoto', 'odm_orthophoto.mbtiles'),
'orthophoto.kmz': os.path.join('odm_orthophoto', 'odm_orthophoto.kmz'),
'cutline.gpkg': os.path.join('odm_orthophoto', 'cutline.gpkg'),
'georeferenced_model.las': os.path.join('odm_georeferencing', 'odm_georeferenced_model.las'),
'georeferenced_model.laz': os.path.join('odm_georeferencing', 'odm_georeferenced_model.laz'),
'georeferenced_model.ply': os.path.join('odm_georeferencing', 'odm_georeferenced_model.ply'),
Expand Down
1 change: 1 addition & 0 deletions app/static/app/js/classes/AssetDownloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const api = {
new AssetDownload(_("Orthophoto"),"orthophoto.tif","far fa-image", tiffExportFormats),
new AssetDownload(_("Orthophoto (MBTiles)"),"orthophoto.mbtiles","far fa-image"),
new AssetDownload(_("Orthophoto (Tiles)"),"orthophoto_tiles.zip","fa fa-table"),
new AssetDownload(_("Orthophoto Cutline"),"cutline.gpkg","fa fa-image"),
new AssetDownload(_("Terrain Model"),"dtm.tif","fa fa-chart-area", tiffExportFormats, elevationExportParams),
new AssetDownload(_("Terrain Model (Tiles)"),"dtm_tiles.zip","fa fa-table"),
new AssetDownload(_("Surface Model"),"dsm.tif","fa fa-chart-area", tiffExportFormats, elevationExportParams),
Expand Down
3 changes: 2 additions & 1 deletion app/tests/test_api_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def test_task(self):
'images': [image1, image2, multispec_image, gcp],
'name': 'test_task',
'processing_node': pnode.id,
'resize_to': img1.size[0] / 2.0
'resize_to': img1.size[0] / 2.0,
'orthophoto-cutline': True
Copy link
Member

@pierotofy pierotofy Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't do much (task options are sent in a different manner).

}, format="multipart")
self.assertTrue(res.status_code == status.HTTP_201_CREATED)
resized_task = Task.objects.latest('created_at')
Expand Down
Loading