diff --git a/app/api/tasks.py b/app/api/tasks.py index bb83e9b8..a17697c6 100644 --- a/app/api/tasks.py +++ b/app/api/tasks.py @@ -225,7 +225,7 @@ class TaskDownloads(TaskNestedView): allowed_assets = { 'all': 'all.zip', 'geotiff': os.path.join('odm_orthophoto', 'odm_orthophoto.tif'), - 'texturedmesh': '_SEE_PATH_BELOW_', + 'texturedmodel': '_SEE_PATH_BELOW_', 'las': os.path.join('odm_georeferencing', 'odm_georeferenced_model.ply.las'), 'ply': os.path.join('odm_georeferencing', 'odm_georeferenced_model.ply'), 'csv': os.path.join('odm_georeferencing', 'odm_georeferenced_model.csv') @@ -233,8 +233,8 @@ class TaskDownloads(TaskNestedView): # Generate textured mesh if requested try: - if asset == 'texturedmesh': - allowed_assets[asset] = os.path.basename(task.get_textured_mesh_archive()) + if asset == 'texturedmodel': + allowed_assets[asset] = os.path.basename(task.get_textured_model_archive()) except FileNotFoundError: raise exceptions.NotFound("Asset does not exist") diff --git a/app/models.py b/app/models.py index 1e7ad1d6..ace222f7 100644 --- a/app/models.py +++ b/app/models.py @@ -419,15 +419,15 @@ class Task(models.Model): } } - def get_textured_mesh_archive(self): + def get_textured_model_archive(self): archive_path = self.assets_path("odm_texturing.zip") - textured_mesh_directory = self.assets_path("odm_texturing") + textured_model_directory = self.assets_path("odm_texturing") - if not os.path.exists(textured_mesh_directory): - raise FileNotFoundError("{} does not exist".format(textured_mesh_directory)) + if not os.path.exists(textured_model_directory): + raise FileNotFoundError("{} does not exist".format(textured_model_directory)) if not os.path.exists(archive_path): - shutil.make_archive(os.path.splitext(archive_path)[0], 'zip', textured_mesh_directory) + shutil.make_archive(os.path.splitext(archive_path)[0], 'zip', textured_model_directory) return archive_path diff --git a/app/static/app/js/classes/AssetDownloads.js b/app/static/app/js/classes/AssetDownloads.js index bb244ffd..5749babb 100644 --- a/app/static/app/js/classes/AssetDownloads.js +++ b/app/static/app/js/classes/AssetDownloads.js @@ -32,7 +32,7 @@ const api = { all: function() { return [ new AssetDownload("GeoTIFF","geotiff","fa fa-map-o"), - new AssetDownload("Textured Mesh","texturedmesh","fa fa-connectdevelop"), + new AssetDownload("Textured Model","texturedmodel","fa fa-connectdevelop"), new AssetDownload("LAS","las","fa fa-cube"), new AssetDownload("PLY","ply","fa fa-cube"), new AssetDownload("CSV","csv","fa fa-cube"), diff --git a/app/tests/test_api_task.py b/app/tests/test_api_task.py index f653cc47..75928157 100644 --- a/app/tests/test_api_task.py +++ b/app/tests/test_api_task.py @@ -170,7 +170,7 @@ class TestApiTask(BootTransactionTestCase): self.assertTrue(res.status_code == status.HTTP_404_NOT_FOUND) # Cannot download assets (they don't exist yet) - assets = ["all", "geotiff", "texturedmesh", "las", "csv", "ply"] + assets = ["all", "geotiff", "texturedmodel", "las", "csv", "ply"] for asset in assets: res = client.get("/api/projects/{}/tasks/{}/download/{}/".format(project.id, task.id, asset)) diff --git a/slate/source/includes/reference/_task.md b/slate/source/includes/reference/_task.md index fb736ef6..05fc726e 100644 --- a/slate/source/includes/reference/_task.md +++ b/slate/source/includes/reference/_task.md @@ -115,7 +115,7 @@ Asset | Description ----- | ----------- all | Archive (.zip) containing all assets, including an orthophoto, TMS tiles, a textured 3D model and point cloud in various formats. geotiff | GeoTIFF orthophoto. -texturedmesh | Archive (.zip) containing the textured 3D model +texturedmodel | Archive (.zip) containing the textured 3D model las | Point cloud in .LAS format. ply | Point cloud in .PLY format. csv | Point cloud in .CSV format.