基于三维GIS技术的数字化预案编制管理平台研究

         数字化预案编制管理平台是为规范支队灭火救援预案建设工作,夯实支队信息化作战基础而建设的。系统结合支队信息化技术现状,基于三维GIS技术、物联网技术,新软件理念进行研发,满足了支队及下属大队日常演练与作战指挥需求。系统能够全面提升支队火灾智能化防控水平、实现火灾救援指挥更加精准、智能,提高消防数据应用分析能力。

  

  系统截图1

  下图中,根据颜色级别表示危险度,提醒消防工作者注意自身安全。

  

  室内预案中,可查看室内消防设施的分布情况。

  

  室内消防分布设施图

  

  室内逃生路线图

  此外,可查看预案中派出的消防员、消防员信息以及派出的消防车信息。

  

  该系统本着实用、操作便捷、智能的原则为消防工作者提供消防灭火辅助工具。后期,系统将接入物联网,系统能够实时传输灾情信息。预案上实现了数据的共享性、决策的智能性、方案的科学性;该系统还可对真实火灾的救援指挥、消防设备部署的合理性进行模拟、研究,支持对救援过程的还原。是消防工作平时演练、战时应急的重要辅助工具。


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title data-i18n="resources.title_animatorTrain"></title>
<style type="text/css">
        body {
            margin: 0;
            overflow: hidden;
            background: #fff;
             100%;
            height: 100%
        }

        #map {
            position: absolute;
             100%;
            height: 100%;
        }

        #toolbar {
            position: absolute;
            top: 50px;
            right: 10px;
            text-align: center;
            z-index: 100;
            border-radius: 4px;
        }
    </style>
</head>
<body>
<div id="toolbar" class="panel panel-primary">
<div class='panel-heading'>
<h5 class='panel-title text-center' data-i18n="resources.title_animatorTrain"></h5></div>
<div class='panel-body content'>
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_play" onclick="startAnimator()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_pause" onclick="pauseAnimator()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_stop" onclick="stopAnimator()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_acceleration" onclick="increaseSpeed()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_deceleration" onclick="decreaseSpeed()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_switchDirection" onclick="setReverseAnimator()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_switchTwinkle" onclick="setGlint()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_switchTails" onclick="setTailr()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_showOrHideTrain" onclick="show()"/>
</div>
</div>
<div id="map"></div>
<script type="text/javascript" include="bootstrap,widgets.alert" src="../js/include-web.js"></script>
<script type="text/javascript" exclude="iclient-classic" src="../../dist/classic/include-classic.js"></script>
<script type="text" id="cartocssStr">
          /*此处定义不同的颜色变量,在后面可以重复用这些颜色值*/

        @waterColor:rgb(34,56,78);
        @roadColora:rgb(109,102,91);
        @roadColorb:rgb(109,102,91);
        @railwayColora:rgb(80,80,80);
        @railwayColorb:rgb(137,137,137);
        @vegetationColor:rgb(27,27,27);
        @continentColor:rgb(68,68,68);
        @provinceLineColor:rgb(180,0,0);


        #China_Railway_L___China::a{

        /*每一段的长度为15px,间隔也是15px*/
        line-color:@railwayColora;
        line-2.5;
        }
        #China_Railway_L___China::b{

        /*每一段的长度为15px,间隔也是15px*/
        line-dasharray:18,18;
        line-color:@railwayColorb;
        line-2;
        }
        /*底下的地图背景图层*/

        #World_Division_pl___China{
        polygon-fill:@waterColor;
        }

        /*中国除外的其他国家的图层*/

        #World_Continent_pl___China{
        polygon-fill:@continentColor;
        line-1;
        line-color:rgb(180,180,180);
        }

        #World_Division_pl___China{
        polygon-fill:@waterColor;
        }


</script>
<script>
    var map, layer, animatorVector, lineVector1, lineVector2,
        host = window.isLocal ? window.server : "https://iserver.supermap.io",
        url = host + "/iserver/services/map-china400/rest/maps/China",
        url2 = host + "/iserver/services/data-DynamicData/rest/data";
    var style1 =
        {
            fillColor: "#ffff00",
            fillOpacity: 0.8,
            strokeOpacity: 0,
            pointRadius: 5
        };
    var style2 =
        {
            fillColor: "#c165f6",
            fillOpacity: 1,
            strokeOpacity: 0,
            pointRadius: 5
        };

    init();

    function init() {
        if (!document.createElement('canvas').getContext) {
            widgets.alert.showAlert(resources.msg_supportCanvas, false);
            return;
        }
        //初始化地图
        map = new SuperMap.Map("map", {
            controls: [
                new SuperMap.Control.ScaleLine(),
                new SuperMap.Control.Zoom(),
                new SuperMap.Control.Navigation({
                    dragPanOptions: {
                        enableKinetic: true
                    }
                })],
            projection: "EPSG:3857"
        });
        //初始化图层
        var cartoCssStr = document.getElementById("cartocssStr");
        var cartoCss = cartoCssStr.text;
        var layerNames = ["World_Division_pl@China", "World_Continent_pl@China",
            "China_Province_pl@China", "China_Island@China",
            "China_Capital_Pt@China", "China_Boundary_A"].join(",");
        layerNames = "[" + layerNames + "]";
        layer = new SuperMap.Layer.TiledVectorLayer("China", url, {
            cacheEnabled: true,
            layerNames: layerNames
        }, {useLocalStorage: true, cartoCss: cartoCss});
        layer.events.on({"layerInitialized": addLayer});


    }

    function addLayer() {
        //初始化动画矢量图层
        animatorVector = new SuperMap.Layer.AnimatorVector("Train", {rendererType: "TadpolePoint"}, {
            //设置速度为每帧播放0.02小时的数据
            speed: 0.02,
            //开始时间为0晨
            startTime: 0,
            //结束时间设置为最后运行结束的火车结束时间
            endTime: 39
        });
        lineVector1 = new SuperMap.Layer.Vector("Line1");
        lineVector2 = new SuperMap.Layer.Vector("Line2");
        map.addLayers([layer, lineVector1, lineVector2, animatorVector]);

        map.setCenter(new SuperMap.LonLat(12009634.286396, 4258716.5813769), 4);
        //增加数据
        addTrain();

    }

    //添加火车数据
    function addTrain() {
        var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;

        getFeatureParam = new SuperMap.REST.FilterParameter({
            name: "Train@DynamicData",
            attributeFilter: "SmID < 2240"
        });
        getFeatureBySQLParams = new SuperMap.REST.GetFeaturesBySQLParameters({
            queryParameter: getFeatureParam,
            datasetNames: ["DynamicData:Train"]
        });
        //返回个数
        getFeatureBySQLParams.toIndex = 2240;
        getFeatureBySQLService = new SuperMap.REST.GetFeaturesBySQLService(url2, {
            eventListeners: {"processCompleted": processCompleted, "processFailed": processFailed}
        });

        getFeatureBySQLService.processAsync(getFeatureBySQLParams);

    }

    function processCompleted(getFeaturesEventArgs) {
        var features, result = getFeaturesEventArgs.result;
        if (result && result.features) {
            features = result.features;
        }
        console.log(features);

        //使用数据
        var pointFeatures = [];
        var lines1 = [];
        var lines2 = [];
        var points = [];
        var id = 0;
        for (var i = 0, len = features.length; i < len; i++) {
            var point = features[i].geometry;
            var po = features[i].geometry;
            if (id == features[i].data.FEATUREID) {
                points.push(po);
            }
            else {
                id = features[i].data.FEATUREID;
                lines1.push(
                    new SuperMap.Feature.Vector(
                        new SuperMap.Geometry.LineString(points),
                        {},
                        {
                            stroke: true,
                            strokeColor: "#dddddd",
                            strokeWidth: 3,
                            strokeDashstyle: "solid"

                        }
                    )
                );
                lines2.push(
                    new SuperMap.Feature.Vector(
                        new SuperMap.Geometry.LineString(points),
                        {},
                        {
                            stroke: true,
                            strokeColor: "#41403f",
                            strokeWidth: 2,
                            strokeDashstyle: "dash"
                        }
                    )
                );

                points = [];
            }

            if (features[i].data.FEATUREID < 151) {
                var pointFeature = new SuperMap.Feature.Vector(point, {
                    FEATUREID: features[i].data.FEATUREID,
                    TIME: features[i].data.TIME
                }, style1);
            }
            else {
                var pointFeature = new SuperMap.Feature.Vector(point, {
                    FEATUREID: features[i].data.FEATUREID,
                    TIME: features[i].data.TIME
                }, style2);
            }

            pointFeatures.push(pointFeature);
        }
        animatorVector.addFeatures(pointFeatures);
        lineVector1.addFeatures(lines1);
        lineVector2.addFeatures(lines2);

    }

    function processFailed(e) {
        widgets.alert.showAlert(e.error.errorMsg, false);
    }

    //开始播放动画
    function startAnimator() {
        animatorVector.animator.start();
    }

    //暂停播放动画
    function pauseAnimator() {
        animatorVector.animator.pause();
    }

    //停止播放动画
    function stopAnimator() {
        animatorVector.animator.stop();
    }

    //减速播放
    function decreaseSpeed() {
        animatorVector.animator.setSpeed(animatorVector.animator.getSpeed() * 0.7);
    }

    //正反向播放切换
    function setReverseAnimator() {
        animatorVector.animator.setReverse(!animatorVector.animator.getReverse());
    }

    //加速播放
    function increaseSpeed() {
        animatorVector.animator.setSpeed(animatorVector.animator.getSpeed() * 1.5);
    }

    //开关闪烁
    function setGlint() {
        animatorVector.renderer.glint = !animatorVector.renderer.glint;
    }

    //开关尾巴
    function setTailr() {
        animatorVector.renderer.tail = !animatorVector.renderer.tail;
    }

    function show() {
        lineVector1.setVisibility(!lineVector1.getVisibility());
        lineVector2.setVisibility(!lineVector2.getVisibility());
    }

</script>
</body>
</html>


技术交流 省涯 QQ:2252224326 2252224326@qq.com 版权所有 http://blog.sina.com.cn/u/6029512413
原文地址:https://www.cnblogs.com/shengya/p/14961809.html