TopAnalysis Class

几何分析服务.TopAnalysis(option)

拓扑分析类

Fx构造函数

# new TopAnalysis(option)

Zondy.Service.TopAnalysis 只应该对pnt,line,reg3个属性中的一个赋值

参数:
名称 类型 属性 默认值 描述
option Object

属性键值对

pnt Zondy.Object.GPoint <optional>
null

需要设置的点类型

line Zondy.Object.GLine <optional>
null

需要设置的线类型

reg Zondy.Object.GRegion <optional>
null

需要设置的区类型

nearDis Number <optional>
0.01

分析半径

relativeObj Zondy.Object.GRegion <optional>
null

相对对象

p_onSuccess function <optional>
null

回调函数

查看源代码 service/Igserver/MRGS/TopAnalysis.js, line 23

Example
//创建线几何对象
 var lineObj = new Zondy.Object.GLine(
 new Zondy.Object.AnyLine([new Zondy.Object.Arc
 ([
 new Zondy.Object.Point2D(114.40, 30.60),
 new Zondy.Object.Point2D(114.45, 30.20)
 ])
 ])
 );
 //创建区几何对象
 var regionObj = new Zondy.Object.GRegion([
 new Zondy.Object.AnyLine([new Zondy.Object.Arc([
 new Zondy.Object.Point2D(114.301586, 30.533613),
 new Zondy.Object.Point2D(114.301586, 30.396517),
 new Zondy.Object.Point2D(114.544453, 30.396517),
 new Zondy.Object.Point2D(114.444453, 30.533613),
 new Zondy.Object.Point2D(114.401586, 30.533613)
 ])
 ])
 ]);
 //初始化TopAnalysis类
 var topService = new Zondy.Service.TopAnalysis({
                    //IP地址
                    ip: "develop.smaryun.com",
                    //端口号
                    port: "6163"
                });
 //调用setLine方法,设置线类型
 topService.setLine(lineObj);
 //调用setRelativeObj方法,设置拓扑分析参照物
 topService.setRelativeObj(regionObj);
 //设置拓扑分析半径
 topService.nearDis = "0.05";
 topService.execute(function (res) {
                    console.log(res);
                }, function (error) {
                    console.log(error);
                });

继承关系

  • Zondy.Service.GeometryAnalysisBase