FeatureBuffBySingleRing Class

分析服务.FeatureBuffBySingleRing(option)

要素缓冲分析(单圈)

Fx构造函数

# new FeatureBuffBySingleRing(option)

Zondy.Service.FeatureBuffBySingleRing

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

属性键值对

leftRad Number <optional>
0.001

缓冲分析左半径

rightRad Number <optional>
0.001

缓冲分析右半径

查看源代码 service/Igserver/MRFWS/FeatureBuffBySingleRing.js, line 8

Example
//初始化Zondy.Object.FeatureGeometry对象
 var regGeo = new Zondy.Object.FeatureGeometry();
 //设置区要素的空间几何信息
 var gReg = new Zondy.Object.GRegion([
 new Zondy.Object.AnyLine([new Zondy.Object.Arc([
 new Zondy.Object.Point2D(0.46, 30.1),
 new Zondy.Object.Point2D(11.48, 6.22),
 new Zondy.Object.Point2D(36.73, 7.6),
 new Zondy.Object.Point2D(58.77, 25.51),
 new Zondy.Object.Point2D(41.33, 49.39) ]) ])]);
 regGeo.setRegGeom([gReg]);
 //设置属性结构
 var regAttStr = new Zondy.Object.CAttStruct({
                    FldName: ["ID", "面积", "周长", "LayerID"],
                    FldNumber: 4,
                    FldType: ["FldLong", "FldDouble", "FldDouble", "FldLong"]
                });
 //实例化CAttDataRow类
 var values = [0, 62.566714, 50.803211, 0];
 var valuesRow = new Zondy.Object.CAttDataRow(values, 1);
 //实例化FeatureBuffBySingleRing类,设置要素缓冲分析必要参数,输出分析结果到缓冲分析结果图层
 var featureBufBySR = new Zondy.Service.FeatureBuffBySingleRing({
                    //IGServer所在ip地址
                    ip: "develop.smaryun.com",
                    //IGServer请求端口号
                    port: "6163",
                    //设置要素缓冲分析左半径
                    leftRad: 5,
                    //设置要素缓冲分析右半径
                    rightRad: 5
                });
 //设置缓冲分析参数
 //设置几何信息
 featureBufBySR.sfGeometryXML = JSON.stringify([regGeo]);
 //设置属性结构
 featureBufBySR.attStrctXML = JSON.stringify(regAttStr);
 //设置属性值
 featureBufBySR.attRowsXML = JSON.stringify([valuesRow]);
 //设置追踪半径
 featureBufBySR.traceRadius = 0.0001;
 //设置缓冲结果的名称以及存放地址
 var resultname = "singleBuffAnalysisResultLayer" + getCurentTime();
 //缓存结果图层的基地址
 var resultBaseUrl = "gdbp://MapGisLocal/OpenLayerVecterMap/sfcls/";
 featureBufBySR.resultName = resultBaseUrl + resultname;
 featureBufBySR.execute(function (res) {
                    console.log(res);
                }, "get",function (error) {
                    console.log(error);
                });

继承关系

  • Zondy.Service.FeatureBuffBase