import WorkFlowServer from './WorkFlowServer'
import { defaultValue } from '../../../util'
/**
* 图层叠加分析
* @class WorkFlowServer600227
*
* @extends WorkFlowServer
* @param {Object} options 构造参数
* @param {String} [options.url] 工作流基地址,必传
* @param {String} [options.srcInfo1] 被叠加简单要素类的URL,必传,例如:GDBP://mapgislocal/Sample/sfcls/overLayA
* @param {String} [options.srcInfo2] 叠加简单要素类的URL,必传,例如:GDBP://mapgislocal/Sample/sfcls/overLayB
* @param {String} [options.src1AttFilter] 被叠加简单要素类过滤条件,例如:mpArea>20000000
* @param {String} [options.src2AttFilter] 叠加简单要素类过滤条件,例如:mpArea>20000000
* @param {String} [options.desInfo] 结果简单要素类的URL,必传,例如:GDBP://mapgislocal/Sample/sfcls/overLayDes
* @param {Number} [options.attOptType] 是否进行属性操作,1:是 0:否,必传,例如:{"activeValue":"1","inactiveValue":"0"}
* @param {Number} [options.infoOptType] 共有部分的图形参数操作,0:随机,1:使用第一个类的图形参数,2:使用第二个类的图形参数,必传,例如:{"0":"随机","1":"使用第一个类的图形参数","2":"使用第二个类的图形参数"}
* @param {Number} [options.overType] 图层叠加类型,0:求并,1:求交(默认),2:求差,3:内裁,4:外裁,5:叠加,6:对称差,7:判别,必传,例如:{"0":"求并","1":"求交","2":"求差","3":"内裁","4":"外裁","5":"叠加","6":"对称差","7":"判别"}
* @param {Number} [options.radius] 容差半径,必传,例如:0.001
* @example
const workFlowServer600227 = WorkFlowServer.createWorkFlow({
url: "http://localhost:8089/igs/rest/services/workflow/600227/WorkflowServer",
srcInfo1: "gdbp://MapGISLocalPlus/test/sfcls/湖泊",
srcInfo2: "gdbp://MapGISLocalPlus/test/sfcls/农田",
src1AttFilter: "mpArea>0.000015",
src2AttFilter: "mpArea>0.000010",
desInfo: "gdbp://MapGISLocalPlus/test/sfcls/result" + Math.random(),
attOptType: 1,
infoOptType: 1,
overType: 1,
radius: 0.01,
});
workFlowServer600227.execute({
method: Zondy.Enum.FetchMethod.get,
success: function (res) {
console.log("execute: ", res);
},
});
*/
class WorkFlowServer600227 extends WorkFlowServer {
constructor(options) {
super(options)
const opt = options || {}
/**
* @description 工作流基地址,必传
* @member {String} WorkFlowServer600227.prototype.url
* */
this.url = opt.url
/**
* @description 600227
* @member {Number} WorkFlowServer600227.prototype.flowId
* @readonly
* */
this.flowId = 600227
/**
* @description 图层叠加分析
* @member {String} WorkFlowServer600227.prototype.description
* @readonly
* */
this.description = '图层叠加分析'
/**
* @description 叠加分析
* @member {String} WorkFlowServer600227.prototype.groupName
* @readonly
* */
this.groupName = '叠加分析'
/**
* @description 被叠加简单要素类的URL,必传,例如:GDBP://mapgislocal/Sample/sfcls/overLayA
* @member {String} WorkFlowServer600227.prototype.srcInfo1
* */
this.srcInfo1 = opt.srcInfo1
/**
* @description 叠加简单要素类的URL,必传,例如:GDBP://mapgislocal/Sample/sfcls/overLayB
* @member {String} WorkFlowServer600227.prototype.srcInfo2
* */
this.srcInfo2 = opt.srcInfo2
/**
* @description 被叠加简单要素类过滤条件,例如:mpArea>20000000
* @member {String} WorkFlowServer600227.prototype.src1AttFilter
* */
this.src1AttFilter = defaultValue(opt.src1AttFilter, '')
/**
* @description 叠加简单要素类过滤条件,例如:mpArea>20000000
* @member {String} WorkFlowServer600227.prototype.src2AttFilter
* */
this.src2AttFilter = defaultValue(opt.src2AttFilter, '')
/**
* @description 结果简单要素类的URL,必传,例如:GDBP://mapgislocal/Sample/sfcls/overLayDes
* @member {String} WorkFlowServer600227.prototype.desInfo
* */
this.desInfo = opt.desInfo
/**
* @description 是否进行属性操作,1:是 0:否,必传,例如:{"activeValue":"1","inactiveValue":"0"}
* @member {Number} WorkFlowServer600227.prototype.attOptType
* */
this.attOptType = opt.attOptType
/**
* @description 共有部分的图形参数操作,0:随机,1:使用第一个类的图形参数,2:使用第二个类的图形参数,必传,例如:{"0":"随机","1":"使用第一个类的图形参数","2":"使用第二个类的图形参数"}
* @member {Number} WorkFlowServer600227.prototype.infoOptType
* */
this.infoOptType = opt.infoOptType
/**
* @description 图层叠加类型,0:求并,1:求交(默认),2:求差,3:内裁,4:外裁,5:叠加,6:对称差,7:判别,必传,例如:{"0":"求并","1":"求交","2":"求差","3":"内裁","4":"外裁","5":"叠加","6":"对称差","7":"判别"}
* @member {Number} WorkFlowServer600227.prototype.overType
* */
this.overType = opt.overType
/**
* @description 容差半径,必传,例如:0.001
* @member {Number} WorkFlowServer600227.prototype.radius
* */
this.radius = opt.radius
}
/**
* @description 获取执行工作流check对象
* @private
* @return {Object}
*/
_getCheckQueryOpts() {
return {
srcInfo1: {
required: true,
type: 'String'
},
srcInfo2: {
required: true,
type: 'String'
},
src1AttFilter: {
type: 'String'
},
src2AttFilter: {
type: 'String'
},
desInfo: {
required: true,
type: 'String'
},
attOptType: {
required: true,
type: 'Number'
},
infoOptType: {
required: true,
type: 'Number'
},
overType: {
required: true,
type: 'Number'
},
radius: {
required: true,
type: 'Number'
}
}
}
}
export default WorkFlowServer600227