-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
Probably need to add something to test_api_task.py, but not sure. |
@@ -13,6 +13,7 @@ | |||
'orthophoto.tif': os.path.join('odm_orthophoto', 'odm_orthophoto.tif'), | |||
'orthophoto.png': os.path.join('odm_orthophoto', 'odm_orthophoto.png'), | |||
'orthophoto.mbtiles': os.path.join('odm_orthophoto', 'odm_orthophoto.mbtiles'), | |||
'cutline.gpkg': os.path.join('odm_orthophoto', 'cutline.gpkg'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old migration files should never be updated. 🙅
@@ -9,7 +9,7 @@ import Workers from '../classes/Workers'; | |||
|
|||
export default class ExportAssetPanel extends React.Component { | |||
static defaultProps = { | |||
exportFormats: ["gtiff-rgb", "gtiff", "jpg", "png", "kmz"], | |||
exportFormats: ["gtiff-rgb", "gtiff", "jpg", "png", "kmz","gpkg"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mm, I think the intent here was to allow the download of the cutline, but this isn't the place where to add it.
Going back through pull requests, this is my first substantive (ahem -- but still minor) WebODM modification. Any tips on what I'm getting wrong here most welcome. I was guessing a bit from digging through variables what might work, and while I got downloads working, I've got something wrong as I've broken the map. |
Usually opening the Chrome Developers tools (or equivalent for your browser) and checking the Javascript console output will give some clues (although from the changes you made/pushed to GitHub, I'm not sure why it broke). |
Sorry, forgot to include:
|
app/models/task.py
Outdated
@@ -1086,6 +1087,7 @@ def get_map_items(self): | |||
if 'orthophoto.tif' in self.available_assets: | |||
types.append('orthophoto') | |||
types.append('plant') | |||
if 'cutline.gpkg' in self.available_assets: types.append('cutline') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cutline
should not be in "types".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. That was a change I made before I had a mental model for the change. Reverted.
I think, now that the build is running, but we aren't generating the cutline so it can be tested. Looking into it. |
I'll start by looking at how this is done for dems. |
I think I need a hint. I assume I need to trigger cutlines in at least one of the tests so that they can be tested, but I have been unable to discern where. |
app/tests/test_api_task.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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).
I think you'll need to add an empty file in https://github.com/OpenDroneMap/NodeODM/tree/master/tests/processing_results/odm_orthophoto ( |
Leaving notes for future Steve, who may not be any better informed than current Steve about updating submodules:
|
No description provided.