I should also add, that I have tried to encode the NetworkTask.params member with a dictionary that I created that matches that of the successful encoding when using the UI:
network_task = PhotoScan.NetworkTask()
network_task.name = "BuildDem"
params
Out[243]: 2018-07-18 07:37:50
2018-07-18 07:37:50 {'projection': {'crs': 'GEOGCS["WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9102"]],AUTHORITY["EPSG","4326"]]',
2018-07-18 07:37:50 'radius': 1,
2018-07-18 07:37:50 'surface': 0,
2018-07-18 07:37:50 'transform': [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]}}
network_task.params = params
network_task.frames.append((PhotoScan.app.document.chunks[0].key, 0))
client = PhotoScan.NetworkClient()
client.connect("127.0.0.1")
2018-07-18 07:38:37 connected to 127.0.0.1:5840
batch_id = client.createBatch(path, [network_task])
network_task.encode()
Out[249]: 2018-07-18 07:39:17
2018-07-18 07:39:17 {'projection': {'crs': 'GEOGCS["WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9102"]],AUTHORITY["EPSG","4326"]]',
2018-07-18 07:39:17 'radius': 1,
2018-07-18 07:39:17 'surface': 0,
2018-07-18 07:39:17 'transform': [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]}}
However, the call to 'createBatch' produces the following encoding (notice the projection params are encoded as an array as opposed to a dictionary):
{
"id": 3,
"method": "createBatch",
"params": {
"path": "some_project.psx",
"tasks": [{
"frames": [
[0, 0]
],
"name": "BuildDem",
"params": {
"projection": ["radius", "surface", "transform", "crs"]
},
"supports_gpu": false
}],
"username": "someuser"
}
}