import WorkFlowServer from './WorkFlowServer'
import { defaultValue } from '../../../util'
/**
* 栅格代数运算
* @class WorkFlowServer600370
*
* @extends WorkFlowServer
* @param {Object} options 构造参数
* @param {String} [options.url] 工作流基地址,必传
* @param {String} [options.srcInfos] 参与代数运算的源栅格数据路径集合,多个用英文逗号分隔,必须保证集合中栅格数据的波段数相同,必传,例如:gdbp://MapGisLocal/sample/ras/影像数据,C://Users//lyd//Desktop//影像数据.tif
* @param {String} [options.desInfo] 输出结果路径,必传,例如:gdbp://MapGisLocal/sample/ras/影像数据_result或C://Users//lyd//Desktop//影像数据_result.tif
* @param {String} [options.expression] 运算表达式,支持基础运算和函数表达式,其中源栅格数据路径集合中的数据分别对应变量I1、I2、I3、.....、In,必传,例如:I1+200
* @param {Number} [options.pixelType] 输出结果的像素类型,-1:默认取集合中的第一个数据,1:8位无符号整数,2:16位无符号整数,4:32位无符号整数,5:32位有符号整数,6:32位浮点数据,7:64位浮点数据,必传,例如:{"-1":"默认取集合中的第一个数据","1":"8位无符号整数","2":"16位无符号整数","4":"32位无符号整数","5":"32位有符号整数","6":"32位浮点数据","7":"64位浮点数据"}
* @param {String} [options.cellSizeX] 输出结果的x分辨率,为空取集合中第一个数据的x分辨率
* @param {String} [options.cellSizeY] 输出结果的y分辨率,为空取集合中第一个数据的y分辨率
* @example
const workFlowServer600370 = WorkFlowServer.createWorkFlow({
url: "http://localhost:8089/igs/rest/services/workflow/600370/WorkflowServer",
srcInfos: "gdbp://MapGISLocalPlus/香港/ras/dtm_test",
desInfo: "gdbp://MapGISLocalPlus/香港/ras/dtm_test_result",
expression: "I1+200",
});
workFlowServer600370.execute({
method: Zondy.Enum.FetchMethod.get,
success: function (res) {
console.log("execute: ", res);
},
});
*/
class WorkFlowServer600370 extends WorkFlowServer {
constructor(options) {
super(options)
const opt = options || {}
/**
* @description 工作流基地址,必传
* @member {String} WorkFlowServer600370.prototype.url
* */
this.url = opt.url
/**
* @description 600370
* @member {Number} WorkFlowServer600370.prototype.flowId
* @readonly
* */
this.flowId = 600370
/**
* @description 栅格代数运算
* @member {String} WorkFlowServer600370.prototype.description
* @readonly
* */
this.description = '栅格代数运算'
/**
* @description 其它
* @member {String} WorkFlowServer600370.prototype.groupName
* @readonly
* */
this.groupName = '其它'
/**
* @description 参与代数运算的源栅格数据路径集合,多个用英文逗号分隔,必须保证集合中栅格数据的波段数相同,必传,例如:gdbp://MapGisLocal/sample/ras/影像数据,C://Users//lyd//Desktop//影像数据.tif
* @member {String} WorkFlowServer600370.prototype.srcInfos
* */
this.srcInfos = opt.srcInfos
/**
* @description 输出结果路径,必传,例如:gdbp://MapGisLocal/sample/ras/影像数据_result或C://Users//lyd//Desktop//影像数据_result.tif
* @member {String} WorkFlowServer600370.prototype.desInfo
* */
this.desInfo = opt.desInfo
/**
* @description 运算表达式,支持基础运算和函数表达式,其中源栅格数据路径集合中的数据分别对应变量I1、I2、I3、.....、In,必传,例如:I1+200
* @member {String} WorkFlowServer600370.prototype.expression
* */
this.expression = opt.expression
/**
* @description 输出结果的像素类型,-1:默认取集合中的第一个数据,1:8位无符号整数,2:16位无符号整数,4:32位无符号整数,5:32位有符号整数,6:32位浮点数据,7:64位浮点数据,必传,例如:{"-1":"默认取集合中的第一个数据","1":"8位无符号整数","2":"16位无符号整数","4":"32位无符号整数","5":"32位有符号整数","6":"32位浮点数据","7":"64位浮点数据"}
* @member {Number} WorkFlowServer600370.prototype.pixelType
* */
this.pixelType = defaultValue(opt.pixelType, -1)
/**
* @description 输出结果的x分辨率,为空取集合中第一个数据的x分辨率
* @member {String} WorkFlowServer600370.prototype.cellSizeX
* */
this.cellSizeX = defaultValue(opt.cellSizeX, '')
/**
* @description 输出结果的y分辨率,为空取集合中第一个数据的y分辨率
* @member {String} WorkFlowServer600370.prototype.cellSizeY
* */
this.cellSizeY = defaultValue(opt.cellSizeY, '')
}
/**
* @description 获取执行工作流check对象
* @private
* @return {Object}
*/
_getCheckQueryOpts() {
return {
srcInfos: {
required: true,
type: 'String'
},
desInfo: {
required: true,
type: 'String'
},
expression: {
required: true,
type: 'String'
},
pixelType: {
required: true,
type: 'Number'
},
cellSizeX: {
type: 'String'
},
cellSizeY: {
type: 'String'
}
}
}
}
export default WorkFlowServer600370