SuperMap iClient3D for Plugin 技术文档
倾斜摄影模型  

4     实用分析能力

4.1     三维空间分析

SuperMap iClient3D for Plugin中,倾斜摄影模型同其他三维模型一样,支持各类三维空间分析功能,包括通视分析、(动态)可视域分析、天际线分析、阴影率统计分析、剖面线分析等,有关三维空间分析内容请参考“三维空间分析”专题文档。

说明: E:\文档编写工作\00技术文档\客户端\pic-倾斜截图-plugin\通视分析.png

41 通视分析

说明: E:\文档编写工作\00技术文档\客户端\pic-倾斜截图-plugin\可视域.png

 42 可视域分析

说明: E:\文档编写工作\00技术文档\客户端\pic-倾斜截图-plugin\天际线1.png

 43 天际线分析


 

4.2     压平功能

为满足规划等行业应用需求,SuperMap iClient3D for Plugin提供了局部压平功能,支持三维面数据压平倾斜摄影模型的局部区域,模拟拆除建筑物的效果,并可置换为精细模型,实现规划方案效果对比与展示。

如下代码示范了如何压平倾斜摄影模型的局部区域。

function FlattenLayer() {

sceneControl.set_sceneAction(null);

//将场景交互操作设置为绘制三维面,DrawRegion3D通过扩展SceneAction类实现特定的交互功能

    var newAction = new SuperMap.Web.UI.Action3Ds.DrawRegion3D(sceneControl);

    sceneControl.set_sceneAction(newAction);

}

 

以下代码示范了如何扩展SceneAction。扩展类的名为 DrawRegion3D,实现了绘制三维面和局部压平倾斜模型的功能。

SuperMap.Web.UI.Action3Ds.DrawRegion3D = function (sceneControl) {

    SuperMap.Web.UI.Action3Ds.DrawRegion3D.initializeBase(this);

    this._name = "DrawRegion3D";

    this._sceneControl = sceneControl;

    this._points = new SuperMap.Web.Core.Point3Ds();

    this._geoRegion3d = new SuperMap.Web.Core.GeoRegion3D();

this._point;

//三维操作状态类型为点选

    this._type = SuperMap.Web.UI.Action3Ds.SceneActionType.POINTSELECT;

this._id1;//记录静态id

this._id2;//记录动态id

    this._count = 0;

    this._style = new SuperMap.Web.Core.Style3D();

};

SuperMap.Web.UI.Action3Ds.DrawRegion3D.prototype = {

    dispose: function () {

        this._sceneControl = null;

},

//鼠标左键按下后触发事件

onMouseDown: function (e) {

    //高度模式为绝对高度

        this._style.set_altitudeMode(2);

//设置点对象颜色

        this._style.set_markerColor(new SuperMap.Web.Core.Color(0, 255, 0, 255));

//设置填充前景色

        this._style.set_fillForeColor(new SuperMap.Web.Core.Color(255, 255, 0, 100));

        var trackingLayer = this._sceneControl.get_scene().get_trackingLayer3D();

        //按键为鼠标左键时添加三维点对象

        if (e.get_flagType() % 2 == 1) {

            var pt = new SuperMap.Pixel(e.get_clientX(), e.get_clientY());

            this._point = this._sceneControl.pixelToGlobe(pt, SuperMap.Web.Realspace.PixelToGlobeMode.TerrainAndModel);

            var geoPt = new SuperMap.Web.Core.GeoPoint3D(this._point);

            var feature = new SuperMap.Web.Core.Feature3D();

            feature.set_geometry(geoPt);

            this._points.add(this._point);

            this._count++;

        } else {

            if (this._count > 2) {

                var panAction = new SuperMap.Web.UI.Action3Ds.Pan(sceneControl);

                sceneControl.set_sceneAction(panAction);

                 //向三维面追加一个子对象

                this._geoRegion3d.addPart(this._points);

                var feature = new SuperMap.Web.Core.Feature3D();

                feature.set_geometry(this._geoRegion3d);

                feature.set_style3D(this._style);

                _index++;

                //向跟踪图层添加一个三维面对象

                trackingLayer.add(feature, "region_" + _index);

                //添加压平区域

                osgbLyr.addFlattenRegion(this._geoRegion3d, "region_" + _index);

                }

        }

    }

};

SuperMap.Web.UI.Action3Ds.DrawRegion3D.registerClass('SuperMap.Web.UI.Action3Ds.DrawRegion3D', SuperMap.Web.UI.Action3Ds.SceneAction, Sys.IDisposable);

 

倾斜摄影模型的局部压平效果如下图所示:

说明: E:\文档编写工作\00技术文档\客户端\pic-倾斜截图-plugin\压平2.png

44 点选绘制待压平区域

说明: E:\文档编写工作\00技术文档\客户端\pic-倾斜截图-plugin\压平2.png

4‑5 倾斜模型压平后效果

 


  版权所有©2005-2016 北京超图软件股份有限公司。保留所有权利。