编程知识 cdmana.com

基于BIM+GIS钢结构全生命周期管理平台项目

   “BIM+GIS钢结构全生命周期管理平台”平台于2019年11月正式上线使用,平台由业务平台、交互平台、移动端三端组成。平台通过BIM技术、信息化技术、GIS技术、物联网技术、集成技术的应用,有效推进钢结构BIM全生命周期智能建造,实现“精品工程、智能丰台”的目标。

 2、功能结构

 应用了BIM技术、GIS技术、信息化管理等技术于钢结构项目管理中,包括展示平台、业务平台、移动端三部分组成应用重点如下:

  (1)实现基于BIM模型查看任意构件设计管理、深化设计、预制加工、物流运输、现场管理、交验管理构件的全生命周期信息,辅助项目管理,直观将移动端、两家业务系统采集的数据直观进行展示。

  (2)实现了GIS技术、BIM技术与智慧工地融合能够在GIS+BIM场景中随时随地的查看现场智慧工地如监控设备、环境监测、劳务数据、塔吊数据、基坑监测点数据、大体积混凝土测温数据等均与场景对应实现位置信息3维一体。

  (3)实现了智慧工厂数据到项目系统中数据的无缝衔接,平台通过接口成功获取了两件钢结构工厂供应商生产阶段数据,实现数据的无缝衔接,数据同步。

部分源码如下:


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

        #map {
            position: absolute;
            width: 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_queryByBounds"></h5></div>
<div class='panel-body content'>
<input type="button" class="btn btn-default" data-i18n="[value]resources.text_query" onclick="drawGeometry()"/>&nbsp;
<input type="button" class="btn btn-default" data-i18n="[value]resources.text_input_value_clear" onclick="clearFeatures()"/>
</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>
    var map, local, layer, vectorLayer, control, queryBounds, markerLayer, drawFeature,
        style = {
            strokeColor: "#304DBE",
            strokeWidth: 1,
            pointerEvents: "visiblePainted",
            fillColor: "#304DBE",
            fillOpacity: 0.3
        },
        host = window.isLocal ? window.server : "https://iserver.supermap.io",
        url = host + "/iserver/services/map-world/rest/maps/World";
    init();

    function init() {
        map = new SuperMap.Map("map", {
            controls: [
                new SuperMap.Control.ScaleLine(),
                new SuperMap.Control.Zoom(),
                new SuperMap.Control.Navigation({
                    dragPanOptions: {
                        enableKinetic: true
                    }
                })]
        });
        map.addControl(new SuperMap.Control.LayerSwitcher(), new SuperMap.Pixel(42, 80));
        layer = new SuperMap.Layer.TiledDynamicRESTLayer("World", url, {
            transparent: true,
            cacheEnabled: true
        }, {maxResolution: "auto"});
        layer.events.on({"layerInitialized": addLayer});
        vectorLayer = new SuperMap.Layer.Vector("Vector Layer");//新建一个vectorLayer的矢量图层
        markerLayer = new SuperMap.Layer.Markers("Markers");//创建一个有标签的图层

        drawFeature = new SuperMap.Control.DrawFeature(vectorLayer, SuperMap.Handler.Box, {"handlerOptions": {"cursorCSS": "crosshair"}});
        drawFeature.events.on({"featureadded": drawCompleted});
        map.addControl(drawFeature);
    }

    function addLayer() {
        map.addLayers([layer, vectorLayer, markerLayer]);
        map.setCenter(new SuperMap.LonLat(0, 0), 0);
    }

    function drawGeometry() {
        //先清除上次的显示结果
        clearFeatures();

        drawFeature.activate();
    }

    function drawCompleted(obj) {
        drawFeature.deactivate();
        var feature = obj.feature;
        feature.style = style;
        vectorLayer.addFeatures(feature);
        var queryBounds = feature.geometry.bounds;

        var queryParam, queryByBoundsParams, queryService;
        queryParam = new SuperMap.REST.FilterParameter({name: "Capitals@World.1"});//FilterParameter设置查询条件,name是必设的参数,(图层名称格式:数据集名称@数据源别名)
        queryByBoundsParams = new SuperMap.REST.QueryByBoundsParameters({
            queryParams: [queryParam],
            bounds: queryBounds
        });//queryParams查询过滤条件参数数组。bounds查询范围
        queryService = new SuperMap.REST.QueryByBoundsService(url, {
            eventListeners: {
                "processCompleted": processCompleted,
                "processFailed": processFailed
            }
        });
        queryService.processAsync(queryByBoundsParams);//向服务端传递参数,然后服务端返回对象
    }

    function processCompleted(queryEventArgs) {
        var i, j, result = queryEventArgs.result, marker;//queryEventArgs服务端返回的对象
        if (result && result.recordsets) {
            for (i = 0, recordsets = result.recordsets, len = recordsets.length; i < len; i++) {
                if (recordsets[i].features) {
                    for (j = 0; j < recordsets[i].features.length; j++) {
                        var f = recordsets[i].features[j];
                        var point = f.geometry,
                            size = new SuperMap.Size(44, 33),
                            offset = new SuperMap.Pixel(-(size.w / 2), -size.h),
                            icon = new SuperMap.Icon("./images/marker.png", size, offset);
                        marker = new SuperMap.Marker(new SuperMap.LonLat(point.x, point.y), icon);
                        marker.sm_capital = f.attributes.CAPITAL;
                        marker.events.on({
                            "click": openInfoWin,
                            "touchstart": openInfoWin,        //假如要在移动端的浏览器也实现点击弹框,则在注册touch类事件
                            "scope": marker
                        });
                        markerLayer.addMarker(marker);
                    }
                }
            }
        }
    }

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

    function clearFeatures() {
        vectorLayer.removeAllFeatures();
        markerLayer.clearMarkers();
        closeInfoWin();
    }

    var infowin = null;

    function openInfoWin() {
        closeInfoWin();
        var marker = this;
        var lonlat = marker.getLonLat();
        var contentHTML = "<div style='font-size:.8em; opacity: 0.8; overflow-y:hidden;'>";
        contentHTML += "<div>" + marker.sm_capital + "</div></div>";
        var size = new SuperMap.Size(0, 33);
        var offset = new SuperMap.Pixel(0, -size.h);
        var icon = new SuperMap.Icon("./images/marker.png", size, offset);
        var popup = new SuperMap.Popup.FramedCloud("popwin",
            new SuperMap.LonLat(lonlat.lon, lonlat.lat),
            null,
            contentHTML,
            icon,
            true);

        infowin = popup;
        map.addPopup(popup);
    }

    function closeInfoWin() {
        if (infowin) {
            try {
                infowin.hide();
                infowin.destroy();
            }
            catch (e) {
            }
        }
    }
</script>
</body>
</html>

 

版权声明
本文为[省涯]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/3528190/blog/4839671

Scroll to Top