1
Python and Java API / Re: Build Orthomosaic and buildOrthomosaic have different behaviors using network
« on: October 02, 2021, 02:56:03 AM »
Alexey,
Thank you for the prompt response. Is Metashape.Task.* able to be called within a script that is called from Batch Process (within the Metashape GUI)? I am asking because it has the following:
"
if process_network:
network_tasks = []
for task in tasks:
if task.target == Metashape.Tasks.DocumentTarget:
network_tasks.append(task.toNetworkTask(doc))
else:
network_tasks.append(task.toNetworkTask(chunk))
client = Metashape.NetworkClient()
client.connect(network_server)
batch_id = client.createBatch(doc.path, network_tasks)
client.resumeBatch(batch_id)
print('Processing started, results will be saved to ' + output_folder + '.')
"
This would make me think this *.py file would be called from the CLI as within the GUI you setup 'network_server' and other network params in the toolbar.
If you CAN in fact call Metashape.Task within a *.py that is called within the Metashape GUI and used within a *.XML file, do you select 'Start on network?' or similar (I can't remember the exact language when you start a Batch Process).
But to answer your question, our *.py works just fine (i.e. calling buildOrthomosaic() and buildOrthophotos() within the same script). It is the Build Orthomosaic that is causing a 'null orthomosaic' error. Note that when I see 'Build Orthomosaic', it is the Batch Process step you can add to an XML using the dropdown toolbar (within Batch Process dialog).
Thanks!
Thank you for the prompt response. Is Metashape.Task.* able to be called within a script that is called from Batch Process (within the Metashape GUI)? I am asking because it has the following:
"
if process_network:
network_tasks = []
for task in tasks:
if task.target == Metashape.Tasks.DocumentTarget:
network_tasks.append(task.toNetworkTask(doc))
else:
network_tasks.append(task.toNetworkTask(chunk))
client = Metashape.NetworkClient()
client.connect(network_server)
batch_id = client.createBatch(doc.path, network_tasks)
client.resumeBatch(batch_id)
print('Processing started, results will be saved to ' + output_folder + '.')
"
This would make me think this *.py file would be called from the CLI as within the GUI you setup 'network_server' and other network params in the toolbar.
If you CAN in fact call Metashape.Task within a *.py that is called within the Metashape GUI and used within a *.XML file, do you select 'Start on network?' or similar (I can't remember the exact language when you start a Batch Process).
But to answer your question, our *.py works just fine (i.e. calling buildOrthomosaic() and buildOrthophotos() within the same script). It is the Build Orthomosaic that is causing a 'null orthomosaic' error. Note that when I see 'Build Orthomosaic', it is the Batch Process step you can add to an XML using the dropdown toolbar (within Batch Process dialog).
Thanks!