com.supermap.web.ogc.wfs
public class Arithmetic
继承 Arithmetic Inheritance Filter Inheritance Object

算术运算.

该类用于定义算述运算规则,既可直接用作 GetWFSFeature 类的过滤条件,也可用于定义表达式。实现代码如下:
Example1:
var arithmetic1:Arithmetic = new Arithmetic();
arithmetic1.type = ArithmeticType.DIV;
arithmetic1.propertyNames = ["SmArea","SmPerimeter"];
Example1 实例用于实现简单运算:SmArea / SmPerimeter。
Example2:下面代码在 Example1 实例的基础上实现:SmLength - SmArea / SmPerimeter
var arithmetic2:Arithmetic = new Arithmetic();
arithmetic2.type = ArithmeticType.SUB;
arithmetic2.propertyNames = ["SmLength"];
arithmetic2.expressions = [arithmetic1];
Example3:在 Example2 实例中 SmLength 做为被减数,SmArea / SmPerimeter 作为减数,即 expressions 表达式所代表的是操作对象;那么反过来,如何实现 SmArea / SmPerimeter - SmLength 呢?解决该问题需要将算式转换为:0 -(SmLength - SmArea / SmPerimeter) 进行处理,在 Example1、Example2 的基础上实现代码如下:
var arithmetic3:Arithmetic = new Arithmetic();
arithmetic3.type = ArithmeticType.SUB;
arithmetic3.value = 0;
arithmetic3.expressions = [arithmetic2];

另请参见

GetWFSFeature


公共属性
  属性 定义方
    expressions : Array
表达式集合(表达式分三种:字段名、值、四则运算),该集合中的对象只能是 Arithmetic 类型。
Arithmetic
    propertyNames : Array
字段集合。
Arithmetic
    type : String
算术运算类型。
Arithmetic
    value : String
值。
Arithmetic
公共方法
  方法 定义方
   
实例化 Arithmetic 对象。
Arithmetic
属性详细信息
expressions 属性
expressions:Array

表达式集合(表达式分三种:字段名、值、四则运算),该集合中的对象只能是 Arithmetic 类型。


Implementation
    public function get expressions():Array
    public function set expressions(value:Array):void
propertyNames 属性  
propertyNames:Array

字段集合。


Implementation
    public function get propertyNames():Array
    public function set propertyNames(value:Array):void
type 属性  
type:String

算术运算类型。


Implementation
    public function get type():String
    public function set type(value:String):void
value 属性  
value:String

值。


Implementation
    public function get value():String
    public function set value(value:String):void
构造函数详细信息
Arithmetic () 构造函数
public function Arithmetic()

实例化 Arithmetic 对象。