python code for "Orthophoto/DSM" generation

We want to write python code for "Orthophoto/DSM" generation, but there will be exception in the sentence of "   production.addProductionJob( CCMasterKernelPy.TileProductionJob(production, reconstruction.getInternalTile(0)) ) ".

We try to use "getJobType()" and find there are two types of job " TileProductionJob or RasterProductionJob"

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

getJobType() → object

Return job type (TileProductionJob or RasterProductionJob).

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

So We guessed the problem should be caused by that we used the wrong job type in the python code,  so could you help to provide some sample python code on  "Orthophoto/DSM" generation?

Below is the sample code we get in SDK document, but there is only code sample with job type of "TileProductionJob " but not "RasterProductionJob":

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

# define a production for one tile
production = CCMasterKernelPy.Production(reconstruction)
production.addProductionJob( CCMasterKernelPy.TileProductionJob(production, reconstruction.getInternalTile(0)) )
reconstruction.addProduction(production)

# set production format and destination
production.setDriverName('OBJ')
production.setDestination('D:/DATA/my production')

# set production options
driverOptions = production.getDriverOptions()
driverOptions.put_int('TextureCompressionQuality', 80)
production.setDriverOptions(driverOptions)

# sumbit production processing
production.submitProcessing()

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Many thanks in advance.

Jinlong

Parents Reply Children
No Data