| | |
| | | |
| | | FrmTool tool; |
| | | |
| | | public SGWorld74 SG = null; |
| | | string mainUrl; |
| | | |
| | | public static string StartupPath |
| | | { |
| | | get |
| | | { |
| | | return System.Windows.Forms.Application.StartupPath; |
| | | } |
| | | } |
| | | public SGWorld74 SG = null; |
| | | |
| | | public FrmWin() |
| | | { |
| | |
| | | try |
| | | { |
| | | LogOut.Info("å¼å§è¿è¡.."); |
| | | mainUrl = Application.StartupPath.Replace("\\", "/"); |
| | | |
| | | string fly = Path.Combine(StartupPath, "Resources\\sample.fly"); |
| | | string fly = Path.Combine(Application.StartupPath, "Resources\\sample.fly"); |
| | | if (!File.Exists(fly)) |
| | | { |
| | | LogOut.Error("Flyæä»¶ä¸åå¨ï¼" + fly); |
| | |
| | | string isTest = ConfigurationManager.AppSettings["isTest"]; |
| | | if ("1".Equals(isTest)) |
| | | { |
| | | this.FormBorderStyle = FormBorderStyle.FixedSingle; |
| | | tree.FormBorderStyle = FormBorderStyle.FixedSingle; |
| | | tool = new FrmTool(this); |
| | | tool.Show(); |
| | | } |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | public void ShowHtmlByid(int id, int arg) |
| | | { |
| | | switch (id) |
| | | { |
| | | case 1034: |
| | | this.ShowHtml("è·ç¦»æµé", mainUrl + "/Resources/DistanceMeasurement/distanceMeasurement.html", 20, 20, 400, 245); |
| | | break; |
| | | case 1037: |
| | | this.ShowHtml("é¢ç§¯æµé", mainUrl + "/Resources/AreaMeasurement/AreaMeasurement.html", 20, 20, 400, 245); |
| | | break; |
| | | case 1149: |
| | | if (28 == arg) |
| | | this.ShowHtml("åé¢åæ", mainUrl + "/Resources/TerrainProfile/TerrainProfile.html", 20, 20, 400, 290); |
| | | else |
| | | this.ShowHtml("åååæ", mainUrl + "/Resources/CrossSection/CrossSection.html", 20, 20, 400, 225); |
| | | break; |
| | | case 1093: |
| | | this.ShowHtml("å¡åº¦åæ", mainUrl + "/Resources/SlopeMapQuery/SlopeMapQuery.html", 20, 20, 350, 365); |
| | | break; |
| | | case 1045: |
| | | this.ShowHtml("ä½ç§¯åæ", mainUrl + "/Resources/Volume/Volume.html", 20, 20, 350, 225); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public void ShowHtml(string tile, string url, int left, int top, int width, int height) |
| | | { |
| | | if (SG.Window.GetPopupByCaption(tile) != null) |
| | | { |
| | | SG.Window.RemovePopupByCaption(tile); |
| | | } |
| | | |
| | | var popup = SG.Creator.CreatePopupMessage(tile, url, left, top, width, height); |
| | | popup.AllowResize = true; |
| | | popup.ShowCaption = true; |
| | | popup.AllowDrag = true; |
| | | popup.Width = width; |
| | | popup.Height = height; |
| | | |
| | | SG.Window.ShowPopup(popup); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> |
| | | <tr> |
| | | <td> |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="0"></table> |
| | | </td> |
| | | <tr> |
| | | <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> |
| | | <img src="./img/delete.png" /></button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> |
| | | <img src="./img/delete_last_point.png" /></button> |
| | | <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"> |
| | | <img src="./img/snap.png" /><br /> |
| | | </button> |
| | | <button id="horizontalSurface" class="MenuButton2" style="border: none;" onclick="OnHorizontalSurface()"> |
| | | <img src="./img/horizontal.png" /><br /> |
| | | </button> |
| | | <button id="3dPlane" class="MenuButton2" style="border: none;" onclick="On3DPlane()"> |
| | | <img src="./img/3d_palne_area.png" /><br /> |
| | | </button> |
| | | <button id="terrainSurface" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none;" onclick="OnTerrainSurface()"> |
| | | <img src="./img/surface.png" /><br /> |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> |
| | | <tr id="createTRId" style="display: none;"> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top;">Text6</span> |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="textarea-container"> |
| | | <div class="textarea-size s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <!--<tr id="sampleIntervalTR"> |
| | | <td align="left"> |
| | | <span class="i18n s8w">Text5</span> |
| | | <input type="text" id="sampleInterval" style="width:25px; height:13px; background-color:#000000; color:#FFFFFF; padding:1px; margin-left: 2px;margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> |
| | | <span class="i18n s8w">Text18</span> |
| | | </td> |
| | | </tr>--> |
| | | <tr id="sampleIntervalTR"> |
| | | <td align="left"> |
| | | <span class="i18n s8w">Text5</span> |
| | | <input type="text" id="sampleInterval" style="width: 25px; height: 13px; background-color: #000000; color: #FFFFFF; padding: 1px; margin-left: 2px; margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> |
| | | <span class="i18n s8w">Text18</span> |
| | | </td> |
| | | </tr> |
| | | <tr id="surfaceResultTR"> |
| | | <td class="textarea-container_surface"> |
| | | <div class="textarea-size_surface s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <tr id="unitTRId" style="display: none;"> |
| | | <!--<td align="right" >--> |
| | | <td> |
| | | <u><a class="btn btn-primary" href="#" role="button" id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n s8w" style="padding-right: 5px;">Text17</span></a></u> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon71.js"></script> |
| | | <script language="JavaScript"> |
| | | var DISABLE = "gray"; |
| | | var gGeometry = null; |
| | | var g_bCalculateTerrainArea; |
| | | var _3D_PLANE_NAME = "plane"; |
| | | var _HORIZONTAL_NAME = "horizontal"; |
| | | |
| | | function Init() { |
| | | document.getElementById("changeMeasurementUnits").value = SGLang.i18n("Text17"); |
| | | document.getElementById("sampleInterval").value = 5; |
| | | |
| | | var isPM = GetParamValue("pm", "0"); // when opening this tool in PM we want to hide several options |
| | | if (isPM == "1") { |
| | | $("#unitTRId").hide(); |
| | | $("#createTRId").hide(); |
| | | $("#terrainSurface").hide(); |
| | | $("#sampleIntervalTR").hide(); |
| | | $("#surfaceResultTR").hide(); |
| | | } |
| | | |
| | | $("#deleteMeasure").attr('title', SGLang.i18n("Text19")); |
| | | $("#deleteLastPoint").attr('title', SGLang.i18n("Text20")); |
| | | $("#snapping").attr('title', SGLang.i18n("Text21")); |
| | | $("#horizontalSurface").attr('title', SGLang.i18n("Text22")); |
| | | $("#3dPlane").attr('title', SGLang.i18n("Text23")); |
| | | $("#terrainSurface").attr('title', SGLang.i18n("Text24")); |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = SGLang.i18n("Text26"); |
| | | |
| | | SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | |
| | | var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | CreateMeasurementObject(); |
| | | |
| | | Reset(1, 0); |
| | | if (SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) |
| | | document.getElementById("3dPlane").click(); |
| | | else |
| | | document.getElementById("horizontalSurface").click(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | ResetButtons(); |
| | | SGWorld.Window.SetInputMode(0); |
| | | gGeometry = null; |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnSampleInterval(evt) { |
| | | var theEvent = evt || window.event; |
| | | |
| | | // Handle paste |
| | | if (theEvent.type === 'paste') { |
| | | key = event.clipboardData.getData('text/plain'); |
| | | } |
| | | else { |
| | | // Handle key press |
| | | var key = theEvent.keyCode || theEvent.which; |
| | | key = String.fromCharCode(key); |
| | | } |
| | | |
| | | var regex = /[0-9]|\./; |
| | | if (!regex.test(key) || document.getElementById("sampleInterval").style.color == DISABLE) { |
| | | theEvent.returnValue = false; |
| | | if (theEvent.preventDefault) |
| | | theEvent.preventDefault(); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnDeleteMeasure() { |
| | | var is3dPlane = $("#3dPlane").hasClass("MenuButtonHighlight"); |
| | | var isHorizontalSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight"); |
| | | |
| | | Reset(0, 0); |
| | | |
| | | if (is3dPlane) { |
| | | document.getElementById("3dPlane").click(); |
| | | } |
| | | else |
| | | if (isHorizontalSurface) { |
| | | document.getElementById("horizontalSurface").click(); |
| | | } |
| | | |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnUnload() { |
| | | var measurementMode = SGWorld.GetParam(9916); |
| | | if (measurementMode == 33351/*ID_MEASURE_TERRAIN_AREA*/ || measurementMode == 33350/*ID_MEASURE_AREA*/) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnInputModeChanged(mode) { |
| | | if (mode == 0) { |
| | | ResetButtons(); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnMeasurementResult(rs, SounrceID) { |
| | | rs = rs.replace("N/A", "ä¸éç¨") |
| | | .replace("Surface Area:", "表é¢ç§¯ï¼") |
| | | .replace("Area:", "é¢ç§¯ï¼") |
| | | .replace("Square Meter", "å¹³æ¹ç±³") |
| | | .replace("Square km", "å¹³æ¹åç±³") |
| | | .replace("Perimeter: ", "å¨é¿ï¼") |
| | | .replace(/Km/g, " åç±³") |
| | | .replace(/m/g, " ç±³"); |
| | | |
| | | if (!g_bCalculateTerrainArea) { |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = rs; |
| | | |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = SGLang.i18n("Text26"); |
| | | } |
| | | else { |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = rs; |
| | | } |
| | | |
| | | EnableDisableButtons(); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnChangeMeasurementUnits() { |
| | | SGWorld.Command.Execute(1011, 3); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function CreateMeasurementObject() { |
| | | var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; |
| | | SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function EnableDisableButtons() { |
| | | var bEnableTerrainSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight") && gGeometry != null; |
| | | if (!bEnableTerrainSurface) |
| | | document.getElementById("sampleInterval").style.color = DISABLE; |
| | | else |
| | | document.getElementById("sampleInterval").style.color = "#FFFFFF"; |
| | | |
| | | document.getElementById("terrainSurface").disabled = !bEnableTerrainSurface; |
| | | |
| | | if (bEnableTerrainSurface) |
| | | document.getElementById("terrainSurface").style.opacity = 1; |
| | | else |
| | | document.getElementById("terrainSurface").style.opacity = 0.3; |
| | | |
| | | var numPoints = SGWorld.GetParam(9915); |
| | | if (numPoints < 3) { |
| | | gGeometry = null; |
| | | } |
| | | |
| | | if (numPoints > 0) { |
| | | document.getElementById("deleteMeasure").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteMeasure").style.opacity = 0.3; |
| | | } |
| | | |
| | | if (numPoints > 2 && gGeometry == null) { |
| | | document.getElementById("deleteLastPoint").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteLastPoint").style.opacity = 0.3; |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function ResetButtons() { |
| | | $("#horizontalSurface").removeClass("MenuButtonHighlight"); |
| | | $("#terrainSurface").removeClass("MenuButtonHighlight"); |
| | | $("#3dPlane").removeClass("MenuButtonHighlight"); |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function SetSnapping() { |
| | | if ($("#snapping").hasClass("MenuButtonHighlight")) |
| | | SGWorld.SetParam(9912, 1); |
| | | else |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnSnapping() { |
| | | //$("#snapping").removeClass("MenuButtonHighlight"); |
| | | |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | $("#snapping").removeClass("MenuButtonHighlight"); |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | else { |
| | | SGWorld.SetParam(9912, 1); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function On3DPlane() { |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | Reset(0, 0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0, 0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | //SGWorld.Command.Execute(2358, 0);//__TEC_MEASURE_AREA |
| | | SGWorld.Command.Execute(1037, 0); |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | SetSnapping(); |
| | | |
| | | SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _3D_PLANE_NAME); |
| | | |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnTerrainSurface() { |
| | | //Reset(0,0); |
| | | g_bCalculateTerrainArea = true; |
| | | if (document.getElementById("sampleInterval").value > 0.0) |
| | | SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, document.getElementById("sampleInterval").value); // 2359 |
| | | g_bCalculateTerrainArea = false; |
| | | |
| | | SetSnapping(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnHorizontalSurface() { |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | Reset(0, 0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0, 0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, 0); // 2359 |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | SetSnapping(); |
| | | |
| | | SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _HORIZONTAL_NAME); |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | function OnDeleteLastPoint() { |
| | | SGWorld.SetParam(9914, 0); |
| | | EnableDisableButtons(); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | <!--Sig:00000040au6WjiNW.uqyaxQdPdCltSVnmGMYOWXEgBB9yrqQ.Kyq91MhWbUupggV5yi1GRel4nJZMYQa3tOFAX56jNS8XmJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang, { |
| | | ToolTitle: "æµéå·¥å
·", |
| | | ToolName: "å°å½¢åé¢", |
| | | help: "帮å©", |
| | | Text0: "åæ¶", |
| | | Text1: "å 餿åèç¹", |
| | | Text2: "æ°´å¹³é¢", |
| | | Text3: "å°è¡¨", |
| | | Text4: "å°å½¢å°è¡¨", |
| | | Text5: "éæ ·é´éï¼", |
| | | Text6: "å建æµé对象", |
| | | Text7: "ææ", |
| | | Text19: "", |
| | | Text17: "åä½", |
| | | Text18: " ç±³", |
| | | Text19: "å 餿µéå¼ã", |
| | | Text20: "å 餿åä¸ä¸ªæµéç¹ã", |
| | | Text21: "å°æµéç¹ææå°è¾¹ã对象åé¡¶ç¹ã", |
| | | Text22: "计ç®å¨å°å½¢ä¸çæ°´å¹³æå½±é¢ç§¯ã", |
| | | Text23: "计ç®ä»»æå¹³é¢ä¸çé¢ç§¯ã该å¤è¾¹å½¢çæ¹åç±éå®çåä¸ä¸ªç¹å³å®ã", |
| | | Text24: "èèå°å½¢èµ·ä¼ï¼è®¡ç®éå®åºåç表é¢ç§¯ã", |
| | | Text25: "é¢ç§¯ï¼\nå¨é¿ï¼", |
| | | Text26: "表é¢ç§¯ï¼", |
| | | Text999: "" |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> |
| | | <tr> |
| | | <td> |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="0"></table> |
| | | </td> |
| | | <tr> |
| | | <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> |
| | | <img src="./img/delete.png" /></button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> |
| | | <img src="./img/delete_last_point.png" /></button> |
| | | <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"> |
| | | <img src="./img/snap.png" /><br /> |
| | | </button> |
| | | <button id="horizontalSurface" class="MenuButton2" style="border: none;" onclick="OnHorizontalSurface()"> |
| | | <img src="./img/horizontal.png" /><br /> |
| | | </button> |
| | | <button id="3dPlane" class="MenuButton2" style="border: none;" onclick="On3DPlane()"> |
| | | <img src="./img/3d_palne_area.png" /><br /> |
| | | </button> |
| | | <button id="terrainSurface" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none;" onclick="OnTerrainSurface()"> |
| | | <img src="./img/surface.png" /><br /> |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> |
| | | <tr id="createTRId" style="display: none;"> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top;">Text6</span> |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="textarea-container"> |
| | | <div class="textarea-size s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <!--<tr id="sampleIntervalTR"> |
| | | <td align="left"> |
| | | <span class="i18n s8w">Text5</span> |
| | | <input type="text" id="sampleInterval" style="width:25px; height:13px; background-color:#000000; color:#FFFFFF; padding:1px; margin-left: 2px;margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> |
| | | <span class="i18n s8w">Text18</span> |
| | | </td> |
| | | </tr>--> |
| | | <tr id="sampleIntervalTR"> |
| | | <td align="left"> |
| | | <span class="i18n s8w">Text5</span> |
| | | <input type="text" id="sampleInterval" style="width: 25px; height: 13px; background-color: #000000; color: #FFFFFF; padding: 1px; margin-left: 2px; margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> |
| | | <span class="i18n s8w">Text18</span> |
| | | </td> |
| | | </tr> |
| | | <tr id="surfaceResultTR"> |
| | | <td class="textarea-container_surface"> |
| | | <div class="textarea-size_surface s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <tr id="unitTRId" style="display: none;"> |
| | | <!--<td align="right" >--> |
| | | <td> |
| | | <u><a class="btn btn-primary" href="#" role="button" id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n s8w" style="padding-right: 5px;">Text17</span></a></u> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon71.js"></script> |
| | | <script language="JavaScript"> |
| | | var DISABLE = "gray"; |
| | | var gGeometry = null; |
| | | var g_bCalculateTerrainArea; |
| | | var _3D_PLANE_NAME = "plane"; |
| | | var _HORIZONTAL_NAME = "horizontal"; |
| | | |
| | | function Init() { |
| | | document.getElementById("changeMeasurementUnits").value = SGLang.i18n("Text17"); |
| | | document.getElementById("sampleInterval").value = 5; |
| | | |
| | | var isPM = GetParamValue("pm", "0"); // when opening this tool in PM we want to hide several options |
| | | if (isPM == "1") { |
| | | $("#unitTRId").hide(); |
| | | $("#createTRId").hide(); |
| | | $("#terrainSurface").hide(); |
| | | $("#sampleIntervalTR").hide(); |
| | | $("#surfaceResultTR").hide(); |
| | | } |
| | | |
| | | $("#deleteMeasure").attr('title', SGLang.i18n("Text19")); |
| | | $("#deleteLastPoint").attr('title', SGLang.i18n("Text20")); |
| | | $("#snapping").attr('title', SGLang.i18n("Text21")); |
| | | $("#horizontalSurface").attr('title', SGLang.i18n("Text22")); |
| | | $("#3dPlane").attr('title', SGLang.i18n("Text23")); |
| | | $("#terrainSurface").attr('title', SGLang.i18n("Text24")); |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = SGLang.i18n("Text26"); |
| | | |
| | | SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | |
| | | //var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | //document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | document.getElementById("createMeasurementObject").checked = true; |
| | | CreateMeasurementObject(); |
| | | |
| | | Reset(1, 0); |
| | | if (SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) |
| | | document.getElementById("3dPlane").click(); |
| | | else |
| | | document.getElementById("horizontalSurface").click(); |
| | | } |
| | | |
| | | function setText(idx, val) { |
| | | var txtId = SGWorld.ProjectTree.FindItem("å®ä½ç¹\\Text"); |
| | | if (txtId) { |
| | | var obj = SGWorld.ProjectTree.GetObject(txtId); |
| | | var strs = obj.Text.split(","); // 0,0,0,0,0,0,0 |
| | | strs[idx] = val; |
| | | obj.Text = strs.join(","); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | ResetButtons(); |
| | | SGWorld.Window.SetInputMode(0); |
| | | gGeometry = null; |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnSampleInterval(evt) { |
| | | var theEvent = evt || window.event; |
| | | |
| | | // Handle paste |
| | | if (theEvent.type === 'paste') { |
| | | key = event.clipboardData.getData('text/plain'); |
| | | } |
| | | else { |
| | | // Handle key press |
| | | var key = theEvent.keyCode || theEvent.which; |
| | | key = String.fromCharCode(key); |
| | | } |
| | | |
| | | var regex = /[0-9]|\./; |
| | | if (!regex.test(key) || document.getElementById("sampleInterval").style.color == DISABLE) { |
| | | theEvent.returnValue = false; |
| | | if (theEvent.preventDefault) |
| | | theEvent.preventDefault(); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnDeleteMeasure() { |
| | | var is3dPlane = $("#3dPlane").hasClass("MenuButtonHighlight"); |
| | | var isHorizontalSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight"); |
| | | |
| | | Reset(0, 0); |
| | | |
| | | if (is3dPlane) { |
| | | document.getElementById("3dPlane").click(); |
| | | } |
| | | else |
| | | if (isHorizontalSurface) { |
| | | document.getElementById("horizontalSurface").click(); |
| | | } |
| | | |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnUnload() { |
| | | var measurementMode = SGWorld.GetParam(9916); |
| | | if (measurementMode == 33351/*ID_MEASURE_TERRAIN_AREA*/ || measurementMode == 33350/*ID_MEASURE_AREA*/) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnInputModeChanged(mode) { |
| | | if (mode == 0) { |
| | | ResetButtons(); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnMeasurementResult(rs, SounrceID) { |
| | | rs = rs.replace("N/A", "ä¸éç¨") |
| | | .replace("Surface Area:", "表é¢ç§¯ï¼") |
| | | .replace("Area:", "é¢ç§¯ï¼") |
| | | .replace("Square Meter", "å¹³æ¹ç±³") |
| | | .replace("Square km", "å¹³æ¹åç±³") |
| | | .replace("Perimeter: ", "å¨é¿ï¼") |
| | | .replace(/Km/g, " åç±³") |
| | | .replace(/m/g, " ç±³"); |
| | | |
| | | window.strs = rs.replace(/\t/g, "").replace(/s+/g, "").split("\n"); |
| | | var area = strs[0].split("ï¼")[1].replace("\r", "").trim().replace(" å¹³æ¹ç±³", ""); |
| | | setText(6, area); |
| | | |
| | | if (!g_bCalculateTerrainArea) { |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = rs; |
| | | |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = SGLang.i18n("Text26"); |
| | | } |
| | | else { |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = rs; |
| | | } |
| | | |
| | | EnableDisableButtons(); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnChangeMeasurementUnits() { |
| | | SGWorld.Command.Execute(1011, 3); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function CreateMeasurementObject() { |
| | | var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; |
| | | SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function EnableDisableButtons() { |
| | | var bEnableTerrainSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight") && gGeometry != null; |
| | | if (!bEnableTerrainSurface) |
| | | document.getElementById("sampleInterval").style.color = DISABLE; |
| | | else |
| | | document.getElementById("sampleInterval").style.color = "#FFFFFF"; |
| | | |
| | | document.getElementById("terrainSurface").disabled = !bEnableTerrainSurface; |
| | | |
| | | if (bEnableTerrainSurface) |
| | | document.getElementById("terrainSurface").style.opacity = 1; |
| | | else |
| | | document.getElementById("terrainSurface").style.opacity = 0.3; |
| | | |
| | | var numPoints = SGWorld.GetParam(9915); |
| | | if (numPoints < 3) { |
| | | gGeometry = null; |
| | | } |
| | | |
| | | if (numPoints > 0) { |
| | | document.getElementById("deleteMeasure").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteMeasure").style.opacity = 0.3; |
| | | } |
| | | |
| | | if (numPoints > 2 && gGeometry == null) { |
| | | document.getElementById("deleteLastPoint").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteLastPoint").style.opacity = 0.3; |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function ResetButtons() { |
| | | $("#horizontalSurface").removeClass("MenuButtonHighlight"); |
| | | $("#terrainSurface").removeClass("MenuButtonHighlight"); |
| | | $("#3dPlane").removeClass("MenuButtonHighlight"); |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function SetSnapping() { |
| | | if ($("#snapping").hasClass("MenuButtonHighlight")) |
| | | SGWorld.SetParam(9912, 1); |
| | | else |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnSnapping() { |
| | | //$("#snapping").removeClass("MenuButtonHighlight"); |
| | | |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | $("#snapping").removeClass("MenuButtonHighlight"); |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | else { |
| | | SGWorld.SetParam(9912, 1); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | } |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function On3DPlane() { |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | Reset(0, 0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0, 0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | //SGWorld.Command.Execute(2358, 0);//__TEC_MEASURE_AREA |
| | | SGWorld.Command.Execute(1037, 0); |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | SetSnapping(); |
| | | |
| | | SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _3D_PLANE_NAME); |
| | | |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnTerrainSurface() { |
| | | //Reset(0,0); |
| | | g_bCalculateTerrainArea = true; |
| | | if (document.getElementById("sampleInterval").value > 0.0) |
| | | SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, document.getElementById("sampleInterval").value); // 2359 |
| | | g_bCalculateTerrainArea = false; |
| | | |
| | | SetSnapping(); |
| | | } |
| | | |
| | | //--------------------------------- |
| | | function OnHorizontalSurface() { |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | Reset(0, 0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0, 0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, 0); // 2359 |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | SetSnapping(); |
| | | |
| | | //SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _HORIZONTAL_NAME); |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | function OnDeleteLastPoint() { |
| | | SGWorld.SetParam(9914, 0); |
| | | EnableDisableButtons(); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | <!--Sig:00000040au6WjiNW.uqyaxQdPdCltSVnmGMYOWXEgBB9yrqQ.Kyq91MhWbUupggV5yi1GRel4nJZMYQa3tOFAX56jNS8XmJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link href="../Style.css" type="text/css" rel="StyleSheet"> |
| | | <link href="../jquery/slider.css" type="text/css" rel="StyleSheet" /> |
| | | <link href="../jquery/css/dark-hive/jquery-ui-1.10.4.custom.css" rel="stylesheet" /> |
| | | <link href="../jquery/jquery-ui-Override.css" rel="stylesheet" /> |
| | | |
| | | <script src="../jquery/jquery-1.10.2.js" type="text/javascript"></script> |
| | | <script src="../jquery/jquery-ui-1.10.4.custom.js" type="text/javascript"></script> |
| | | <script src="../jquery/slider.js" type="text/javascript"></script> |
| | | <script src="../ToolsCommon70.js" language="javascript"></script> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()" onunload="Reset(false,false);"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td class="ToolTopArea" id="TopAreaTD" width="100%" valign="middle"> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| | | <tr> |
| | | <td width="55px"><img style="margin-left:5px;" src="ToolIcon.png" alt="" /></td> |
| | | <td id="TitleTD" align="left" class="s12w i18n">ToolName</td> |
| | | <td align="right" id="CloseHelpTd"><!--<img style="margin-right:5px;cursor: pointer;" alt="" src="../CommonImg/help.png" border="0" class="i18n" alt="help" title="help" onclick="DisplayHelpPopup6(SGLang.i18nFile('help.html'),SGLang.i18n('help'))">--></td> |
| | | </tr> |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ToolTopSeperator"></td> |
| | | </tr> |
| | | <tr class="s8"> |
| | | <td> |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td class="s8b" style="width: 100px;"> |
| | | <label for="Mode" class="i18n">Mode</label> |
| | | </td> |
| | | <td align="left"> |
| | | <select id="DirectionMode" onchange="ChangeMode();" style="width: 185px;"> |
| | | <option class="i18n" value="0" selected="selected">Auto</option> |
| | | <option class="i18n" value="1">Horizontal</option> |
| | | <option class="i18n" value="2">Vertical</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">Size</label> |
| | | </td> |
| | | <td align="left"> |
| | | <div id="SizeSlider" style="display:block; width:180px;height:1px; margin:3px;"></div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">Direction</label> |
| | | </td> |
| | | <td align="left"> |
| | | <div id="DirectionSlider" style="display:block; width:180px;height:1px; margin:3px;"></div> |
| | | </td> |
| | | </tr> |
| | | <!--<tr> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">SaveTitle</label> |
| | | </td> |
| | | <td align="left"> |
| | | <button id="Button1" class="MenuButtonSmall MenuButtonLast" onclick="SavePlane();"> <span class="i18n">Save</span></button> |
| | | </td> |
| | | </tr>--> |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="center" class="ToolButtonsArea"> |
| | | <button id="AddRemoveBtn" class="MenuButton MenuButtonLast" onclick="Start();"> <img src="./img/Add.png" /><br /> <span id="StartStop" class="i18n">Add</span></button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <script language="JavaScript"> |
| | | var gDebug = false; |
| | | var rootId; |
| | | var gBoxObj = null; |
| | | var gCrossActivate = 0; |
| | | var bEditOn = false; |
| | | var bFirstTime; |
| | | var gCursorPos = null; |
| | | var gOriginBoxSize = 0; |
| | | var gOrigPos = null; |
| | | // var TransparencySlider; |
| | | var SizeSlider; |
| | | var DirectionSlider; |
| | | // var MoveSlider; |
| | | var gDeletePlane = true; |
| | | var gPopup = null; |
| | | var gDoubleSide = -1; |
| | | |
| | | var SGWorld = new ActiveXObject("TerraExplorerX.SGWorld70"); |
| | | |
| | | //-------------- |
| | | // Init |
| | | function Init() { |
| | | // debugger |
| | | rootId = GetParamValue("rootId", SGWorld.ProjectTree.RootID); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnSGWorldMessage", OnSGWorldMessage); |
| | | SGWorld.AttachEvent("OnFrame", OnFrame); |
| | | |
| | | $("#SizeSlider").slider({ |
| | | value: 15, |
| | | min: 1, |
| | | max: 100, |
| | | slide: function (event, ui) { |
| | | setSize(); |
| | | }, |
| | | change: function (event, ui) { |
| | | setSize(); |
| | | } |
| | | }); |
| | | $("#DirectionSlider").slider({ |
| | | value: 0, |
| | | min: 0, |
| | | max: 360, |
| | | slide: function (event, ui) { |
| | | setDirection(); |
| | | }, |
| | | change: function (event, ui) { |
| | | setDirection(); |
| | | } |
| | | }); |
| | | Reset(1, 0); |
| | | } |
| | | |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | |
| | | try { |
| | | if (gBoxObj != null && SGWorld.ProjectTree.GetNextItem(gBoxObj.ID, 15) == SGWorld.ProjectTree.HiddenGroupID) |
| | | SGWorld.Creator.DeleteObject(gBoxObj.ID); |
| | | if (gBoxObj != null) |
| | | SGWorld.Analysis.HideCrossSectionBox(); |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | |
| | | try { |
| | | gBoxObj = null; |
| | | gDeletePlane = true; |
| | | |
| | | $("#AddRemoveBtn").removeClass("MenuButtonHighlight"); |
| | | $("#EditBtn").removeClass("MenuButtonHighlight"); |
| | | $("#SaveImg").attr("src", "./img/SaveObjectDisabled.png"); |
| | | $("#StartStop").text(SGLang.i18n("Add")); |
| | | |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | if (gCrossActivate > 0) { |
| | | SGWorld.DetachEvent("OnLButtonClicked", OnLButtonClicked); |
| | | SGWorld.DetachEvent("OnRButtonUp", OnRButtonUp); |
| | | } |
| | | gCrossActivate = 0; |
| | | bEditOn = false; |
| | | |
| | | if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | SGWorld.Window.SetInputMode(0); |
| | | if (gPopup != null) { |
| | | SGWorld.Window.RemovePopup(gPopup); |
| | | gPopup = null; |
| | | } |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //-------------- |
| | | // Start |
| | | //-------------- |
| | | function Start() { |
| | | if (gCrossActivate == 0) { |
| | | gCrossActivate = 1; |
| | | bEditOn = true; |
| | | |
| | | SGWorld.AttachEvent("OnLButtonClicked", OnLButtonClicked); |
| | | SGWorld.AttachEvent("OnRButtonUp", OnRButtonUp); |
| | | |
| | | |
| | | SGWorld.Window.SetInputMode(1, abspath() + "/cursor_m.cur", true); |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("ClickToAdd")); |
| | | |
| | | $("#AddRemoveBtn").addClass("MenuButtonHighlight"); |
| | | $("#EditBtn").addClass("MenuButtonHighlight"); |
| | | //$("#MoveSlider").slider("value",0); |
| | | } |
| | | else { |
| | | Reset(false, false) |
| | | } |
| | | } |
| | | |
| | | //------------------- |
| | | function OnFrame() { |
| | | try { |
| | | if (gCrossActivate == 1) |
| | | createBox(false); |
| | | if (gCrossActivate == 2) |
| | | showCrossSection(); |
| | | } |
| | | catch (err) { } |
| | | } |
| | | |
| | | //-------------- |
| | | function OnLButtonClicked(Flags, X, Y) { |
| | | try { |
| | | if (gCrossActivate == 1) { |
| | | createBox(true); |
| | | |
| | | } |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //-------------- |
| | | function ChangeMode() { |
| | | if (gCrossActivate != 2 || gBoxObj == null) |
| | | return; |
| | | createBox(true); |
| | | } |
| | | |
| | | // createBox |
| | | function createBox(fromClick) { |
| | | try { |
| | | if (fromClick && gBoxObj != null) { // From Click or change mode |
| | | gCursorPos = gBoxObj.Position.Copy(); |
| | | if ($("#DirectionMode").val() == 1) |
| | | gCursorPos.Pitch = 180; |
| | | if ($("#DirectionMode").val() == 2) |
| | | gCursorPos.Pitch = 90; |
| | | |
| | | } |
| | | else { // from OnFrame |
| | | var cursor = SGWorld.Window.GetMouseInfo(); |
| | | var CursorPitch = 180; // Horizontal |
| | | var CursorYaw = SGWorld.Navigate.GetPosition(3).Yaw + 180; |
| | | gCursorPos = SGWorld.Window.pixelToWorld(cursor.X, cursor.Y, -1 & ~(128 | 1024)).Position; |
| | | var DistanceFromCamera = SGWorld.Navigate.GetPosition(3).DistanceTo(gCursorPos); |
| | | if (cursor.X > 10 && cursor.X < SGWorld.Window.Rect.Width && cursor.Y > 10 && cursor.Y < SGWorld.Window.Rect.Height) { |
| | | var Pos1 = SGWorld.Window.pixelToWorld(cursor.X - 10, cursor.Y - 10, -1 & ~(128 | 1024)).Position; |
| | | var Pos2 = SGWorld.Window.pixelToWorld(cursor.X - 10, cursor.Y + 10, -1 & ~(128 | 1024)).Position; |
| | | var Pos3 = SGWorld.Window.pixelToWorld(cursor.X + 10, cursor.Y - 10, -1 & ~(128 | 1024)).Position; |
| | | var Pos4 = SGWorld.Window.pixelToWorld(cursor.X + 10, cursor.Y + 10, -1 & ~(128 | 1024)).Position; |
| | | if ($("#DirectionMode").val() == 2 || ((Math.abs(Pos1.AimTo(Pos4).Pitch) > 20 || Math.abs(Pos2.AimTo(Pos3).Pitch) > 20) && $("#DirectionMode").val() != 1)) { |
| | | CursorPitch = 90; |
| | | if (Math.abs(Pos1.AimTo(Pos4).Pitch) > 20 || Math.abs(Pos2.AimTo(Pos3).Pitch) > 20) |
| | | CursorYaw = Pos1.AimTo(Pos4).Yaw + 90; |
| | | gCursorPos = gCursorPos.Move(DistanceFromCamera / 100, CursorYaw, 0); |
| | | } |
| | | else { |
| | | gCursorPos.Altitude += DistanceFromCamera / 100; |
| | | } |
| | | } |
| | | else { |
| | | return; |
| | | } |
| | | gCursorPos.Pitch = CursorPitch; |
| | | gCursorPos.Yaw = CursorYaw; |
| | | gOriginBoxSize = DistanceFromCamera; |
| | | } |
| | | |
| | | if (gBoxObj != null) |
| | | SGWorld.Creator.DeleteObject(gBoxObj.ID); |
| | | gBoxObj = SGWorld.Creator.CreateBox(gCursorPos, 1, 1, 0, "#ffffff", "#ffffff", SGWorld.ProjectTree.HiddenGroupID, "CrossSection"); |
| | | gBoxObj.SaveInFlyFile = false; |
| | | gOrigPos = gBoxObj.Position.Copy(); |
| | | gBoxObj.SetParam(5450, 1); |
| | | setTransparency(); |
| | | setSize(); |
| | | $("#StartStop").text(SGLang.i18n("Stop")); |
| | | |
| | | if (fromClick) { |
| | | gCrossActivate = 2; |
| | | if (gPopup != null) |
| | | SGWorld.Window.RemovePopup(gPopup); |
| | | var url = abspath() + "/CrossSectionPopup.html?ObjID=" + gBoxObj.ID + "&lang=" + SGLang.getCode(); |
| | | gPopup = SGWorld.Creator.CreatePopupMessage(SGLang.i18n("ToolName"), url, 20, 265, 400, 50, -1); |
| | | gPopup.Flags = 2 + 32; |
| | | $("#DirectionSlider").slider("value", gCursorPos.Yaw % 360); |
| | | SGWorld.Window.ShowPopup(gPopup); |
| | | //gDoubleSide = SGWorld.GetParam(7700); // Double Side Rendering |
| | | //SGWorld.SetParam(7700,1); |
| | | } |
| | | } |
| | | catch (err) { } |
| | | } |
| | | |
| | | //-------------- |
| | | function OnRButtonUp(Flags, X, Y) { |
| | | if (gCrossActivate == 1) { |
| | | Reset(false, false); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | //-------------- |
| | | function setColor() { |
| | | // try { |
| | | // if (gBoxObj != null) { |
| | | // gBoxObj.FillStyle.Color.FromHTMLColor("#" + $("#color").val()); |
| | | // gBoxObj.LineStyle.Color.FromHTMLColor("#" + $("#color").val()); |
| | | // setTransparency(); |
| | | // } |
| | | // } |
| | | // catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //-------------- |
| | | function setTransparency() { |
| | | |
| | | var a = $("#TransparencySlider").slider("value"); |
| | | try { |
| | | gBoxObj.FillStyle.Color.SetAlpha(0); |
| | | // if (gBoxObj != null) { |
| | | // gBoxObj.FillStyle.Color.SetAlpha(a/200); |
| | | // } |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //-------------- |
| | | function setSize() { |
| | | |
| | | var size = $("#SizeSlider").slider("value"); |
| | | try { |
| | | if (gBoxObj != null) { |
| | | var boxSize = gOriginBoxSize / 50 * $("#SizeSlider").slider("value"); |
| | | gBoxObj.Width = boxSize; |
| | | gBoxObj.Depth = boxSize; |
| | | gBoxObj.Height = boxSize / 100; |
| | | } |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //-------------- |
| | | function setDirection() { |
| | | var direction = $("#DirectionSlider").slider("value"); |
| | | try { |
| | | if (gBoxObj != null && gCrossActivate == 2) { |
| | | gBoxObj.Position.Yaw = direction; |
| | | } |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //-------------- |
| | | function SavePlane() { |
| | | try { |
| | | if (gBoxObj == null) |
| | | return; |
| | | |
| | | var savedPos = gBoxObj.Position.Copy(); |
| | | var savedObj = SGWorld.Creator.CreateBox(savedPos, gBoxObj.Width, gBoxObj.Depth, gBoxObj.Height, gBoxObj.LineStyle.Color, gBoxObj.FillStyle.Color, SGWorld.ProjectTree.RootID, SGLang.i18n("ToolName")); |
| | | savedObj.SetParam(5450, 1); |
| | | savedObj.FillStyle.Color.SetAlpha(0); |
| | | |
| | | var messageURL = SGWorld.Application.ExecutablePath + "tools/CrossSection/CrossSectionPopup.html?ObjID=" + savedObj.ID + "&lang=" + SGLang.getCode(); |
| | | var message = SGWorld.Creator.CreatePopupMessage(SGLang.i18n("ToolName"), messageURL, 1, 10, 300, 50, -1); |
| | | message.Flags = 2 + 32 + 512; |
| | | savedObj.Message.MessageID = message.ID; |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("ObjectSaved")); |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | |
| | | //-------------- |
| | | function OnInputModeChanged(mode) { |
| | | } |
| | | |
| | | //------------ |
| | | function OnSGWorldMessage(MessageID, SounrceID) { |
| | | |
| | | try { |
| | | if (SounrceID == "MessageBarText" && MessageID.indexOf("##CrossSectionExit:") == 0) { |
| | | var objID = MessageID.substring(MessageID.indexOf(":") + 1); |
| | | if (objID == gBoxObj.ID) |
| | | Reset(false, false); |
| | | return true; |
| | | } |
| | | } |
| | | catch (err) { return true; } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | //------------ |
| | | function showCrossSection() { |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link href="../Style.css" rel="StyleSheet" type="text/css"> |
| | | <link href="../jquery/slider.css" type="text/css" rel="StyleSheet" /> |
| | | <link href="../jquery/css/dark-hive/jquery-ui-1.10.4.custom.css" rel="stylesheet" /> |
| | | <link href="../jquery/jquery-ui-Override.css" rel="stylesheet" /> |
| | | |
| | | <script src="../jquery/jquery-1.10.2.js" type="text/javascript"></script> |
| | | <script src="../jquery/jquery-ui-1.10.4.custom.js" type="text/javascript"></script> |
| | | <script src="../ToolsCommon70.js" language="javascript"></script> |
| | | <script src="../jquery/slider.js" type="text/javascript"></script> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()" onunload="Exit();"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="10"> |
| | | <tr> |
| | | <td align="center"> |
| | | <div id="MoveSlider" style="display:block; width:250px;height:1px; margin:3px;"></div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <script language="JavaScript"> |
| | | var gDebug = false; |
| | | var gObjID = ""; |
| | | var gBoxObj = null; |
| | | var gOrigPos = null; |
| | | var gLastPos = null; |
| | | var MoveSlider; |
| | | var gLastWidth = null; |
| | | var gOriginBoxSize = 0; |
| | | var gGeometry; |
| | | |
| | | var SGWorld = new ActiveXObject("TerraExplorerX.SGWorld70"); |
| | | |
| | | //-------------- |
| | | // Init |
| | | function Init() { |
| | | try { |
| | | |
| | | gObjID = GetParamValue("ObjID", "0"); |
| | | |
| | | gBoxObj = SGWorld.ProjectTree.GetObject(gObjID); |
| | | gOrigPos = gBoxObj.Position.Copy(); |
| | | gOriginBoxSize = gBoxObj.Width; |
| | | SGWorld.AttachEvent("OnFrame", showCrossSection); |
| | | |
| | | $("#MoveSlider").slider({ |
| | | value: 0, |
| | | min: -50, |
| | | max: 200, |
| | | slide: function (event, ui) { |
| | | setMove(); |
| | | }, |
| | | change: function (event, ui) { |
| | | setMove(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | catch (err) { } |
| | | } |
| | | //------------------ |
| | | function Exit() { |
| | | |
| | | try { |
| | | SGWorld.Analysis.HideCrossSectionBox(); |
| | | |
| | | SGWorld.Window.ShowMessageBarText("##CrossSectionExit:" + gBoxObj.ID); |
| | | |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | |
| | | } |
| | | |
| | | //-------------- |
| | | function setMove() { |
| | | try { |
| | | |
| | | var distanceVal = $("#MoveSlider").slider("value") * gBoxObj.Width / 100; |
| | | if (gBoxObj.Position.Pitch == 90) { // vertical |
| | | //gBoxObj.Position = gOrigPos.Move(-distanceVal.toFixed(2), gBoxObj.Position.Yaw.toFixed(2), 0); |
| | | gBoxObj.Position = gOrigPos.Move(parseFloat(-distanceVal.toFixed(2)), parseFloat(gBoxObj.Position.Yaw.toFixed(2)), 0);// parseFloat - fix #23020, decimal symbol = comma seperator french OS |
| | | |
| | | gBoxObj.Position.Pitch = 90; |
| | | } |
| | | else gBoxObj.Position.Altitude = gOrigPos.Altitude - distanceVal; |
| | | |
| | | } |
| | | catch (err) { } |
| | | } |
| | | //------------------- |
| | | function showCrossSection() { |
| | | setMove(); |
| | | |
| | | try { |
| | | if (gBoxObj == null) |
| | | return; |
| | | |
| | | if (gLastPos == null || !gLastPos.IsEqual(gBoxObj.Position) || gLastWidth != gBoxObj.Width) { |
| | | var vertices = []; |
| | | var sectionSize = gBoxObj.Width * 5; |
| | | gLastPos = gBoxObj.Position.Copy(); |
| | | gLastWidth = gBoxObj.Width; |
| | | var pos = gBoxObj.Position; |
| | | var planeTolarance = gOriginBoxSize / 100; |
| | | if (gBoxObj.Position.Pitch == 90) { |
| | | var yaw = gBoxObj.Position.Yaw - 180; |
| | | pos = pos.Move(planeTolarance, yaw - 180, 0); // make sure the cut area doesn't include the box |
| | | pos = pos.Move(gBoxObj.Width / 2, 0, -90); |
| | | pos = pos.Move(gBoxObj.Width / 2, yaw + 90, 0); |
| | | vertices[0] = pos; |
| | | pos = pos.Move(sectionSize, yaw - 180, 0); |
| | | vertices[1] = pos; |
| | | pos = pos.Move(gBoxObj.Width, yaw - 90, 0); |
| | | vertices[2] = pos; |
| | | pos = pos.Move(sectionSize, yaw, 0); |
| | | vertices[3] = pos; |
| | | vertices[4] = vertices[0].Move(gBoxObj.Width, 0, 90); |
| | | vertices[5] = vertices[1].Move(gBoxObj.Width, 0, 90); |
| | | vertices[6] = vertices[2].Move(gBoxObj.Width, 0, 90); |
| | | vertices[7] = vertices[3].Move(gBoxObj.Width, 0, 90); |
| | | } |
| | | else { |
| | | pos = pos.Move(planeTolarance, 0, 90); // make sure the cut area doesn't include the box |
| | | pos = pos.Move(gBoxObj.Width / 2, gBoxObj.Position.Yaw, 0); |
| | | pos = pos.Move(gBoxObj.Width / 2, gBoxObj.Position.Yaw + 90, 0); |
| | | vertices[0] = pos; |
| | | pos = pos.Move(gBoxObj.Width, gBoxObj.Position.Yaw - 180, 0); |
| | | vertices[1] = pos; |
| | | pos = pos.Move(gBoxObj.Width, gBoxObj.Position.Yaw - 90, 0); |
| | | vertices[2] = pos; |
| | | pos = pos.Move(gBoxObj.Width, gBoxObj.Position.Yaw, 0); |
| | | vertices[3] = pos; |
| | | vertices[4] = vertices[0].Move(sectionSize, 0, 90); |
| | | vertices[5] = vertices[1].Move(sectionSize, 0, 90); |
| | | vertices[6] = vertices[2].Move(sectionSize, 0, 90); |
| | | vertices[7] = vertices[3].Move(sectionSize, 0, 90); |
| | | } |
| | | |
| | | gGeometry = SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(vertices); |
| | | // tmpBox = SGWorld.Creator.CreatePolyline(geometry, $("#color").val(), 3, "", "dd"); |
| | | SGWorld.Analysis.ShowCrossSectionBox(gGeometry, false, "#ff" + $("#color").val()); // |
| | | } |
| | | } |
| | | catch (err) { } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:000000409fE#CpGDY6uwO81Zcfp2fwQbGN0zw1HJw#r#9mzj52KsWdNyv8pRS4S2N0qaeNht0akAFaBHPcTTOY#x3RhFJvJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang,{ |
| | | ToolTitle: "ååå·¥å
·", |
| | | ToolName: "ååå·¥å
·", |
| | | help: "帮å©", |
| | | Mode: "模å¼", |
| | | Auto: "èªå¨", |
| | | Vertical: "åç´åå", |
| | | Horizontal: "æ°´å¹³åå", |
| | | modeIn: "å
å", |
| | | modeOut: "å¤å", |
| | | Color: "å¹³é¢è²å½©", |
| | | Transparency: "å¹³é¢éæåº¦", |
| | | Size: "å¹³é¢å¤§å°", |
| | | Direction: "平颿¹å", |
| | | Move: "ç§»å¨", |
| | | Add: "å¼å§", |
| | | Stop: "忢", |
| | | SaveTitle: "ä¿åå°é¡¹ç®", |
| | | Save: "ä¿å", |
| | | Remove: "ç§»é¤<br>å¹³é¢", |
| | | EditOn: "ç¼è¾<br>æå¼", |
| | | EditOff: "ç¼è¾<br>å
³é", |
| | | ClickToAdd: "ååï¼å·¦é®åå»ä¸ç»´çªå£ä»¥æ¾ç½®ååå¹³é¢ï¼å³é®å廿忢æé®ä»¥åæ¶æä½ã", |
| | | ObjectSaved: "ä¿åååå¹³é¢ï¼åå»å¹³é¢ä»¥æ¿æ´»åæ", |
| | | OpenTool: "ååï¼è¯·æå¼å·¥å
·ï¼å次åå»å¯¹è±¡", |
| | | Text999: "" |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <html class="helpHtml"> |
| | | <HEAD> |
| | | <TITLE>TerraExplorer Pro - Skyline Software Systems, Inc.</TITLE> |
| | | <LINK REL=StyleSheet HREF="../Style.css" TYPE="text/css"> |
| | | </head> |
| | | <body> |
| | | <table border=0 cellPadding=0 CELLSPACING=0 class="s9" width=100%> |
| | | <tr><td class="s12b" align=center> |
| | | Cross Section |
| | | </tD></tr> |
| | | <tr><td> |
| | | <br> |
| | | |
| | | <div class=WordSection1> |
| | | |
| | | |
| | | <p class=MsoNormal>The Cross Section tool makes a horizontal or vertical straight cut to expose obscured sections of the 3D View. </p> |
| | | |
| | | <p class=ProcedureHeader style='margin-left:0in;text-indent:0in'><span dir=LTR></span>To use the Cross Section tool:</p> |
| | | |
| | | <p class=ListFirstLevel>1.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span>Enter the following parameters:</p> |
| | | |
| | | <table class=SkyTable border=1 cellspacing=0 cellpadding=0 |
| | | style='width:550.0pt;margin-left:.35in;border-collapse:collapse;border:none'> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'><b>Parameter</b></p> |
| | | </td> |
| | | <td valign=top style='width:414.95pt;border:solid #4BACC6 1.0pt; |
| | | border-left:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'><b>Description</b></p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Mode </p> |
| | | </td> |
| | | <td width=420 valign=top style='width:414.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Select the mode</p> |
| | | <ul> |
| | | <li><b>Auto</b> � The direction of the cross section is automatically determined based on what the cursor is currently pointing at.</li> |
| | | <ul> |
| | | <li> A vertical surface (e.g. side of a building) � Vertical cross section </li> |
| | | <li> The terrain or any horizontal flat surface (e.g. roof tops) � Horizontal cross section </li> |
| | | </ul> |
| | | <li><b>Horizontal</b> � Create horizontal cross sections</li> |
| | | <li><b>Vertical</b> � Create vertical cross sections</li> |
| | | </ul> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Plane Size</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:414.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Determines the size of the cross section plane. Slide the slider to the right to increase the plane size, and left to decrease. </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Plane Direction</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:414.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Determines the direction of the cross section plane. Slide the slider to the right or left to rotate the plane.</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Save to Project</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:414.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:0in;text-indent:0in'>Click the <b>Save</b> button to create a Project Tree entry that reopens the Cross Section tool with the selected location.</p> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <p class=ListFirstLevel>2.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span>Click <b>Start</b> </p> |
| | | |
| | | <p class=ListFirstLevel>3.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span>In the <b>3D Window</b>, click where you want to create a cross section. Then use the Cross Section slider to adjust the position of the cross section plane. When cutting a horizontal cross section, slide the slider to the left to lower the plane (increasing the section being clipped), and right to raise it. When cutting a vertical cross section, slide the slider to the left to move the cross section plane forward, and right to move it backward. </p> |
| | | |
| | | |
| | | <p class=ListFirstLevel>4.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span>Click <b>Stop</b> to exit the current cross section </p> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | </td></tr> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:0000004037Jcz4CpwuVwuf9Df4vV4wM7W4KHbc4BwMRbEZMdnxjRnBKOLEs1l4.FjCY3HBiUyqA.BLVkf#vzOyF03faRXAJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang,{ |
| | | ToolTitle: "æµéå·¥å
·", |
| | | ToolName: "å°å½¢åé¢", |
| | | help: "帮å©", |
| | | //Text0: "Cancel", |
| | | //Text1: "Delete Last Point", |
| | | //Text2: "Aerial", |
| | | //Text3: "Horizontal", |
| | | //Text4: "Vertical", |
| | | //Text5: "OnGround", |
| | | Text6: "å建æµé对象", |
| | | Text7: "ææ", |
| | | //Text19: "Calculating query points", |
| | | //Text16: "Left click on the terrain to draw a polygon/Polyline. Right click to finish operation.", |
| | | Text17: "åä½", |
| | | Text18: "å 餿µéå¼ã", |
| | | Text19: "å 餿åä¸ä¸ªæµéç¹ã", |
| | | Text20: "å°æµéç¹ææå°è¾¹ã对象åé¡¶ç¹ã", |
| | | //Text21: "Calculate aerial distance, i.e., the actual distance between points in the 3D Window.", |
| | | //Text22: "Calculate horizontal distance between points in the 3D Window.", |
| | | Text23: "å¨ç©ºä¸æ¾ç¤ºå°å½¢é«ç¨ã", |
| | | Text24: "æ¾ç¤ºç©ºä¸è·ç¦»", |
| | | Text25: "æ¾ç¤ºæ°´å¹³è·ç¦»", |
| | | Text26: "æ¾ç¤ºåç´è·ç¦»", |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> |
| | | <img src="./img/delete.png" /><br /> |
| | | <!-- <span class="i18n">Text0</span> --> |
| | | </button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> |
| | | <img src="./img/delete_last_point.png" /><br /> |
| | | <!-- <span class="i18n">Text1</span> --> |
| | | </button> |
| | | <button id="snapping" class="MenuButton2" style="border: none;" onclick="OnSnapping()"> |
| | | <img src="./img/snap.png" /><br /> |
| | | <!-- <span class="i18n" style="font:#2A4EA5">Text7</span>--> |
| | | </button> |
| | | <button id="onGroundDistance" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none; display: none;" onclick="OnGroundDistance()"> |
| | | <img src="./img/TerrainProfile.png" /><!--<br /><span class="i18n" style="font:#2A4EA5">Text5</span>--> |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> |
| | | <tr id="createTRId" style="display: none;"> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top;">Text6</span> |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: yellow;">Text24</span> |
| | | <input type="checkbox" id="showAerialDistance" checked align="bottom" style="width: 25px;" onclick="OnShowAerial();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: white;">Text25</span> |
| | | <input type="checkbox" id="showHorizontalDistance" align="bottom" style="width: 25px;" onclick="OnShowHorizontal();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: #FF49E6;">Text26</span> |
| | | <input type="checkbox" id="showVerticalDistance" align="bottom" style="width: 25px;" onclick="OnShowVertical();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="textarea-container"> |
| | | <style> |
| | | div.textarea-size { |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | | <div class="textarea-size s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <tr id="unitTRId" style="display: none;"> |
| | | <td> |
| | | <span id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()" class="i18n s9w link">Text17</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon70.js"></script> |
| | | <script language="JavaScript"> |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | //var gPolygonText = SGLang.i18n("Text35"); |
| | | //var gPolylineText = SGLang.i18n("Text36"); |
| | | var gDrawPolyClick = null; |
| | | var gEndDrawPoly = DrawPoly; |
| | | var gPopupCaption = ""; |
| | | |
| | | var _AERIAL_REG_NAME = "DistanceMeasurementShowAerial"; |
| | | var _HORIZONTAL_REG_NAME = "DistanceMeasurementShowHorizontal"; |
| | | var _VERTICAL_REG_NAME = "DistanceMeasurementShowVertical"; |
| | | |
| | | var bInEdit; |
| | | var Type = 3; |
| | | var gGeometry = null; |
| | | //---------------- |
| | | function Init() { |
| | | SGWorld.AttachEvent("OnMeasurementDistanceResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | SGWorld.AttachEvent("OnLButtonUp", OnLButtonUp); |
| | | |
| | | var isPM = GetParamValue("pm", "0"); |
| | | if (isPM == "1") { |
| | | $("#unitTRId").hide(); |
| | | $("#createTRId").hide(); |
| | | $("#onGroundDistance").hide(); |
| | | } |
| | | document.getElementById("changeMeasurementUnits").value = SGLang.i18n(""); |
| | | document.getElementById("deleteMeasure").title = SGLang.i18n("Text18"); |
| | | document.getElementById("deleteLastPoint").title = SGLang.i18n("Text19"); |
| | | document.getElementById("snapping").title = SGLang.i18n("Text20"); |
| | | document.getElementById("onGroundDistance").title = SGLang.i18n("Text23"); |
| | | |
| | | ////Turn off CreateMeasurementObject |
| | | //SGWorld.Command.Execute(2225,0); |
| | | |
| | | //var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | //document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | document.getElementById("createMeasurementObject").checked = false; |
| | | CreateMeasurementObject(); |
| | | |
| | | Reset(1, 0); |
| | | |
| | | //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST |
| | | SGWorld.Command.Execute(1035, 0); |
| | | |
| | | SetSnapping(); |
| | | |
| | | //document.getElementById("showAerialDistance").checked = SGWorld.GetOptionParam(_AERIAL_REG_NAME); |
| | | //document.getElementById("showHorizontalDistance").checked = SGWorld.GetOptionParam(_HORIZONTAL_REG_NAME); |
| | | //document.getElementById("showVerticalDistance").checked = SGWorld.GetOptionParam(_VERTICAL_REG_NAME); |
| | | |
| | | Type = getQueryStr("type"); |
| | | if (Type == "1") { |
| | | document.getElementById("showHorizontalDistance").checked = true; |
| | | document.getElementById("showVerticalDistance").checked = false; |
| | | document.getElementById("showAerialDistance").checked = false; |
| | | } else if (Type == "2") { |
| | | document.getElementById("showHorizontalDistance").checked = false; |
| | | document.getElementById("showVerticalDistance").checked = true; |
| | | document.getElementById("showAerialDistance").checked = false; |
| | | } else { |
| | | document.getElementById("showHorizontalDistance").checked = true; |
| | | document.getElementById("showVerticalDistance").checked = true; |
| | | document.getElementById("showAerialDistance").checked = true; |
| | | } |
| | | OnShowAerial(); |
| | | OnShowHorizontal(); |
| | | OnShowVertical(); |
| | | |
| | | //////////////OnShow(); |
| | | EnableDisableButtons(); |
| | | //showVerticalDistance |
| | | } |
| | | |
| | | function getQueryStr(name) { |
| | | var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) { |
| | | return unescape(r[2]); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | //---------------- |
| | | function ShowPopup(ProfileType, ObjID) { |
| | | var CompareStr = ""; |
| | | var CompareMode = 0; |
| | | var Density = 2; |
| | | |
| | | // Remove previos popup |
| | | SGWorld.Window.RemovePopupByCaption(gPopupCaption); |
| | | |
| | | gPopupCaption = SGLang.i18n("Text14") + " " + Date().toString(); |
| | | var url = abspath() + "/../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | |
| | | //var path = location.href.substring(0, location.href.lastIndexOf("/") + 1); |
| | | //var url = path + "../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | |
| | | // var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, SGWorld.Window.Rect.Height * 2 / 3, SGWorld.Window.Rect.Width - 2, SGWorld.Window.Rect.Height / 3 - 55, -1); |
| | | var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, -1000, 100, 100, -1); |
| | | |
| | | popupMsg.Flags = 2 + 32; |
| | | SGWorld.Window.ShowPopup(popupMsg); |
| | | } |
| | | |
| | | function OnShowAerial() { |
| | | SGWorld.SetOptionParam(_AERIAL_REG_NAME, document.getElementById("showAerialDistance").checked); |
| | | } |
| | | |
| | | function OnShowHorizontal() { |
| | | |
| | | SGWorld.SetOptionParam(_HORIZONTAL_REG_NAME, document.getElementById("showHorizontalDistance").checked); |
| | | } |
| | | |
| | | function OnShowVertical() { |
| | | SGWorld.SetOptionParam(_VERTICAL_REG_NAME, document.getElementById("showVerticalDistance").checked); |
| | | } |
| | | |
| | | function OnUnload() { |
| | | var measurementMode = SGWorld.GetParam(9916); |
| | | if (measurementMode == 33326/*ID_MEASURE_HDIST*/ || measurementMode == 33327/*ID_MEASURE_ADIST*/) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | //------------- |
| | | // DrawPoly |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | // create a polyline, under the hidden group, using this geometry and send the objID to the popup |
| | | var lineGroup = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text28"), SGWorld.ProjectTree.HiddenGroupID); // SGWorld.ProjectTree.RootID |
| | | var line = SGWorld.Creator.CreatePolyline(geometry, "#FC8220", 3, lineGroup, "ProfileLine"); |
| | | |
| | | //line.LineStyle.Width = -4; |
| | | //line.SetParam(5440, 1); |
| | | line.Visibility.Show = false; |
| | | |
| | | ShowPopup(0, lineGroup); |
| | | return true; |
| | | } |
| | | |
| | | function OnDeleteMeasure() { |
| | | //alert("aa"); |
| | | Reset(0, 0); |
| | | |
| | | //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST |
| | | SGWorld.Command.Execute(1035, 0); |
| | | |
| | | EnableDisableButtons(); |
| | | //alert("bb"); |
| | | } |
| | | |
| | | function OnInputModeChanged(mode) { |
| | | if (mode == 0) { |
| | | Reset(0, 0); |
| | | //SGWorld.Window.RemovePopupByCaption("Distance Measurement"); |
| | | } |
| | | } |
| | | |
| | | function OnLButtonUp(Flags, X, Y) { |
| | | if ((Flags & 0x0400) == 0) { |
| | | gGeometry = null; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | function EnableDisableButtons() { |
| | | var numPoints = SGWorld.GetParam(9915); |
| | | |
| | | if (numPoints > 0) { |
| | | document.getElementById("deleteMeasure").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteMeasure").style.opacity = 0.3; |
| | | } |
| | | |
| | | if (gGeometry == null) { |
| | | document.getElementById("deleteLastPoint").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteLastPoint").style.opacity = 0.3; |
| | | } |
| | | |
| | | var bEnableTerrainProfile = gGeometry != null; |
| | | |
| | | if (bEnableTerrainProfile) { |
| | | document.getElementById("onGroundDistance").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("onGroundDistance").style.opacity = 0.3; |
| | | } |
| | | } |
| | | |
| | | function OnMeasurementResult(rs, SounrceID) { |
| | | rs = rs.replace("Total Aerial Distance:", "æ»ç©ºä¸è·ç¦»ï¼") |
| | | .replace("Total Horizontal Distance:", "æ»æ°´å¹³è·ç¦»ï¼") |
| | | .replace("Total Vertical Distance:", "æ»åç´è·ç¦»ï¼") |
| | | .replace("Total Vertical Distance (First point to last point):", "æ»åç´è·ç¦»ï¼ä»ç¬¬ä¸ç¹å°æåä¸ç¹ï¼ï¼") |
| | | .replace("Slope:", "å¡åº¦ï¼") |
| | | .replace("Slope (First point to last point):", "å¡åº¦ï¼ä»ç¬¬ä¸ç¹å°æåä¸ç¹ï¼ï¼") |
| | | .replace(/km/g, " åç±³") |
| | | .replace(/cm/g, " åç±³") |
| | | .replace(/mm/g, " 毫米") |
| | | .replace(/m/g, " ç±³") |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | //input = textContainer.querySelector('textarea'); |
| | | //input.value = measurementResult; |
| | | textareaSize.innerText = rs; |
| | | |
| | | window.strs = rs.replace(/\t/g, "").replace(/s+/g, "").split("\n"); //.replace(/\\r/g, "") |
| | | switch (Type) { |
| | | case "1": |
| | | var dis = strs[1].split("ï¼")[1].replace("\r", "").split(" ")[0]; |
| | | setText(2, dis); |
| | | break; |
| | | case "2": |
| | | var ver = strs[2].split("ï¼")[1].replace("\r", "").split(" ")[0]; |
| | | setText(3, ver); |
| | | break; |
| | | default: |
| | | var angle = strs[3].split("ï¼")[1].replace("°", ""); |
| | | setText(4, angle); |
| | | break; |
| | | } |
| | | |
| | | EnableDisableButtons(); |
| | | return true; |
| | | } |
| | | |
| | | function setText(idx, val) { |
| | | var txtId = SGWorld.ProjectTree.FindItem("å®ä½ç¹\\Text"); |
| | | if (txtId) { |
| | | var obj = SGWorld.ProjectTree.GetObject(txtId); |
| | | var strs = obj.Text.split(","); // 0,0,0,0,0,0 |
| | | strs[idx] = val; |
| | | obj.Text = strs.join(","); |
| | | } |
| | | } |
| | | |
| | | function OnChangeMeasurementUnits() { |
| | | SGWorld.Command.Execute(1011, 3); |
| | | } |
| | | |
| | | function CreateMeasurementObject() { |
| | | var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; |
| | | SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); |
| | | } |
| | | |
| | | function ResetButtons() { |
| | | //$("#verticalDistance").removeClass("MenuButtonHighlight"); |
| | | $("#onGroundDistance").removeClass("MenuButtonHighlight"); |
| | | } |
| | | |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | ResetButtons(); |
| | | gGeometry = null; |
| | | try { |
| | | if (gPolyObj != null) |
| | | SGWorld.Creator.DeleteObject(gPolyObj.ID); |
| | | } catch (e) { } |
| | | |
| | | gPolyObj = null; |
| | | GroupID = null; |
| | | |
| | | bDontAskme = false; |
| | | |
| | | $("#lineButton").removeClass("MenuButtonHighlight"); |
| | | $("#areaButton").removeClass("MenuButtonHighlight"); |
| | | $("#groupButton").removeClass("MenuButtonHighlight"); |
| | | $("#clipboardButton").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | if (bInEdit) { |
| | | SGWorld.DetachEvent("OnLButtonClicked", DrawPolyLButtonClicked); |
| | | SGWorld.DetachEvent("OnRButtonUp", DrawPolyRButtonUp); |
| | | SGWorld.DetachEvent("OnFrame", DrawPolyOnFrame); |
| | | SGWorld.DetachEvent("OnInputModeChanged", DrawPolyInputModeChanged); |
| | | } |
| | | bInEdit = false; |
| | | |
| | | //if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | // SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //-------------- |
| | | // CreateObjects |
| | | //-------------- |
| | | function OnGroundDistance() { |
| | | |
| | | DrawPoly(gGeometry, 0, 0); |
| | | return; |
| | | } |
| | | |
| | | function SetSnapping() { |
| | | if ($("#snapping").hasClass("MenuButtonHighlight")) |
| | | SGWorld.SetParam(9912, 1); |
| | | else |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | |
| | | function OnSnapping() { |
| | | //$("#snapping").removeClass("MenuButtonHighlight"); |
| | | |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | $("#snapping").removeClass("MenuButtonHighlight"); |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | else { |
| | | SGWorld.SetParam(9912, 1); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | function OnVerticalDistance() |
| | | { |
| | | if( $(event.srcElement).hasClass("MenuButtonHighlight")) |
| | | { |
| | | Reset(0,0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0,0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(1036,0); |
| | | |
| | | SetSnapping(); |
| | | } |
| | | */ |
| | | |
| | | function OnDeleteLastPoint() { |
| | | SGWorld.SetParam(8335, 0); |
| | | EnableDisableButtons(); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | <!--Sig:000000408JYdtBwnEhYwKwSHBToL4ROTBsQ92IumwfiHRg2dcUb.aSdjqmR2hWrrJjiq7xBbYr6MVX764LIe8a6004zvXaJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> |
| | | <img src="./img/delete.png" /><br /> |
| | | <!-- <span class="i18n">Text0</span> --> |
| | | </button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> |
| | | <img src="./img/delete_last_point.png" /><br /> |
| | | <!-- <span class="i18n">Text1</span> --> |
| | | </button> |
| | | <button id="snapping" class="MenuButton2" style="border: none;" onclick="OnSnapping()"> |
| | | <img src="./img/snap.png" /><br /> |
| | | <!-- <span class="i18n" style="font:#2A4EA5">Text7</span>--> |
| | | </button> |
| | | <button id="onGroundDistance" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none; display: none;" onclick="OnGroundDistance()"> |
| | | <img src="./img/TerrainProfile.png" /><!--<br /><span class="i18n" style="font:#2A4EA5">Text5</span>--> |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> |
| | | <tr id="createTRId" style="display: none;"> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top;">Text6</span> |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: yellow;">Text24</span> |
| | | <input type="checkbox" id="showAerialDistance" checked align="bottom" style="width: 25px;" onclick="OnShowAerial();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: white;">Text25</span> |
| | | <input type="checkbox" id="showHorizontalDistance" align="bottom" style="width: 25px;" onclick="OnShowHorizontal();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: #FF49E6;">Text26</span> |
| | | <input type="checkbox" id="showVerticalDistance" align="bottom" style="width: 25px;" onclick="OnShowVertical();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="textarea-container"> |
| | | <style> |
| | | div.textarea-size { |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | | <div class="textarea-size s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <tr id="unitTRId" style="display: none;"> |
| | | <td> |
| | | <span id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()" class="i18n s9w link">Text17</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon70.js"></script> |
| | | <script language="JavaScript"> |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | //var gPolygonText = SGLang.i18n("Text35"); |
| | | //var gPolylineText = SGLang.i18n("Text36"); |
| | | var gDrawPolyClick = null; |
| | | var gEndDrawPoly = DrawPoly; |
| | | var gPopupCaption = ""; |
| | | |
| | | var _AERIAL_REG_NAME = "DistanceMeasurementShowAerial"; |
| | | var _HORIZONTAL_REG_NAME = "DistanceMeasurementShowHorizontal"; |
| | | var _VERTICAL_REG_NAME = "DistanceMeasurementShowVertical"; |
| | | |
| | | var bInEdit; |
| | | var gGeometry = null; |
| | | //---------------- |
| | | function Init() { |
| | | SGWorld.AttachEvent("OnMeasurementDistanceResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | SGWorld.AttachEvent("OnLButtonUp", OnLButtonUp); |
| | | |
| | | var isPM = GetParamValue("pm", "0"); |
| | | if (isPM == "1") { |
| | | $("#unitTRId").hide(); |
| | | $("#createTRId").hide(); |
| | | $("#onGroundDistance").hide(); |
| | | } |
| | | document.getElementById("changeMeasurementUnits").value = SGLang.i18n(""); |
| | | document.getElementById("deleteMeasure").title = SGLang.i18n("Text18"); |
| | | document.getElementById("deleteLastPoint").title = SGLang.i18n("Text19"); |
| | | document.getElementById("snapping").title = SGLang.i18n("Text20"); |
| | | document.getElementById("onGroundDistance").title = SGLang.i18n("Text23"); |
| | | |
| | | ////Turn off CreateMeasurementObject |
| | | //SGWorld.Command.Execute(2225,0); |
| | | |
| | | var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | CreateMeasurementObject(); |
| | | |
| | | Reset(1, 0); |
| | | |
| | | //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST |
| | | SGWorld.Command.Execute(1035, 0); |
| | | |
| | | SetSnapping(); |
| | | |
| | | //document.getElementById("showAerialDistance").checked = SGWorld.GetOptionParam(_AERIAL_REG_NAME); |
| | | //document.getElementById("showHorizontalDistance").checked = SGWorld.GetOptionParam(_HORIZONTAL_REG_NAME); |
| | | //document.getElementById("showVerticalDistance").checked = SGWorld.GetOptionParam(_VERTICAL_REG_NAME); |
| | | |
| | | document.getElementById("showHorizontalDistance").checked = true; |
| | | document.getElementById("showVerticalDistance").checked = true; |
| | | document.getElementById("showAerialDistance").checked = true; |
| | | |
| | | //////////////OnShow(); |
| | | EnableDisableButtons(); |
| | | //showVerticalDistance |
| | | } |
| | | |
| | | //---------------- |
| | | function ShowPopup(ProfileType, ObjID) { |
| | | var CompareStr = ""; |
| | | var CompareMode = 0; |
| | | var Density = 2; |
| | | |
| | | // Remove previos popup |
| | | SGWorld.Window.RemovePopupByCaption(gPopupCaption); |
| | | |
| | | gPopupCaption = SGLang.i18n("Text14") + " " + Date().toString(); |
| | | var url = abspath() + "/../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | |
| | | //var path = location.href.substring(0, location.href.lastIndexOf("/") + 1); |
| | | //var url = path + "../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | |
| | | // var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, SGWorld.Window.Rect.Height * 2 / 3, SGWorld.Window.Rect.Width - 2, SGWorld.Window.Rect.Height / 3 - 55, -1); |
| | | var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, -1000, 100, 100, -1); |
| | | |
| | | popupMsg.Flags = 2 + 32; |
| | | SGWorld.Window.ShowPopup(popupMsg); |
| | | } |
| | | |
| | | function OnShowAerial() { |
| | | SGWorld.SetOptionParam(_AERIAL_REG_NAME, document.getElementById("showAerialDistance").checked); |
| | | } |
| | | |
| | | function OnShowHorizontal() { |
| | | |
| | | SGWorld.SetOptionParam(_HORIZONTAL_REG_NAME, document.getElementById("showHorizontalDistance").checked); |
| | | } |
| | | |
| | | function OnShowVertical() { |
| | | SGWorld.SetOptionParam(_VERTICAL_REG_NAME, document.getElementById("showVerticalDistance").checked); |
| | | } |
| | | |
| | | function OnUnload() { |
| | | var measurementMode = SGWorld.GetParam(9916); |
| | | if (measurementMode == 33326/*ID_MEASURE_HDIST*/ || measurementMode == 33327/*ID_MEASURE_ADIST*/) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | //------------- |
| | | // DrawPoly |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | // create a polyline, under the hidden group, using this geometry and send the objID to the popup |
| | | var lineGroup = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text28"), SGWorld.ProjectTree.HiddenGroupID); // SGWorld.ProjectTree.RootID |
| | | var line = SGWorld.Creator.CreatePolyline(geometry, "#FC8220", 3, lineGroup, "ProfileLine"); |
| | | |
| | | //line.LineStyle.Width = -4; |
| | | //line.SetParam(5440, 1); |
| | | line.Visibility.Show = false; |
| | | |
| | | ShowPopup(0, lineGroup); |
| | | return true; |
| | | } |
| | | |
| | | function OnDeleteMeasure() { |
| | | //alert("aa"); |
| | | Reset(0, 0); |
| | | |
| | | //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST |
| | | SGWorld.Command.Execute(1035, 0); |
| | | |
| | | EnableDisableButtons(); |
| | | //alert("bb"); |
| | | } |
| | | |
| | | function OnInputModeChanged(mode) { |
| | | if (mode == 0) { |
| | | Reset(0, 0); |
| | | //SGWorld.Window.RemovePopupByCaption("Distance Measurement"); |
| | | } |
| | | } |
| | | |
| | | function OnLButtonUp(Flags, X, Y) { |
| | | if ((Flags & 0x0400) == 0) { |
| | | gGeometry = null; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | function EnableDisableButtons() { |
| | | var numPoints = SGWorld.GetParam(9915); |
| | | |
| | | if (numPoints > 0) { |
| | | document.getElementById("deleteMeasure").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteMeasure").style.opacity = 0.3; |
| | | } |
| | | |
| | | if (gGeometry == null) { |
| | | document.getElementById("deleteLastPoint").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteLastPoint").style.opacity = 0.3; |
| | | } |
| | | |
| | | var bEnableTerrainProfile = gGeometry != null; |
| | | |
| | | if (bEnableTerrainProfile) { |
| | | document.getElementById("onGroundDistance").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("onGroundDistance").style.opacity = 0.3; |
| | | } |
| | | } |
| | | |
| | | function OnMeasurementResult(rs, SounrceID) { |
| | | rs = rs.replace("Total Aerial Distance:", "æ»ç©ºä¸è·ç¦»ï¼") |
| | | .replace("Total Horizontal Distance:", "æ»æ°´å¹³è·ç¦»ï¼") |
| | | .replace("Total Vertical Distance:", "æ»åç´è·ç¦»ï¼") |
| | | .replace("Total Vertical Distance (First point to last point):", "æ»åç´è·ç¦»ï¼ä»ç¬¬ä¸ç¹å°æåä¸ç¹ï¼ï¼") |
| | | .replace("Slope:", "å¡åº¦ï¼") |
| | | .replace("Slope (First point to last point):", "å¡åº¦ï¼ä»ç¬¬ä¸ç¹å°æåä¸ç¹ï¼ï¼") |
| | | .replace(/km/g, " åç±³") |
| | | .replace(/cm/g, " åç±³") |
| | | .replace(/mm/g, " 毫米") |
| | | .replace(/m/g, " ç±³") |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | //input = textContainer.querySelector('textarea'); |
| | | //input.value = measurementResult; |
| | | textareaSize.innerText = rs; |
| | | |
| | | EnableDisableButtons(); |
| | | return true; |
| | | } |
| | | |
| | | function OnChangeMeasurementUnits() { |
| | | SGWorld.Command.Execute(1011, 3); |
| | | } |
| | | |
| | | function CreateMeasurementObject() { |
| | | var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; |
| | | SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); |
| | | } |
| | | |
| | | function ResetButtons() { |
| | | //$("#verticalDistance").removeClass("MenuButtonHighlight"); |
| | | $("#onGroundDistance").removeClass("MenuButtonHighlight"); |
| | | } |
| | | |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | ResetButtons(); |
| | | gGeometry = null; |
| | | try { |
| | | if (gPolyObj != null) |
| | | SGWorld.Creator.DeleteObject(gPolyObj.ID); |
| | | } catch (e) { } |
| | | |
| | | gPolyObj = null; |
| | | GroupID = null; |
| | | |
| | | bDontAskme = false; |
| | | |
| | | $("#lineButton").removeClass("MenuButtonHighlight"); |
| | | $("#areaButton").removeClass("MenuButtonHighlight"); |
| | | $("#groupButton").removeClass("MenuButtonHighlight"); |
| | | $("#clipboardButton").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | if (bInEdit) { |
| | | SGWorld.DetachEvent("OnLButtonClicked", DrawPolyLButtonClicked); |
| | | SGWorld.DetachEvent("OnRButtonUp", DrawPolyRButtonUp); |
| | | SGWorld.DetachEvent("OnFrame", DrawPolyOnFrame); |
| | | SGWorld.DetachEvent("OnInputModeChanged", DrawPolyInputModeChanged); |
| | | } |
| | | bInEdit = false; |
| | | |
| | | //if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | // SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //-------------- |
| | | // CreateObjects |
| | | //-------------- |
| | | function OnGroundDistance() { |
| | | |
| | | DrawPoly(gGeometry, 0, 0); |
| | | return; |
| | | } |
| | | |
| | | function SetSnapping() { |
| | | if ($("#snapping").hasClass("MenuButtonHighlight")) |
| | | SGWorld.SetParam(9912, 1); |
| | | else |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | |
| | | function OnSnapping() { |
| | | //$("#snapping").removeClass("MenuButtonHighlight"); |
| | | |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | $("#snapping").removeClass("MenuButtonHighlight"); |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | else { |
| | | SGWorld.SetParam(9912, 1); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | function OnVerticalDistance() |
| | | { |
| | | if( $(event.srcElement).hasClass("MenuButtonHighlight")) |
| | | { |
| | | Reset(0,0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0,0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(1036,0); |
| | | |
| | | SetSnapping(); |
| | | } |
| | | */ |
| | | |
| | | function OnDeleteLastPoint() { |
| | | SGWorld.SetParam(8335, 0); |
| | | EnableDisableButtons(); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | <!--Sig:000000408JYdtBwnEhYwKwSHBToL4ROTBsQ92IumwfiHRg2dcUb.aSdjqmR2hWrrJjiq7xBbYr6MVX764LIe8a6004zvXaJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> |
| | | <img src="./img/delete.png" /><br /> |
| | | <!-- <span class="i18n">Text0</span> --> |
| | | </button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> |
| | | <img src="./img/delete_last_point.png" /><br /> |
| | | <!-- <span class="i18n">Text1</span> --> |
| | | </button> |
| | | <button id="snapping" class="MenuButton2" style="border: none;" onclick="OnSnapping()"> |
| | | <img src="./img/snap.png" /><br /> |
| | | <!-- <span class="i18n" style="font:#2A4EA5">Text7</span>--> |
| | | </button> |
| | | <button id="onGroundDistance" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none; display: none;" onclick="OnGroundDistance()"> |
| | | <img src="./img/TerrainProfile.png" /><!--<br /><span class="i18n" style="font:#2A4EA5">Text5</span>--> |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> |
| | | <tr id="createTRId" style="display: none;"> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top;">Text6</span> |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: yellow;">Text24</span> |
| | | <input type="checkbox" id="showAerialDistance" checked align="bottom" style="width: 25px;" onclick="OnShowAerial();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: white;">Text25</span> |
| | | <input type="checkbox" id="showHorizontalDistance" align="bottom" style="width: 25px;" onclick="OnShowHorizontal();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span class="i18n s8w" style="vertical-align: top; color: #FF49E6;">Text26</span> |
| | | <input type="checkbox" id="showVerticalDistance" align="bottom" style="width: 25px;" onclick="OnShowVertical();" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="textarea-container"> |
| | | <style> |
| | | div.textarea-size { |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | | <div class="textarea-size s8w"></div> |
| | | </td> |
| | | </tr> |
| | | <tr id="unitTRId" style="display: none;"> |
| | | <td> |
| | | <span id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()" class="i18n s9w link">Text17</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon70.js"></script> |
| | | <script language="JavaScript"> |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | //var gPolygonText = SGLang.i18n("Text35"); |
| | | //var gPolylineText = SGLang.i18n("Text36"); |
| | | var gDrawPolyClick = null; |
| | | var gEndDrawPoly = DrawPoly; |
| | | var gPopupCaption = ""; |
| | | |
| | | var _AERIAL_REG_NAME = "DistanceMeasurementShowAerial"; |
| | | var _HORIZONTAL_REG_NAME = "DistanceMeasurementShowHorizontal"; |
| | | var _VERTICAL_REG_NAME = "DistanceMeasurementShowVertical"; |
| | | |
| | | var bInEdit; |
| | | var Type = 3; |
| | | var gGeometry = null; |
| | | //---------------- |
| | | function Init() { |
| | | SGWorld.AttachEvent("OnMeasurementDistanceResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | SGWorld.AttachEvent("OnLButtonUp", OnLButtonUp); |
| | | |
| | | var isPM = GetParamValue("pm", "0"); |
| | | if (isPM == "1") { |
| | | $("#unitTRId").hide(); |
| | | $("#createTRId").hide(); |
| | | $("#onGroundDistance").hide(); |
| | | } |
| | | document.getElementById("changeMeasurementUnits").value = SGLang.i18n(""); |
| | | document.getElementById("deleteMeasure").title = SGLang.i18n("Text18"); |
| | | document.getElementById("deleteLastPoint").title = SGLang.i18n("Text19"); |
| | | document.getElementById("snapping").title = SGLang.i18n("Text20"); |
| | | document.getElementById("onGroundDistance").title = SGLang.i18n("Text23"); |
| | | |
| | | ////Turn off CreateMeasurementObject |
| | | //SGWorld.Command.Execute(2225,0); |
| | | |
| | | //var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | //document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | document.getElementById("createMeasurementObject").checked = false; |
| | | CreateMeasurementObject(); |
| | | |
| | | Reset(1, 0); |
| | | |
| | | //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST |
| | | SGWorld.Command.Execute(1035, 0); |
| | | |
| | | SetSnapping(); |
| | | |
| | | //document.getElementById("showAerialDistance").checked = SGWorld.GetOptionParam(_AERIAL_REG_NAME); |
| | | //document.getElementById("showHorizontalDistance").checked = SGWorld.GetOptionParam(_HORIZONTAL_REG_NAME); |
| | | //document.getElementById("showVerticalDistance").checked = SGWorld.GetOptionParam(_VERTICAL_REG_NAME); |
| | | |
| | | Type = getQueryStr("type"); |
| | | if (Type == "1") { |
| | | document.getElementById("showHorizontalDistance").checked = true; |
| | | document.getElementById("showVerticalDistance").checked = false; |
| | | document.getElementById("showAerialDistance").checked = false; |
| | | } else if (Type == "2") { |
| | | document.getElementById("showHorizontalDistance").checked = false; |
| | | document.getElementById("showVerticalDistance").checked = true; |
| | | document.getElementById("showAerialDistance").checked = false; |
| | | } else { |
| | | document.getElementById("showHorizontalDistance").checked = true; |
| | | document.getElementById("showVerticalDistance").checked = true; |
| | | document.getElementById("showAerialDistance").checked = true; |
| | | } |
| | | OnShowAerial(); |
| | | OnShowHorizontal(); |
| | | OnShowVertical(); |
| | | |
| | | //////////////OnShow(); |
| | | EnableDisableButtons(); |
| | | //showVerticalDistance |
| | | } |
| | | |
| | | function getQueryStr(name) { |
| | | var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) { |
| | | return unescape(r[2]); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | //---------------- |
| | | function ShowPopup(ProfileType, ObjID) { |
| | | var CompareStr = ""; |
| | | var CompareMode = 0; |
| | | var Density = 2; |
| | | |
| | | // Remove previos popup |
| | | SGWorld.Window.RemovePopupByCaption(gPopupCaption); |
| | | |
| | | gPopupCaption = SGLang.i18n("Text14") + " " + Date().toString(); |
| | | var url = abspath() + "/../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | |
| | | //var path = location.href.substring(0, location.href.lastIndexOf("/") + 1); |
| | | //var url = path + "../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | |
| | | // var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, SGWorld.Window.Rect.Height * 2 / 3, SGWorld.Window.Rect.Width - 2, SGWorld.Window.Rect.Height / 3 - 55, -1); |
| | | var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, -1000, 100, 100, -1); |
| | | |
| | | popupMsg.Flags = 2 + 32; |
| | | SGWorld.Window.ShowPopup(popupMsg); |
| | | } |
| | | |
| | | function OnShowAerial() { |
| | | SGWorld.SetOptionParam(_AERIAL_REG_NAME, document.getElementById("showAerialDistance").checked); |
| | | } |
| | | |
| | | function OnShowHorizontal() { |
| | | |
| | | SGWorld.SetOptionParam(_HORIZONTAL_REG_NAME, document.getElementById("showHorizontalDistance").checked); |
| | | } |
| | | |
| | | function OnShowVertical() { |
| | | SGWorld.SetOptionParam(_VERTICAL_REG_NAME, document.getElementById("showVerticalDistance").checked); |
| | | } |
| | | |
| | | function OnUnload() { |
| | | var measurementMode = SGWorld.GetParam(9916); |
| | | if (measurementMode == 33326/*ID_MEASURE_HDIST*/ || measurementMode == 33327/*ID_MEASURE_ADIST*/) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | //------------- |
| | | // DrawPoly |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | // create a polyline, under the hidden group, using this geometry and send the objID to the popup |
| | | var lineGroup = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text28"), SGWorld.ProjectTree.HiddenGroupID); // SGWorld.ProjectTree.RootID |
| | | var line = SGWorld.Creator.CreatePolyline(geometry, "#FC8220", 3, lineGroup, "ProfileLine"); |
| | | |
| | | //line.LineStyle.Width = -4; |
| | | //line.SetParam(5440, 1); |
| | | line.Visibility.Show = false; |
| | | |
| | | ShowPopup(0, lineGroup); |
| | | return true; |
| | | } |
| | | |
| | | function OnDeleteMeasure() { |
| | | //alert("aa"); |
| | | Reset(0, 0); |
| | | |
| | | //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST |
| | | SGWorld.Command.Execute(1035, 0); |
| | | |
| | | EnableDisableButtons(); |
| | | //alert("bb"); |
| | | } |
| | | |
| | | function OnInputModeChanged(mode) { |
| | | if (mode == 0) { |
| | | Reset(0, 0); |
| | | //SGWorld.Window.RemovePopupByCaption("Distance Measurement"); |
| | | } |
| | | } |
| | | |
| | | function OnLButtonUp(Flags, X, Y) { |
| | | if ((Flags & 0x0400) == 0) { |
| | | gGeometry = null; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | function EnableDisableButtons() { |
| | | var numPoints = SGWorld.GetParam(9915); |
| | | |
| | | if (numPoints > 0) { |
| | | document.getElementById("deleteMeasure").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteMeasure").style.opacity = 0.3; |
| | | } |
| | | |
| | | if (gGeometry == null) { |
| | | document.getElementById("deleteLastPoint").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("deleteLastPoint").style.opacity = 0.3; |
| | | } |
| | | |
| | | var bEnableTerrainProfile = gGeometry != null; |
| | | |
| | | if (bEnableTerrainProfile) { |
| | | document.getElementById("onGroundDistance").style.opacity = 1; |
| | | } |
| | | else { |
| | | document.getElementById("onGroundDistance").style.opacity = 0.3; |
| | | } |
| | | } |
| | | |
| | | function OnMeasurementResult(rs, SounrceID) { |
| | | rs = rs.replace("Total Aerial Distance:", "æ»ç©ºä¸è·ç¦»ï¼") |
| | | .replace("Total Horizontal Distance:", "æ»æ°´å¹³è·ç¦»ï¼") |
| | | .replace("Total Vertical Distance:", "æ»åç´è·ç¦»ï¼") |
| | | .replace("Total Vertical Distance (First point to last point):", "æ»åç´è·ç¦»ï¼ä»ç¬¬ä¸ç¹å°æåä¸ç¹ï¼ï¼") |
| | | .replace("Slope:", "å¡åº¦ï¼") |
| | | .replace("Slope (First point to last point):", "å¡åº¦ï¼ä»ç¬¬ä¸ç¹å°æåä¸ç¹ï¼ï¼") |
| | | .replace(/km/g, " åç±³") |
| | | .replace(/cm/g, " åç±³") |
| | | .replace(/mm/g, " 毫米") |
| | | .replace(/m/g, " ç±³") |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | //input = textContainer.querySelector('textarea'); |
| | | //input.value = measurementResult; |
| | | textareaSize.innerText = rs; |
| | | |
| | | window.strs = rs.replace(/\t/g, "").replace(/s+/g, "").split("\n"); //.replace(/\\r/g, "") |
| | | switch (Type) { |
| | | //case "1": |
| | | // var dis = strs[1].split("ï¼")[1].replace("\r", "").split(" ")[0]; |
| | | // setText(2, dis); |
| | | // break; |
| | | case "2": |
| | | var ver = strs[2].split("ï¼")[1].replace("\r", "").split(" ")[0]; |
| | | setText(5, ver); |
| | | break; |
| | | //default: |
| | | // var angle = strs[3].split("ï¼")[1].replace("°", ""); |
| | | // setText(4, angle); |
| | | // break; |
| | | } |
| | | |
| | | EnableDisableButtons(); |
| | | return true; |
| | | } |
| | | |
| | | function setText(idx, val) { |
| | | var txtId = SGWorld.ProjectTree.FindItem("å®ä½ç¹\\Text"); |
| | | if (txtId) { |
| | | var obj = SGWorld.ProjectTree.GetObject(txtId); |
| | | var strs = obj.Text.split(","); // 0,0,0,0,0,0,0 |
| | | strs[idx] = val; |
| | | obj.Text = strs.join(","); |
| | | } |
| | | } |
| | | |
| | | function OnChangeMeasurementUnits() { |
| | | SGWorld.Command.Execute(1011, 3); |
| | | } |
| | | |
| | | function CreateMeasurementObject() { |
| | | var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; |
| | | SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); |
| | | } |
| | | |
| | | function ResetButtons() { |
| | | //$("#verticalDistance").removeClass("MenuButtonHighlight"); |
| | | $("#onGroundDistance").removeClass("MenuButtonHighlight"); |
| | | } |
| | | |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | ResetButtons(); |
| | | gGeometry = null; |
| | | try { |
| | | if (gPolyObj != null) |
| | | SGWorld.Creator.DeleteObject(gPolyObj.ID); |
| | | } catch (e) { } |
| | | |
| | | gPolyObj = null; |
| | | GroupID = null; |
| | | |
| | | bDontAskme = false; |
| | | |
| | | $("#lineButton").removeClass("MenuButtonHighlight"); |
| | | $("#areaButton").removeClass("MenuButtonHighlight"); |
| | | $("#groupButton").removeClass("MenuButtonHighlight"); |
| | | $("#clipboardButton").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | if (bInEdit) { |
| | | SGWorld.DetachEvent("OnLButtonClicked", DrawPolyLButtonClicked); |
| | | SGWorld.DetachEvent("OnRButtonUp", DrawPolyRButtonUp); |
| | | SGWorld.DetachEvent("OnFrame", DrawPolyOnFrame); |
| | | SGWorld.DetachEvent("OnInputModeChanged", DrawPolyInputModeChanged); |
| | | } |
| | | bInEdit = false; |
| | | |
| | | //if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | // SGWorld.Window.SetInputMode(0); |
| | | } |
| | | |
| | | function OnEndDrawMeasurement(geometry) { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | |
| | | //-------------- |
| | | // CreateObjects |
| | | //-------------- |
| | | function OnGroundDistance() { |
| | | |
| | | DrawPoly(gGeometry, 0, 0); |
| | | return; |
| | | } |
| | | |
| | | function SetSnapping() { |
| | | if ($("#snapping").hasClass("MenuButtonHighlight")) |
| | | SGWorld.SetParam(9912, 1); |
| | | else |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | |
| | | function OnSnapping() { |
| | | //$("#snapping").removeClass("MenuButtonHighlight"); |
| | | |
| | | if ($(event.srcElement).hasClass("MenuButtonHighlight")) { |
| | | $("#snapping").removeClass("MenuButtonHighlight"); |
| | | SGWorld.SetParam(9912, 0); |
| | | } |
| | | else { |
| | | SGWorld.SetParam(9912, 1); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | function OnVerticalDistance() |
| | | { |
| | | if( $(event.srcElement).hasClass("MenuButtonHighlight")) |
| | | { |
| | | Reset(0,0); |
| | | return; |
| | | } |
| | | |
| | | Reset(0,0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(1036,0); |
| | | |
| | | SetSnapping(); |
| | | } |
| | | */ |
| | | |
| | | function OnDeleteLastPoint() { |
| | | SGWorld.SetParam(8335, 0); |
| | | EnableDisableButtons(); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | <!--Sig:000000408JYdtBwnEhYwKwSHBToL4ROTBsQ92IumwfiHRg2dcUb.aSdjqmR2hWrrJjiq7xBbYr6MVX764LIe8a6004zvXaJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang,{ |
| | | ToolTitle: "æ³°çæ°åç§æï¼åäº¬ï¼æéå
¬å¸", |
| | | ToolName: "å¡åº¦åæ", |
| | | help: "帮å©", |
| | | Text0: "å建为", |
| | | Text1: "ç»", |
| | | Text2: "å¾å± (屿¹å¼)", |
| | | Text3: "å¾å± (æµæ¹å¼)", |
| | | Text8: "é´è·", |
| | | Text9: "ç±³", |
| | | Text13: "å¡åº¦åæ", |
| | | Text16: "å¨å°å½¢ä¸åå»å·¦é®å建ä¸ä¸ªå¤è¾¹å½¢/æçº¿ï¼å³é®ç»ææä½ã", |
| | | Text18: "è·é <br>线", |
| | | Text19: "æ£å¨è®¡ç®æ¥è¯¢ç¹", |
| | | Text20: "å¡åº¦åæå·¥å
·å³å°å建å¤äº ", |
| | | Text21: " 对象ãè¿ä¸ªè¿ç¨ä¼è±è´¹å¾é¿æ¶é´ï¼æ¯å¦è¦ç»§ç»ï¼", |
| | | Text24: "请ä»å·¥ç¨æ ä¸éæ©ä¸ä¸ªç»æä¸ä¸ªå¾å±", |
| | | Text25: "计ç®å¡åº¦å¼æ¶åºéã", |
| | | Text26: "æ£å¨è®¡ç®å¡åº¦ç¹", |
| | | Text27: "ç¹", |
| | | Text31: "æ£å¨åæç¹ ", |
| | | Text32: "å¯è§è·ç¦»", |
| | | Text33: "è·é线", |
| | | Text34: "å¡«å
åºå", |
| | | Text35: "éæ©<br>ç»", |
| | | Text36: "ä»<br>åªè´´æ¿", |
| | | Text43: "å¡åº¦å¼", |
| | | Text44: "å¡å", |
| | | Text45: "é«åº¦", |
| | | Text46: "IconColor", |
| | | Text47: "æ æ³å建å¡åº¦åæãéæ©çç»ä¸æ²¡æé¢/线对象", |
| | | Text48: "æ æ³å建å¡åº¦åæãåªè´´æ¿ä¸æ²¡æé¢/线对象", |
| | | |
| | | Text999: "" |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | ol { |
| | | padding: 0; |
| | | margin: 5px 0 0 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td class="ToolTopArea" id="TopAreaTD" width="100%" valign="middle"> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| | | <tr> |
| | | <td width="55px"><img style="margin-left:5px;" src="ToolIcon.png" alt="" /></td> |
| | | <td id="TitleTD" align="center" class="s12w i18n">ToolName</td> |
| | | <!--<td align="right" id="CloseHelpTd"><img style="margin-right:5px;" alt="" src="../CommonImg/help.png" border="0" class="i18n" alt="help" title="help" onclick="DisplayHelpPopup6(SGLang.i18nFile('help.html'),SGLang.i18n('help'))" style="cursor: pointer;"></td>--> |
| | | </tr> |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ToolTopSeperator"></td> |
| | | </tr> |
| | | <tr class="s8"> |
| | | <td> |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="2"> |
| | | <tr class='TableOtherLine'> |
| | | <td class="s8b"> |
| | | <label for="createAs" class="i18n">Text0</label> |
| | | </td> |
| | | <td align="left"> |
| | | <select id="createAs"> |
| | | <option class="i18n" value="Layer">Text2</option> |
| | | <option class="i18n" value="LayerStreaming" selected="selected">Text3</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr class='TableOtherLine'> |
| | | <!-- Distance between points--> |
| | | <td class="s8b "> |
| | | <span id="DistanceText" class="i18n">Text8</span> |
| | | </td> |
| | | <td align="left"> |
| | | <input id="distance" type="text" value="10" size="7" onchange="CheckNumberEx(distance,10,0.01,999999)" /> |
| | | <span class="i18n">Text9</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="center" class="ToolButtonsArea"> |
| | | <button id="areaButton" class="MenuButton" onclick="CreateObjects(2);"><img src="../CommonImg/polygon.png" /><br /><span class="i18n">Text34</span></button> |
| | | <button id="lineButton" class="MenuButton MenuButtonLast" onclick="CreateObjects(1);"> <img src="../CommonImg/polyline.png" /><br /> <span class="i18n">Text33</span></button> |
| | | <!--<button id="groupButton" class="MenuButton" onclick="SelectGroupObjects()"><img src="../CommonImg/group.png" /><br /><span class="i18n">Text35</span></button> |
| | | <button id="clipboardButton" class="MenuButton MenuButtonLast" onclick="SelectClipboardObjects()"><img src="../CommonImg/clipboard.png" /><br /><span class="i18n">Text36</span></button>--> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <div> |
| | | <ol class="msonormal"> |
| | | <li style="list-style-type: none;">å¾ä¾è¯´æï¼</li> |
| | | <li>天èè² = å¡åº¦å¼ä½äº6度</li> |
| | | <li>èè² = å¡åº¦å¼å¨6-17度ä¹é´</li> |
| | | <li>ç»¿è² = å¡åº¦å¼å¨12-31度ä¹é´</li> |
| | | <li>é»è² = å¡åº¦å¼å¨31-38度ä¹é´</li> |
| | | <li>æ©è² = å¡åº¦å¼å¨38-45度ä¹é´</li> |
| | | <li>çº¢è² = å¡åº¦å¼å¤§äº45度</li> |
| | | </ol> |
| | | </div> |
| | | |
| | | |
| | | <script src="../jquery/jquery-1.10.2.js" type="text/javascript"></script> |
| | | <script language="javascript" src="../ToolsCommon73.js"></script> |
| | | |
| | | <script language="JavaScript"> |
| | | var SGWorld = new ActiveXObject("TerraExplorerX.SGWorld71"); |
| | | |
| | | |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | var gPolyObj = null; |
| | | var gPolygonText = SGLang.i18n("Text35"); |
| | | var gPolylineText = SGLang.i18n("Text36"); |
| | | var gDrawPolyClick = null; |
| | | var gEndDrawPoly = DrawPoly; |
| | | |
| | | //** |
| | | |
| | | var gFoundLine = false; |
| | | var PointLayer; |
| | | var gPositionsArray = []; |
| | | var gSlopeValueArray = []; |
| | | var gSlopeDirectionArray = []; |
| | | var gAltitudeArray = []; |
| | | var gPointsIndex = 0; |
| | | var gVisibilityDistance; |
| | | |
| | | var bInEdit; |
| | | var bFirstTime; |
| | | var bDontAskme; |
| | | ///var gTotalHours; |
| | | var rootId; |
| | | |
| | | Date.prototype.stdTimezoneOffset = function () { |
| | | var jan = new Date(this.getFullYear(), 0, 1); |
| | | var jul = new Date(this.getFullYear(), 6, 1); |
| | | return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); |
| | | } |
| | | |
| | | Date.prototype.dst = function () { |
| | | return this.getTimezoneOffset() < this.stdTimezoneOffset(); |
| | | } |
| | | |
| | | //-------------- |
| | | // Init |
| | | function Init() { |
| | | if (GetParamValue("inSG", "") == "1") { |
| | | $("#TopAreaTD").attr("height", "57"); |
| | | $("#TitleTD").attr("align", "left"); |
| | | $("#CloseHelpTd").attr("display", "none"); |
| | | } |
| | | gDrawPolyAltitudeType = 3; // draw lines and polygon as absolute lines |
| | | rootId = getGid(); //GetParamValue("rootId", SGWorld.ProjectTree.RootID); |
| | | Reset(1, 0); |
| | | } |
| | | function getGid() { |
| | | var gid = SGWorld.ProjectTree.FindItem("ç¨æ·æ°æ®\\ä¸´æ¶æ°æ®"); |
| | | if (!gid) { |
| | | var pid = SGWorld.ProjectTree.FindItem("ç¨æ·æ°æ®"); |
| | | if (!pid) { |
| | | pid = SGWorld.ProjectTree.CreateGroup("ç¨æ·æ°æ®", ""); |
| | | } |
| | | gid = SGWorld.ProjectTree.CreateGroup("ä¸´æ¶æ°æ®", pid); |
| | | } |
| | | |
| | | return gid; |
| | | } |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | |
| | | try { |
| | | if (gPolyObj != null) |
| | | SGWorld.Creator.DeleteObject(gPolyObj.ID); |
| | | } catch (e) { } |
| | | |
| | | if (gPointsIndex > 0) { |
| | | if (AnalyzePoints()) |
| | | DrawPoints(); |
| | | } |
| | | |
| | | if (PointLayer != null) { |
| | | PointLayer.Save(); |
| | | } |
| | | gPolyObj = null; |
| | | GroupID = null; |
| | | PointLayer = null; |
| | | gPointsIndex = 0; |
| | | gPositionsArray = []; |
| | | gSlopeValueArray = []; |
| | | gSlopeDirectionArray = []; |
| | | gAltitudeArray = []; |
| | | |
| | | // gSlopeArray = []; |
| | | gVisibilityDistance = 3000; |
| | | |
| | | bDontAskme = false; |
| | | |
| | | $("#lineButton").removeClass("MenuButtonHighlight"); |
| | | $("#areaButton").removeClass("MenuButtonHighlight"); |
| | | $("#groupButton").removeClass("MenuButtonHighlight"); |
| | | $("#clipboardButton").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | bInEdit = false; |
| | | |
| | | if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | //-------------- |
| | | // CreateObjects |
| | | //-------------- |
| | | function CreateObjects(method) { |
| | | if (!bInEdit) { |
| | | bInEdit = true; |
| | | |
| | | |
| | | if (drawing.drawingEditMode != -1) { // already in drawing . Reset everyting |
| | | drawing.abort(); |
| | | } |
| | | else { |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text16"), -1); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | if (method == 1) { |
| | | drawing.drawPolyline({ |
| | | style: { |
| | | lineColor: "#ffffff", |
| | | lineWidth: 3, |
| | | }, |
| | | altitudeMethod: 3, // altitudeMethod - use 2 of "OnTerrain" (drape on terrain) and 3 for "Absolute" (above mean sea level). Currently other methods are not supported |
| | | deleteWhenExit: true, // |
| | | //parentGoupID: volumeGroup, |
| | | saveOnExit: false, // save the polyline/polygon when exiting the project. Default = false |
| | | onFinish: DrawPoly, |
| | | onAbort: Reset |
| | | }); |
| | | } |
| | | else { |
| | | drawing.drawPolygon({ |
| | | style: { |
| | | lineColor: "#ffffff", |
| | | lineWidth: 3, |
| | | }, |
| | | altitudeMethod: 3, // altitudeMethod - use 2 of "OnTerrain" (drape on terrain) and 3 for "Absolute" (above mean sea level). Currently other methods are not supported |
| | | deleteWhenExit: true, // |
| | | //parentGoupID: volumeGroup, |
| | | saveOnExit: false, // save the polyline/polygon when exiting the project. Default = false |
| | | onFinish: DrawPoly, |
| | | onAbort: Reset |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //----------- |
| | | // SelectGroupObjects |
| | | function SelectGroupObjects() { |
| | | var node = SGWorld.ProjectTree.GetNextItem("", 10); |
| | | if (node == 0 || !(SGWorld.ProjectTree.IsGroup(node) || SGWorld.ProjectTree.IsLayer(node))) { |
| | | alert(SGLang.i18n("Text24")); |
| | | return; |
| | | } |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19")); |
| | | gFoundLine = false; |
| | | searchGeometries2(node, DrawPoly); |
| | | if (!gFoundLine) |
| | | alert(SGLang.i18n("Text47")); |
| | | |
| | | Reset(0, 0); |
| | | } |
| | | //----------- |
| | | // SelectClipboardObjects |
| | | function SelectClipboardObjects() { |
| | | |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19"), -1); |
| | | gFoundLine = false; |
| | | searchGeometriesClipboard(DrawPoly); |
| | | if (!gFoundLine) |
| | | alert(SGLang.i18n("Text48")); |
| | | Reset(0, 0); |
| | | } |
| | | |
| | | //------------- |
| | | // DrawPoly |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19")); |
| | | SGWorld.ProjectTree.EnableRedraw(0); |
| | | |
| | | if (!ValidateInput()) |
| | | return false; |
| | | |
| | | if (type == 1) { |
| | | if (!DrawOnPolyline(geometry, type, altitudeType)) |
| | | return false; |
| | | } |
| | | else if (type == 2) { |
| | | if (!DrawOnPolygon(geometry, type, altitudeType)) |
| | | return false; |
| | | } |
| | | else // Selected points |
| | | { |
| | | var tmpCoord = geometry.Copy(); // to avoid changes in the CurrCoord value in the DrawObject function |
| | | //AddPoint(tmpCoord); |
| | | |
| | | } |
| | | |
| | | |
| | | return true; |
| | | |
| | | } |
| | | //---- |
| | | // DrawOnPolyline |
| | | function DrawOnPolyline(polylineGeometry, type, altitudeType) { |
| | | var lastCoord; |
| | | var currCoord; |
| | | var tmpCoord; |
| | | var SegmentLength; |
| | | var lastSegmentLenght; |
| | | gFoundLine = true; |
| | | var distance = validateNumber($("#distance").val()); |
| | | var LeftOver = 0; |
| | | var totlaDistance = 0; |
| | | |
| | | for (var k = 1; k < polylineGeometry.Points.count; k++) // calculate total distance |
| | | { |
| | | lastCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k - 1).X, polylineGeometry.Points.Item(k - 1).Y, polylineGeometry.Points.Item(k - 1).Z, altitudeType); |
| | | currCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k).X, polylineGeometry.Points.Item(k).Y, polylineGeometry.Points.Item(k).Z, altitudeType); |
| | | totlaDistance += lastCoord.DistanceTo(currCoord); |
| | | } |
| | | |
| | | var firstSegment = true; |
| | | for (var i = 1; i < polylineGeometry.Points.count; i++) { |
| | | lastCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(i - 1).X, polylineGeometry.Points.Item(i - 1).Y, polylineGeometry.Points.Item(i - 1).Z, altitudeType); |
| | | currCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(i).X, polylineGeometry.Points.Item(i).Y, polylineGeometry.Points.Item(i).Z, altitudeType); |
| | | |
| | | lastCoord.yaw = lastCoord.AimTo(currCoord).yaw; |
| | | lastCoord = lastCoord.MoveToward(currCoord, -LeftOver); |
| | | |
| | | if (firstSegment) { |
| | | tmpCoord = lastCoord.Copy(); |
| | | if (AddToPointsList(tmpCoord) == false) |
| | | return false; |
| | | } |
| | | SegmentLength = lastCoord.DistanceTo(currCoord); |
| | | lastSegmentLenght = SegmentLength; |
| | | |
| | | while (SegmentLength >= distance && lastSegmentLenght >= SegmentLength) { |
| | | lastSegmentLenght = SegmentLength; |
| | | lastCoord = lastCoord.MoveToward(currCoord, distance); |
| | | tmpCoord = lastCoord.Copy(); |
| | | if (AddToPointsList(tmpCoord) == false) |
| | | return false; |
| | | SegmentLength = lastCoord.DistanceTo(currCoord); |
| | | } |
| | | |
| | | LeftOver = SegmentLength; |
| | | |
| | | firstSegment = false; |
| | | } |
| | | // fix for bug #14439 |
| | | //Restore3DModelToGroundObject(); |
| | | return true; |
| | | } |
| | | //----------- |
| | | // DrawOnPolygon |
| | | function DrawOnPolygon(polygonGeometry, type, altitudeType) { |
| | | var envelope = polygonGeometry.Envelope; // Multi polygon evnelope (min/max) |
| | | |
| | | gFoundLine = true; |
| | | //// var pos = SGWorld.Navigate.GetPosition(); |
| | | CreateTheObjects = true; |
| | | var MinX = Math.min(envelope.Rings(0).Points(0).x, envelope.Rings(0).Points(2).x); |
| | | var MaxX = Math.max(envelope.Rings(0).Points(0).x, envelope.Rings(0).Points(2).x); |
| | | var MinY = Math.min(envelope.Rings(0).Points(0).y, envelope.Rings(0).Points(2).y); |
| | | var MaxY = Math.max(envelope.Rings(0).Points(0).y, envelope.Rings(0).Points(2).y); |
| | | |
| | | var XDist = SGWorld.CoordServices.GetDistance(MinX, MinY, MaxX, MinY); |
| | | var YDist = SGWorld.CoordServices.GetDistance(MinX, MinY, MinX, MaxY); |
| | | var distanceVal = validateNumber($("#distance").val()); |
| | | |
| | | var currCoord; |
| | | switch (polygonGeometry.GeometryType) { |
| | | case 3: // ipolygon |
| | | currCoord = SGWorld.Creator.CreatePosition(MinX, MinY, polygonGeometry.Rings(0).Points.Item(0).Z, altitudeType, 0); |
| | | break; |
| | | case 6: // imultipolygon |
| | | currCoord = SGWorld.Creator.CreatePosition(MinX, MinY, polygonGeometry.Item(0).Rings(0).Points.Item(0).Z, altitudeType, 0); |
| | | break; |
| | | } |
| | | |
| | | var currCoordAlt = currCoord.Altitude; |
| | | |
| | | while (currCoord.x < MaxX) { |
| | | currCoord.y = MinY; |
| | | while (currCoord.y < MaxY) { |
| | | var pointGeometry = SGWorld.Creator.GeometryCreator.CreatePointGeometry([currCoord.x, currCoord.y, currCoord.Altitude]); |
| | | if (polygonGeometry.SpatialRelation.Intersects(pointGeometry)) { |
| | | var tmpCoord = currCoord.Copy(); // to avoid changes in the CurrCoord value in the DrawObject function |
| | | if (AddToPointsList(tmpCoord) == false) |
| | | return false; |
| | | } |
| | | currCoord = currCoord.Move(distanceVal, 0, 0); |
| | | currCoord.Altitude = currCoordAlt; |
| | | } |
| | | currCoord = currCoord.Move(distanceVal, 90, 0); |
| | | currCoord.Altitude = currCoordAlt; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | //------------ |
| | | // AddToPointsList |
| | | function AddToPointsList(position) { |
| | | position.Altitude = 0; |
| | | position.AltitudeType = 0; |
| | | AddPoint(position); |
| | | } |
| | | //------------- |
| | | // AddPoint |
| | | function AddPoint(pos) { |
| | | var position1 = pos.ToAbsolute(0); |
| | | gPositionsArray[gPointsIndex] = position1; |
| | | gSlopeValueArray[gPointsIndex] = 0; |
| | | gSlopeDirectionArray[gPointsIndex] = 0; |
| | | gAltitudeArray[gPointsIndex] = 0; |
| | | gPointsIndex += 1; |
| | | if (gPointsIndex % 10 == 0) |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19") + ": " + gPointsIndex); |
| | | |
| | | } |
| | | //------------ |
| | | // AnalyzePoints |
| | | function AnalyzePoints() { |
| | | var totalPoints = gPointsIndex; |
| | | var CreateTheObjects = true; |
| | | if (totalPoints > 20000) |
| | | CreateTheObjects = confirm(SGLang.i18n("Text20") + totalPoints + SGLang.i18n("Text21")); |
| | | if (!CreateTheObjects) |
| | | return false; |
| | | for (var i = 0; i < gPointsIndex; i++) { |
| | | CalculateSlope(i); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | //------------ |
| | | //CalculateSlope |
| | | function CalculateSlope(slopeIndex) { |
| | | try { |
| | | |
| | | var pos = gPositionsArray[slopeIndex].Copy(); |
| | | var distance = validateNumber($("#distance").val()); |
| | | |
| | | var slopeSampling = 20; |
| | | var getGroundHeighType = 2; |
| | | |
| | | |
| | | //Groud height in mouse location |
| | | var groundInfo = SGWorld.Terrain.GetGroundHeightInfo(pos.X, pos.Y, getGroundHeighType, true); |
| | | gPositionsArray[slopeIndex].Altitude = groundInfo.Position.Altitude |
| | | //Ground Height around mouse location |
| | | var i; |
| | | var maxPositiveAlt = -9999999; |
| | | var maxPositivePos; |
| | | var maxNegativeAlt = 9999999; |
| | | var maxNegativePos; |
| | | var destGroundInfo; |
| | | var headingPos; |
| | | var newPos = pos.Copy(); |
| | | // find min/max slopes |
| | | for (i = 0; i < 360; i = i + slopeSampling) { |
| | | newPos = pos.Copy(); |
| | | newPos.Yaw = i; |
| | | SGWorld.CoordServices.MoveCoordEx(newPos, distance / 2, 0, 0); |
| | | destGroundInfo = SGWorld.Terrain.GetGroundHeightInfo(newPos.X, newPos.Y, getGroundHeighType, true); |
| | | |
| | | if (destGroundInfo.Position.Altitude > maxPositiveAlt) { |
| | | maxPositiveAlt = destGroundInfo.Position.Altitude; |
| | | maxPositivePos = destGroundInfo.Position.Copy(); |
| | | } |
| | | |
| | | if (destGroundInfo.Position.Altitude < maxNegativeAlt) { |
| | | maxNegativeAlt = destGroundInfo.Position.Altitude; |
| | | maxNegativePos = destGroundInfo.Position.Copy(); |
| | | } |
| | | } |
| | | |
| | | |
| | | maxPositivePos = maxPositivePos.AimTo(maxNegativePos); |
| | | gSlopeValueArray[slopeIndex] = maxPositivePos.Pitch.toFixed(2); |
| | | gSlopeDirectionArray[slopeIndex] = maxPositivePos.Yaw.toFixed(2); |
| | | gAltitudeArray[slopeIndex] = pos.Altitude; |
| | | |
| | | if (slopeIndex % 10 == 0) { |
| | | var prec = (slopeIndex / gPointsIndex) * 100; |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text26") + ": " + slopeIndex + "[" + prec.toFixed(1) + "%]"); |
| | | } |
| | | |
| | | } |
| | | catch (err) { alert(SGLang.i18n("Text25") + err); Reset(0, 0); } |
| | | } |
| | | //------------ |
| | | // DrawPoints |
| | | function DrawPoints() { |
| | | for (var i = 0; i < gPointsIndex; i++) { |
| | | DrawObject(gPositionsArray[i], i); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //--------- |
| | | // DrawObject |
| | | function DrawObject(position, index) { |
| | | var node; |
| | | var TEObj; |
| | | var ObjType = "ImageLabel"; |
| | | var distance = validateNumber($("#distance").val()); |
| | | var size = distance / 200; |
| | | |
| | | var noiseVal = 0; |
| | | var createAs = $("#createAs").val(); |
| | | var PointVisible; |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text31") + " " + index, -1); |
| | | |
| | | var SlopeValue = Math.round(gSlopeValueArray[index] * 10) / 10; |
| | | var SlopeValueAbs = Math.abs(SlopeValue); |
| | | var SlopeDirection = Math.round(gSlopeDirectionArray[index] * 10) / 10; |
| | | var Altitude = Math.round(position.Altitude * 10) / 10; |
| | | |
| | | var IconColor = 0; // red + green * 256 + blue * 65536; |
| | | if (SlopeValueAbs > 45) |
| | | IconColor = 255 + 0 * 256 + 0 * 65536; // red |
| | | else if (SlopeValueAbs > 38) |
| | | IconColor = 244 + 167 * 256 + 68 * 65536; // orange |
| | | else if (SlopeValueAbs > 31) |
| | | IconColor = 255 + 255 * 256 + 0 * 65536; // yellow |
| | | else if (SlopeValueAbs > 17) |
| | | IconColor = 0 + 255 * 256 + 0 * 65536; // green |
| | | else if (SlopeValueAbs > 6) |
| | | IconColor = 0 + 0 * 256 + 255 * 65536; // blue |
| | | else |
| | | IconColor = 64 + 255 * 256 + 255 * 65536; // blue |
| | | |
| | | if (createAs != "Group") { // Create a feature layer |
| | | if (PointLayer == null) { |
| | | CreateGroupOrLayer(); |
| | | |
| | | // style the feature group |
| | | if (featureLayerStyles[ObjType] != null) { |
| | | var result = featureLayerStyles[ObjType](size, abspath() + "/arrow.png", "[" + SGLang.i18n("Text46") + "]"); |
| | | if (result === false) |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | PointLayer.FeatureGroups.Point.CreateFeature([position.X, position.Y, position.Altitude + distance / 20], SlopeValue + ";" + SlopeDirection + ";" + Altitude + ";" + IconColor); |
| | | } |
| | | |
| | | return true; |
| | | |
| | | } |
| | | //---------- |
| | | // CreateGroupOrLayer |
| | | function CreateGroupOrLayer() { |
| | | |
| | | var distance = validateNumber($("#distance").val()); |
| | | |
| | | if (PointLayer == null) { |
| | | var postfix = new Date().getTime(); |
| | | var LayerName = SGLang.i18n("Text13"); |
| | | PointLayer = SGWorld.Creator.CreateNewFeatureLayer(LayerName, LayerGeometryType.LGT_POINT, "FileName=SlopeMapQuery" + postfix + ".shp;TEPlugName=OGR;", rootId); |
| | | PointLayer.Streaming = $("#createAs").val() == "LayerStreaming"; |
| | | PointLayer.BlockWidth = distance * 60; |
| | | PointLayer.Refresh(); |
| | | PointLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text43"), 2, 20, 1); // Slope Value |
| | | PointLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text44"), 2, 20, 1); // Slope Direction |
| | | PointLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text45"), 2, 20, 1); // Altitude |
| | | PointLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text46"), 1, 20, 0); // icon color |
| | | PointLayer.DataSourceInfo.Attributes.ImportAll = true; |
| | | PointLayer.Visibility.MaxVisibilityDistance = gVisibilityDistance; |
| | | // style the feature group |
| | | PointLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_LABEL; |
| | | |
| | | } |
| | | |
| | | } |
| | | var featureLayerStyles = { |
| | | |
| | | "ImageLabel": function (size, param, param2) { |
| | | PointLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_IMAGE_LABEL; |
| | | PointLayer.FeatureGroups.Point.SetProperty("Image file", param); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Image Color", param2); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Lock Mode", 1); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Limit Growth", false); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Scale", size); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Altitude Method", 1); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Pivot Alignment", 17); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Yaw", " [" + SGLang.i18n("Text44") + "]"); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Pitch", "<[" + SGLang.i18n("Text43") + "]>"); |
| | | |
| | | PointLayer.FeatureGroups.Point.SetProperty("Altitude Method", 1); |
| | | PointLayer.FeatureGroups.Point.SetProperty("Tool Tip", SGLang.i18n("Text43") + " [" + SGLang.i18n("Text43") + "]"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //--------------- |
| | | // ValidateInput |
| | | function ValidateInput() { |
| | | if ($("#startTime").val() * 1.0 > $("#endTime").val() * 1.0) { |
| | | alert(SGLang.i18n("Text23")); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | //-------------- |
| | | // CheckNumberEx |
| | | function CheckNumberEx(field, defVal, MinNum, MaxNum) { |
| | | try { |
| | | field.value = validateNumber(field.value); |
| | | |
| | | if (field.value < MinNum) |
| | | field.value = MinNum; |
| | | if (field.value > MaxNum) |
| | | field.value = MaxNum; |
| | | } |
| | | catch (e) { field.value = defVal } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040#oa4DumCFgEJvNDGKOCEFv#JWEDM1VlNQuDtp#0Hysawl4ep07#tF7xF4Xrp6yuhabYKIvDl.cqY4o.bBchWJcJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <html class="helpHtml"> |
| | | <HEAD> |
| | | <TITLE>TerraExplorer Pro - Skyline Software Systems, Inc.</TITLE> |
| | | <LINK REL=StyleSheet HREF="../Style.css" TYPE="text/css"> |
| | | </head> |
| | | <body> |
| | | <table border=0 cellPadding=0 CELLSPACING=0 class="s9" width=100%> |
| | | <tr><td class="s12b" align=center> |
| | | Slope Map Query tool |
| | | </tD></tr> |
| | | <tr><td> |
| | | <br> |
| | | |
| | | <div class=WordSection1> |
| | | |
| | | |
| | | |
| | | <p class=MsoNormal>The Slope Map query tool calculates the slope value in a specified area. The area is defined by a drawn line or polygon, or by a selection of points, lines or polygons.</p> |
| | | <p> |
| | | The output of the analysis is a point feature layer that graphically represents the slope values at different points in the specified area. Each point in the feature layer is color-coded according to the steepness of the elevation model:</P> |
| | | <p class=MsoNormal> |
| | | <li>Sky blue = Slope value is lower than 6 degrees</li> |
| | | <li>Blue = Slope value is between 6 - 17 degrees</li> |
| | | <li>Green = Slope value is between 17 - 31 degrees</li> |
| | | <li>Yellow = Slope value is between 31 - 38 degrees</li> |
| | | <li>Orange = Slope value is between 38 - 45 degrees</li> |
| | | <li>Red = Slope value is greater than 45 degrees</li> |
| | | </p> |
| | | |
| | | <p class=ProcedureHeader style='margin-left:0in;text-indent:0in'><span dir=LTR></span>To |
| | | use the Slope Map Query tool:</p> |
| | | |
| | | <p class=ListFirstLevel>1.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span>Select one of the <b>Create as</b> options:</p> |
| | | |
| | | <table class=SkyTable border=1 cellspacing=0 cellpadding=0 width=535 |
| | | style='width:401.0pt;margin-left:.35in;border-collapse:collapse;border:none'> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Layer (Entire)</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border:solid #4BACC6 1.0pt; |
| | | border-left:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p>Create a |
| | | feature layer under the application's AppData.</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Layer |
| | | (Streaming)</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Create a |
| | | streaming feature layer under the application's AppData.</p> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | |
| | | <p class=MsoNormal> </p> |
| | | |
| | | <p class=ListFirstLevel>2.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span>Enter the following parameters:</p> |
| | | |
| | | <table class=SkyTable border=1 cellspacing=0 cellpadding=0 width=535 |
| | | style='width:401.0pt;margin-left:.35in;border-collapse:collapse;border:none'> |
| | | |
| | | |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Spacing</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal >Determines the horizontal and vertical spacing (in meters) between query points in the area for which the slope is being calculated.</p> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | |
| | | <p class=ListFirstLevel>3.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span> Select one of the following methods of designating the area for which the slope query should be calculated: |
| | | </p> |
| | | <ul> |
| | | <li><b>Follow Line</b> - Query points are created along the drawn line. |
| | | </li> |
| | | <li><b>Fill Area</b> - Query points are created inside the drawn polygon. |
| | | </li> |
| | | |
| | | <li><b>Selected Group</b> - Query points are created at all points, along all lines, or inside all polygons, in the selected group. Select the required group from the Project Tree, and then click <b>Selected Group</b>. |
| | | </li> |
| | | |
| | | <li><b>From Clipboard</b> - Query points are created for all clipboard objects. Copy the required objects to the clipboard, and click <b>From Clipboard</b>. |
| | | </li> |
| | | |
| | | </ul> |
| | | |
| | | </div> |
| | | </td></tr> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040.s29lMoBvp#OfAWfHxrPyu5M9n9nR7P6LQJBjzkAdKtri1NLepCuxnYhZt5JM0fkMz3hCmjwEuDhkzFQuJKEXMJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang,{ |
| | | ToolTitle: "SkylineGlobe - Skyline Software Systems, Inc.", |
| | | ToolName: "Terrain Profile", |
| | | help: "Help", |
| | | Text0: "Mode", |
| | | Text1: "Normal", |
| | | Text2: "Compare", |
| | | Text3: "Calculating profile", |
| | | Text4: "Terrain profile calculation was aborted", |
| | | Text5: "Elevation Layer", |
| | | Text8: "Spacing", |
| | | Text9: "meters", |
| | | Text10: "Quality", |
| | | Text11: "Medium", |
| | | Text12: "High", |
| | | Text13: "TerrainProfile", |
| | | Text14: "TerrainProfile", |
| | | Text15: "line ", |
| | | Text16: "Left click on the terrain to draw a polygon/Polyline. Right click to finish operation.", |
| | | Text18: "Follow <br>Line", |
| | | Text19: "Calculating query points", |
| | | Text20: "Terrain Profile tool cannot create more than 10 profiles. Operation aborted.", |
| | | Text21: " objects. This procedure may take considerable time. Do you want to continue?", |
| | | Text24: "Please select a group or a layer from the project tree", |
| | | Text25: "Error while calculating elevation values.", |
| | | Text26: "Please select an elevation layer from the list", |
| | | Text27: "Point", |
| | | Text28: "TerrainProfile-FollowLine", |
| | | Text29: "Cannot generate terrain profile. The clipboard does not contain Polygon/Polyline objects.", |
| | | Text31: "Analyzing point ", |
| | | Text32: "Visibility Distance", |
| | | Text33: "Follow<br>Line", |
| | | Text34: "Fill <br>Area", |
| | | Text35: "Selected<br>Group", |
| | | Text36: "From<br>Clipboard", |
| | | Text37: "<u>Refesh list</u>", |
| | | Text40: "<b>Export to Layer</b>", |
| | | Text43: "Distance", |
| | | Text44: "Line", |
| | | Text45: "Elevation", |
| | | Text46: "Color", |
| | | Text47: "Slope", |
| | | Text48: "Min / Max Elevation", |
| | | Text49: "Min / Max Slope", |
| | | Text50: "Waypoint", |
| | | Text51: "Unit:", |
| | | Text52: "<b>meters</b>", |
| | | Text53: "<b>feet</b>", |
| | | Text54: "G_Dist", |
| | | Text55: "H_Dist", |
| | | Text56: "Cannot generate terrain profile. The selected group does not contain Polygon/Polyline objects", |
| | | Text57: "m", |
| | | Text58: "Surface Distance", |
| | | Text59: "ft", |
| | | Text60: "Sampling Length", |
| | | Text61: "Horizontal Distance", |
| | | Text62: "Object Name", |
| | | TextAbort: " (Esc to abort)", |
| | | |
| | | |
| | | Text999: "" |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | <HTML lang=en-US><HEAD> |
| | | <META http-equiv=Content-Type content="text/html; charset=utf-8"><TITLE>TerraExplorer Pro - Skyline Software Systems, Inc.</TITLE><LINK |
| | | href="../Style.css" type=text/css rel=StyleSheet> |
| | | <META content="MSHTML 6.00.2900.5512" name=GENERATOR></HEAD> |
| | | <BODY> |
| | | <TABLE class=s9 cellSpacing=0 cellPadding=0 width="100%" border=0> |
| | | <TBODY> |
| | | <TR> |
| | | <TD class=s12b align=middle>Terrain Profile tool </TD></TR> |
| | | <TR> |
| | | <TD><BR> |
| | | <DIV class=WordSection1> |
| | | <P class=MsoNormal>The Terrain Profile tool displays the terrain elevation |
| | | profile along a defined path, and related information on this profile such |
| | | as maximum and minimum elevation values and slope. The terrain profile can |
| | | also compare between the base terrain and an elevation layer.</P> |
| | | <P class=ProcedureHeader style="MARGIN-LEFT: 0in; TEXT-INDENT: 0in"><SPAN |
| | | dir=ltr></SPAN>To use the Terrain Profile tool:</P> |
| | | <P class=ListFirstLevel>1.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>Enter the following parameters:</P> |
| | | <TABLE class=SkyTable |
| | | style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN-LEFT: 0.35in; BORDER-LEFT: medium none; WIDTH: 401pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" |
| | | cellSpacing=0 cellPadding=0 width=535 border=1> |
| | | <TBODY> |
| | | <TR> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: #4bacc6 1pt solid; WIDTH: 86.05pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=115> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">Mode</P></TD> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: medium none; WIDTH: 314.95pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=420> |
| | | <P class=MsoNormal>Select the profile mode. </P> |
| | | <P class=MsoNormal><B>Normal</B> â Display a profile only for the |
| | | selected polyline(s). </P> |
| | | <P class=MsoNormal><B>Compare</B> â Compare the selected polyline's |
| | | profile to that of a specified elevation layer. </P></TD></TR> |
| | | <TR> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: medium none; PADDING-LEFT: 5.75pt; BACKGROUND: #d2eaf1; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: #4bacc6 1pt solid; WIDTH: 86.05pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=115> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">Quality</P></TD> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: medium none; PADDING-LEFT: 5.75pt; BACKGROUND: #d2eaf1; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: medium none; WIDTH: 314.95pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=420> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">Determines the |
| | | distance between sample points along the polyline for which the |
| | | terrain profile is being calculated. High Quality will yield a more |
| | | accurate result, but take longer to calculate.</P></TD></TR> |
| | | <TR> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: #4bacc6 1pt solid; WIDTH: 86.05pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=115> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">Elevation |
| | | Layer</P></TD> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: medium none; WIDTH: 314.95pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=420> |
| | | <P class=MsoNormal>Select the elevation layer to which to compare |
| | | the defined polyline. This parameter is only available if Compare is |
| | | selected in the Mode field. </P></TD></TR></TBODY></TABLE> |
| | | <P class=ListFirstLevel>2.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>Select one of the following methods of designating the |
| | | polyline(s) for which the terrain profile should be calculated:</P> |
| | | <UL> |
| | | <LI><B>Follow Line</B> - A terrain profile is created along the drawn |
| | | line. In the 3D Window, click the left mouse button to place the line |
| | | waypoints, and right-click to complete the line. |
| | | <LI><B>Selected Group</B> - A terrain profile is created for each of the |
| | | polylines in the selected group. Select the required layer from the |
| | | Project Tree, and then click Selected Group. |
| | | <LI><B>From Clipboard</B> - A terrain profile is created for each of the |
| | | polylines in the clipboard. </LI></UL></DIV></TD></TR></TBODY></TABLE> |
| | | <TABLE> |
| | | <TBODY> |
| | | <TR> |
| | | <TD> |
| | | <P class=ListFirstLevel>3.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>A terrain profile graph opens, displaying the terrain |
| | | elevation profile. </P> |
| | | <P><B>Note: </B>When you click any point on the graph, the corresponding |
| | | point on the polyline in the 3D Window is displayed in the center of the |
| | | screen. </P> |
| | | <P class=ListFirstLevel>4.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>If you want to export the terrain profile to a shapefile |
| | | layer, click <B>Export to Layer</B>. </P> |
| | | <P><B>Note</B>: When a terrain profile created for multiple lines (in a |
| | | group or from clipboard), is exported to a layer, the line color on the |
| | | graph corresponds to the color of the points that make up the line in the |
| | | layer.</P></TD></TR></TBODY></TABLE><BR><SPAN style="FONT-SIZE: 11px">Flot |
| | | graph: copyright (c) 2007-2014 IOLA and Ole Laursen</SPAN> </BODY></HTML> |
| | | |
| | | |
| | | <!--Sig:00000040DTezRrGMwwAbCxkRT8o5seAHJZqH.NHMAB0OCoh5RzTuxLdk#h8LCLv6CdCOUkRTEUsrxzI583r#na4QSzuaMxJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang,{ |
| | | ToolTitle: "SmartEarth - æ³°çæ°åç§æï¼åäº¬ï¼æéå
¬å¸", |
| | | ToolName: "å°å½¢åé¢", |
| | | help: "帮å©", |
| | | Text0: "模å¼", |
| | | Text1: "常è§", |
| | | Text2: "对æ¯", |
| | | Text3: "æ£å¨è®¡ç®åé¢", |
| | | Text4: "å°å½¢åé¢è®¡ç®å·²åæ¶", |
| | | Text5: "é«ç¨å¾å±", |
| | | Text8: "é´è·", |
| | | Text9: "ç±³", |
| | | Text10: "è´¨é", |
| | | Text11: "ä¸", |
| | | Text12: "é«", |
| | | Text13: "å°å½¢åé¢", |
| | | Text14: "å°å½¢åé¢", |
| | | Text15: "线", |
| | | Text16: "å¨å°å½¢ä¸åå»å·¦é®å建ä¸ä¸ªå¤è¾¹å½¢/æçº¿. å³é®ç»ææä½.", |
| | | Text18: "è·é <br>线", |
| | | Text19: "æ£å¨è®¡ç®æ¥è¯¢ç¹", |
| | | Text20: "å°å½¢åé¢å·¥å
·ä¸è½å建å¤äº10个åé¢. æä½ä¸æ¢.", |
| | | Text21: "对象. è¿ä¸ªè¿ç¨ä¼è±è´¹å¾é¿æ¶é´. æ¯å¦è¦ç»§ç»ï¼", |
| | | Text24: "请ä»å·¥ç¨æ ä¸éæ©ä¸ä¸ªç»æä¸ä¸ªå¾å±", |
| | | Text25: "计ç®é«ç¨å¼æ¶åºé", |
| | | Text26: "请ä»åè¡¨éæ©ä¸ä¸ªé«ç¨å¾å±", |
| | | Text27: "ç¹", |
| | | Text28: "å°å½¢åé¢-è·é线", |
| | | Text29: "æ æ³å建å°å½¢åé¢. åªè´´æ¿ä¸æ²¡æé¢/线对象", |
| | | Text31: "æ£å¨åæç¹", |
| | | Text32: "å¯è§è·ç¦»", |
| | | Text33: "è·é<br>线", |
| | | Text34: "è·é <br>é¢", |
| | | Text35: "éæ©<br>ç»", |
| | | Text36: "ä»<br>åªè´´æ¿", |
| | | Text37: "<u>å·æ°å表</u>", |
| | | Text40: "<b>è¾åºä¸ºå¾å±</b>", |
| | | Text43: "è·ç¦»", |
| | | Text44: "线", |
| | | Text45: "é«ç¨", |
| | | Text46: "é¢è²", |
| | | Text47: "å¡åº¦", |
| | | Text48: "æå° / æå¤§é«ç¨", |
| | | Text49: "æå° / æå¤§å¡åº¦", |
| | | Text50: "è·¯å¾ç¹", |
| | | Text51: "åä½:", |
| | | Text52: "<b>ç±³</b>", |
| | | Text53: "<b>è±å°º</b>", |
| | | Text54: "G_Dist", |
| | | Text55: "H_Dist", |
| | | Text56: "æ æ³å建å°å½¢åé¢. éæ©çç»ä¸æ²¡æé¢/线对象", |
| | | Text57: "m", |
| | | Text58: "表é¢è·ç¦»", |
| | | Text59: "ft", |
| | | Text60: "éæ ·é¿åº¦", |
| | | Text61: "æ°´å¹³è·ç¦»", |
| | | Text62: "对象åç§°", |
| | | TextAbort: " (æESCåæ¶)", |
| | | |
| | | |
| | | Text999: "" |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | <HTML lang=zh-CN><HEAD> |
| | | <META http-equiv=Content-Type content="text/html; charset=utf-8"><TITLE>TerraExplorer Pro - æ³°çæ°åç§æï¼åäº¬ï¼æéå
¬å¸</TITLE><LINK |
| | | href="../Style.css" type=text/css rel=StyleSheet> |
| | | <META content="MSHTML 6.00.2900.5512" name=GENERATOR></HEAD> |
| | | <BODY> |
| | | <TABLE class=s9 cellSpacing=0 cellPadding=0 width="100%" border=0> |
| | | <TBODY> |
| | | <TR> |
| | | <TD class=s12b align=middle>å°å½¢åé¢å·¥å
·</TD></TR> |
| | | <TR> |
| | | <TD><BR> |
| | | <DIV class=WordSection1> |
| | | <P class=MsoNormal>å°å½¢åé¢å·¥å
·æ²¿ç䏿¡å®ä¹çè·¯å¾æ¾ç¤ºå°å½¢é«ç¨åé¢åè¿ä¸ªåé¢ç¸å
³çä¿¡æ¯ï¼å¦æå¤§ãæå°é«ç¨å¼åå¡åº¦. |
| | | å°å½¢åé¢ä¹å¯ä»¥å¨åºç¡å°å½¢åä¸ä¸ªé«ç¨å¾å±ä¹é´è¿è¡å¯¹æ¯. </P> |
| | | <P class=ProcedureHeader style="MARGIN-LEFT: 0in; TEXT-INDENT: 0in"><SPAN |
| | | dir=ltr></SPAN>使ç¨å°å½¢åé¢å·¥å
·:</P> |
| | | <P class=ListFirstLevel>1.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>è¾å
¥ä»¥ä¸åæ°:</P> |
| | | <TABLE class=SkyTable |
| | | style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN-LEFT: 0.35in; BORDER-LEFT: medium none; WIDTH: 401pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" |
| | | cellSpacing=0 cellPadding=0 width=535 border=1> |
| | | <TBODY> |
| | | <TR> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: #4bacc6 1pt solid; WIDTH: 86.05pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=115> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">模å¼</P></TD> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: medium none; WIDTH: 314.95pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=420> |
| | | <P class=MsoNormal>éæ©å颿¨¡å¼. </P> |
| | | <P class=MsoNormal><B>常è§</B> â åªæ¾ç¤ºæéæ©æçº¿çåé¢. </P> |
| | | <P class=MsoNormal><B>对æ¯</B> â å°éæ©æçº¿çåé¢åä¸ä¸ªç¹å®çé«ç¨å¾å±è¿è¡å¯¹æ¯. </P></TD></TR> |
| | | <TR> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: medium none; PADDING-LEFT: 5.75pt; BACKGROUND: #d2eaf1; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: #4bacc6 1pt solid; WIDTH: 86.05pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=115> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">è´¨é</P></TD> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: medium none; PADDING-LEFT: 5.75pt; BACKGROUND: #d2eaf1; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: medium none; WIDTH: 314.95pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=420> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">ç¡®å®è¢«è®¡ç®çå°å½¢åé¢ä¸æ²¿çæçº¿çéæ ·ç¹é´è·. |
| | | é«è´¨éå°äº§çæ´ç²¾ç¡®çç»æï¼ä½æ¯èæ¶è¾é¿. </P></TD></TR> |
| | | <TR> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: #4bacc6 1pt solid; WIDTH: 86.05pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=115> |
| | | <P class=MsoNormal |
| | | style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in">é«ç¨å¾å±</P></TD> |
| | | <TD |
| | | style="BORDER-RIGHT: #4bacc6 1pt solid; PADDING-RIGHT: 5.75pt; BORDER-TOP: #4bacc6 1pt solid; PADDING-LEFT: 5.75pt; BACKGROUND: white; PADDING-BOTTOM: 4.3pt; BORDER-LEFT: medium none; WIDTH: 314.95pt; PADDING-TOP: 1.45pt; BORDER-BOTTOM: #4bacc6 1pt solid" |
| | | vAlign=top width=420> |
| | | <P class=MsoNormal>éæ©é«ç¨å¾å±æ¥å¯¹æ¯å®ä¹çæçº¿. åªæå½å¯¹æ¯å¨æ¨¡å¼å段éè¢«éæ©æ¶è¯¥åæ°æææ. |
| | | </P></TD></TR></TBODY></TABLE> |
| | | <P class=ListFirstLevel>2.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>éæ©å¦ä¸æ¹æ³ä¸ºæå®æçº¿è®¡ç®å°å½¢åé¢:</P> |
| | | <UL> |
| | | <LI><B>è·é线</B> - å°å½¢å颿²¿çç»å¶ç线è¿è¡å建. å¨ä¸ç»´çªå£ä¸ï¼ç¹å»é¼ æ 左鮿¥æ¾ç½®çº¿çè·¯å¾ç¹ï¼å³é®ç»æçº¿çå建. |
| | | <LI><B>éæ©ç»</B> - å°å½¢å颿 ¹æ®éä¸ç»å
çæ¯ä¸ªæçº¿è¿è¡å建. ä»å·¥ç¨æ éæ©æéçå¾å±ï¼ç¶åç¹å»éä¸ç». |
| | | <LI><B>ä»åªè´´æ¿</B> - å°å½¢å颿 ¹æ®åªè´´æ¿ä¸çæ¯ä¸ªæçº¿è¿è¡å建. |
| | | </LI></UL></DIV></TD></TR></TBODY></TABLE> |
| | | <TABLE> |
| | | <TBODY> |
| | | <TR> |
| | | <TD> |
| | | <P class=ListFirstLevel>3.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>ä¸ä¸ªå°å½¢åé¢å¾æå¼ï¼æ¾ç¤ºå°å½¢é«ç¨åé¢. </P> |
| | | <P><B>注é: </B>å½ä½ ç¹å»å¾è¡¨ä¸çä»»æç¹ï¼å¨ä¸ç»´çªå£ä¸æçº¿ä¸çç¸åºç¹å°±ä¼å¨å±å¹ä¸å¿æ¾ç¤º. </P> |
| | | <P class=ListFirstLevel>4.<SPAN |
| | | style="FONT: 7pt 'Times New Roman'"> </SPAN><SPAN |
| | | dir=ltr></SPAN>å¦æä½ æ³è¦æå°å½¢åé¢è¾åºä¸ºä¸ä¸ªshapeæä»¶å¾å± ï¼ç¹å»<B>è¾åºä¸ºå¾å±</B>. </P> |
| | | <P><B>注é</B>: å½å建å¤ä¸ªçº¿ï¼å¨ä¸ä¸ªç»éæä»åªè´´æ¿ï¼çå°å½¢åé¢è¾åºä¸ºä¸ä¸ªå¾å±ï¼å¾è¡¨ä¸çº¿çé¢è²ç¸å½äºå¾å±éææçº¿çç¹çé¢è². |
| | | </P></TD></TR></TBODY></TABLE><BR><SPAN style="FONT-SIZE: 11px">æµ®å¨å¾è¡¨: çæææ (c) |
| | | æ³°çæ°åç§æï¼åäº¬ï¼æéå
¬å¸</SPAN> </BODY></HTML> |
| | | |
| | | |
| | | <!--Sig:00000040AmHmKczlNhunv0o0bdci5Wa4myuvgatlxxwl3eMrVcdchVC16wRL63lmUjhjJ6oIbMe6OYsqKxj1YLwvmTL9GCJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang,{ |
| | | ToolTitle: "SkylineGlobe - Skyline Software Systems, Inc.", |
| | | ToolName: "Terrain Profile", |
| | | help: "Help", |
| | | Text0: "Mode", |
| | | Text1: "Normal", |
| | | Text2: "Compare", |
| | | Text3: "Calculating profile", |
| | | Text4: "Terrain profile calculation was aborted", |
| | | Text5: "Elevation Layer", |
| | | Text8: "Spacing", |
| | | Text9: "meters", |
| | | Text10: "Quality", |
| | | Text11: "Medium", |
| | | Text12: "High", |
| | | Text13: "TerrainProfile", |
| | | Text14: "TerrainProfile", |
| | | Text15: "line ", |
| | | Text16: "Left click on the terrain to draw a polygon/Polyline. Right click to finish operation.", |
| | | Text18: "Follow <br>Line", |
| | | Text19: "Calculating query points", |
| | | Text20: "Terrain Profile tool cannot create more than 10 profiles. Operation aborted.", |
| | | Text21: " objects. This procedure may take considerable time. Do you want to continue?", |
| | | Text24: "Please select a group or a layer from the project tree", |
| | | Text25: "Error while calculating elevation values.", |
| | | Text26: "Please select an elevation layer from the list", |
| | | Text27: "Point", |
| | | Text28: "TerrainProfile-FollowLine", |
| | | Text29: "Cannot generate terrain profile. The clipboard does not contain Polygon/Polyline objects.", |
| | | Text31: "Analyzing point ", |
| | | Text32: "Visibility Distance", |
| | | Text33: "Follow<br>Line", |
| | | Text34: "Fill <br>Area", |
| | | Text35: "Selected<br>Group", |
| | | Text36: "From<br>Clipboard", |
| | | Text37: "<u>Refesh list</u>", |
| | | Text40: "<b>Export to Layer</b>", |
| | | Text43: "Distance", |
| | | Text44: "Line", |
| | | Text45: "Elevation", |
| | | Text46: "Color", |
| | | Text47: "Slope", |
| | | Text48: "Min / Max Elevation", |
| | | Text49: "Min / Max Slope", |
| | | Text50: "Waypoint", |
| | | Text51: "Unit:", |
| | | Text52: "<b>meters</b>", |
| | | Text53: "<b>feet</b>", |
| | | Text54: "G_Dist", |
| | | Text55: "H_Dist", |
| | | Text56: "Cannot generate terrain profile. The selected group does not contain Polygon/Polyline objects", |
| | | Text57: "m", |
| | | Text58: "Surface Distance", |
| | | Text59: "ft", |
| | | Text60: "Sampling Length", |
| | | Text61: "Horizontal Distance", |
| | | Text62: "Object Name", |
| | | TextAbort: " (Esc to abort)", |
| | | |
| | | |
| | | Text999: "" |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td class="ToolTopArea" id="TopAreaTD" width="100%" valign="middle" > |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| | | <tr> |
| | | <td width="55px"><img style="margin-left:5px;" src="ToolIcon.png" alt="" /></td> |
| | | <td id="TitleTD" align="center" class="s12w i18n">ToolName</td> |
| | | <td align="right" id="CloseHelpTd"><img style="margin-right:5px;" alt="" src="../CommonImg/help.png" border="0" class="i18n" alt="help" title="help" onclick="DisplayHelpPopup6(SGLang.i18nFile('help.html'),SGLang.i18n('help'))" style="cursor: pointer;"></td> |
| | | </tr> |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ToolTopSeperator"></td> |
| | | </tr> <tr class="s8"> |
| | | <td > |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="2" > |
| | | |
| | | <tr class='TableOtherLine'> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">Text0</label> |
| | | </td> |
| | | <td align="left"> |
| | | <select id="CompareMode" onchange="ChangeMode();"> |
| | | <option class="i18n" value="0" selected="selected">Text1</option> |
| | | <option class="i18n" value="1" >Text2</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr > |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">Text10</label> |
| | | </td> |
| | | <td align="left"> |
| | | <select id="DensityID" > |
| | | <option class="i18n" value="1" selected="selected">Text11</option> |
| | | <option class="i18n" value="2" >Text12</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr id="ListTR" class='TableOtherLine' style="display:none;"> <!--Select Elevation Layer --> |
| | | <td class="s8b"> |
| | | <label for="createAs" class="i18n">Text5</label> |
| | | </td> |
| | | <td align="left"> |
| | | <!-- DO NOT REMOVE THE FOCUS CALL IN THE LIST BELOW!! |
| | | This focus call minimize the effect of a very strange bug. When you select an entry from the Viewshed list, click on the terrain and then ctrl-click on other list entry the HTML list control do not really recieve this additional selection (although you do see the new line highlighted). |
| | | --> |
| | | <select id="ElevationsID" multiple="multiple" ondblclick="flyToElevation();" onmouseover="this.focus()" > |
| | | </select><br /> |
| | | <span class="i18n" style="text-decoration:underline;cursor:pointer;" onclick="RefreshElevationList();">Text37</span> |
| | | <!-- <span style="margin-left:40px;"></span> |
| | | <span class="i18n" style="text-decoration:underline;cursor:pointer;" onclick="SelectInView();">Text42</span> |
| | | --> </td> |
| | | </tr> |
| | | </table> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="center" class="ToolButtonsArea"> |
| | | <button id="lineButton" class="MenuButton" onclick="CreateObjects(1);"> <img src="../commonimg/polyline.png" /><br /> <span class="i18n">Text33</span></button> |
| | | <button id="groupButton" class="MenuButton" onclick="SelectGroupObjects()"><img src="../commonimg/group.png" /><br /><span class="i18n">Text35</span></button> |
| | | <button id="clipboardButton" class="MenuButton MenuButtonLast" onclick="SelectClipboardObjects()"><img src="../commonimg/Clipboard.png" /><br /><span class="i18n" style="font:#2A4EA5">Text36</span></button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <!-- <object id="SGWorld" classid="CLSID:3a4f9197-65a8-11d5-85c1-0001023952c1">--> |
| | | </object> |
| | | |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon70.js"></script> |
| | | |
| | | <script language="JavaScript"> |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | var gPolygonText = SGLang.i18n("Text35"); |
| | | var gPolylineText = SGLang.i18n("Text36"); |
| | | var gDrawPolyClick = null; |
| | | var gEndDrawPoly = DrawPoly; |
| | | var gPopupCaption = ""; |
| | | //** |
| | | |
| | | var bInEdit; |
| | | var bFirstTime; |
| | | var bDontAskme; |
| | | ///var gTotalHours; |
| | | var rootId; |
| | | |
| | | var SGWorld = new ActiveXObject("TerraExplorerX.SGWorld70"); |
| | | |
| | | Date.prototype.stdTimezoneOffset = function () { |
| | | var jan = new Date(this.getFullYear(), 0, 1); |
| | | var jul = new Date(this.getFullYear(), 6, 1); |
| | | return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); |
| | | } |
| | | |
| | | Date.prototype.dst = function () { |
| | | return this.getTimezoneOffset() < this.stdTimezoneOffset(); |
| | | } |
| | | |
| | | //-------------- |
| | | // Init |
| | | function Init() { |
| | | if (GetParamValue("inSG", "") == "1") { |
| | | $("#TopAreaTD").attr("height", "57"); |
| | | $("#TitleTD").attr("align", "left"); |
| | | $("#CloseHelpTd").attr("display", "none"); |
| | | } |
| | | |
| | | gDrawPolyAltitudeType = 3; // draw lines and polygon as absolute lines |
| | | rootId = GetParamValue("rootId", SGWorld.ProjectTree.RootID); |
| | | RefreshElevationList(); |
| | | Reset(1, 0); |
| | | } |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | |
| | | try { |
| | | if (gPolyObj != null) |
| | | SGWorld.Creator.DeleteObject(gPolyObj.ID); |
| | | } catch (e) { } |
| | | |
| | | gPolyObj = null; |
| | | GroupID = null; |
| | | |
| | | bDontAskme = false; |
| | | |
| | | $("#lineButton").removeClass("MenuButtonHighlight"); |
| | | $("#areaButton").removeClass("MenuButtonHighlight"); |
| | | $("#groupButton").removeClass("MenuButtonHighlight"); |
| | | $("#clipboardButton").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | if (bInEdit) { |
| | | SGWorld.DetachEvent("OnLButtonClicked", DrawPolyLButtonClicked); |
| | | SGWorld.DetachEvent("OnRButtonUp", DrawPolyRButtonUp); |
| | | SGWorld.DetachEvent("OnFrame", DrawPolyOnFrame); |
| | | SGWorld.DetachEvent("OnInputModeChanged", DrawPolyInputModeChanged); |
| | | } |
| | | bInEdit = false; |
| | | |
| | | if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | //------------------- |
| | | // ChangeMode |
| | | function ChangeMode() { |
| | | var CompareMode = $("#CompareMode").val(); |
| | | if (CompareMode == "1") // Compare |
| | | $("#ListTR").show(); |
| | | else |
| | | $("#ListTR").hide(); |
| | | |
| | | } |
| | | //------------------- |
| | | // RefreshElevationList |
| | | function RefreshElevationList() { |
| | | $("#ElevationsID").html(""); |
| | | BuildElevationsList(SGWorld.ProjectTree.RootID); |
| | | } |
| | | //------------------- |
| | | // BuildElevationsList |
| | | function BuildElevationsList(parentNode) { |
| | | |
| | | try { |
| | | var node = SGWorld.ProjectTree.GetNextItem(parentNode, 11); |
| | | while (node != "") { |
| | | |
| | | if (SGWorld.ProjectTree.IsGroup(node)) |
| | | BuildElevationsList(node); |
| | | |
| | | else if (SGWorld.ProjectTree.IsLayer(node)) { |
| | | } |
| | | else { |
| | | var a = SGWorld.ProjectTree.GetItemName(node); |
| | | var Object = SGWorld.Creator.GetObject(node); |
| | | if (Object != null) { |
| | | if (Object.ObjectType == 29) |
| | | AddElevationToList(Object); |
| | | } |
| | | } |
| | | node = SGWorld.ProjectTree.GetNextItem(node, 13); |
| | | } |
| | | } |
| | | catch (err) { } |
| | | } |
| | | //--------------- |
| | | // AddElevationToList |
| | | function AddElevationToList(Object) { |
| | | $("#ElevationsID").append("<option value=" + Object.ID + ">" + Object.TreeItem.Name + "</option>"); |
| | | } |
| | | //--------------- |
| | | // flyToElevation |
| | | function flyToElevation() { |
| | | $("#ElevationsID option:selected").each(function () { |
| | | var ElevationID = ($(this).val()); |
| | | SGWorld.Navigate.FlyTo(ElevationID, 10); |
| | | }); |
| | | } |
| | | |
| | | //-------------- |
| | | // CreateObjects |
| | | //-------------- |
| | | function CreateObjects(method) { |
| | | if (!bInEdit) { |
| | | bInEdit = true; |
| | | SGWorld.AttachEvent("OnLButtonClicked", DrawPolyLButtonClicked); |
| | | SGWorld.AttachEvent("OnRButtonUp", DrawPolyRButtonUp); |
| | | SGWorld.AttachEvent("OnFrame", DrawPolyOnFrame); |
| | | SGWorld.AttachEvent("OnInputModeChanged", DrawPolyInputModeChanged); |
| | | |
| | | |
| | | gPolyMethod = method; |
| | | SGWorld.Window.SetInputMode(1, abspath() + "/cursor_m.cur",true); |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text16")); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | |
| | | } |
| | | else { |
| | | DrawPolyRButtonUp(0, 0, 0, 0); |
| | | } |
| | | } |
| | | //----------- |
| | | // SelectGroupObjects |
| | | function SelectGroupObjects() { |
| | | |
| | | var node = SGWorld.ProjectTree.GetNextItem("", 10); |
| | | if (node == 0 || !(SGWorld.ProjectTree.IsGroup(node) || SGWorld.ProjectTree.IsLayer(node))) { |
| | | alert(SGLang.i18n("Text24")); |
| | | return; |
| | | } |
| | | |
| | | ShowPopup(1,0); |
| | | } |
| | | //----------- |
| | | // SelectClipboardObjects |
| | | function SelectClipboardObjects() { |
| | | |
| | | ShowPopup(2,0); |
| | | } |
| | | |
| | | //------------- |
| | | // DrawPoly |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | // create a polyline, under the hidden group, using this geometry and send the objID to the popup |
| | | var lineGroup = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text28"), SGWorld.ProjectTree.HiddenGroupID); // SGWorld.ProjectTree.RootID |
| | | var line = SGWorld.Creator.CreatePolyline(geometry, "#FC8220", 3, lineGroup, "ProfileLine"); |
| | | line.LineStyle.Width = -4; |
| | | line.SetParam(5440, 1); |
| | | |
| | | ShowPopup(0, lineGroup); |
| | | return true; |
| | | |
| | | } |
| | | |
| | | |
| | | //---------------- |
| | | // ShowPopup |
| | | function ShowPopup(ProfileType, ObjID) { |
| | | |
| | | |
| | | if (!ValidateInput()) |
| | | return false; |
| | | var CompareStr = ""; |
| | | var CompareMode = $("#CompareMode").val(); |
| | | var Density = $("#DensityID").val(); |
| | | |
| | | if (CompareMode == "1") |
| | | { |
| | | $("#ElevationsID option:selected").each(function () { |
| | | CompareStr = "&ElevationID="+$(this).val(); |
| | | }); |
| | | if (CompareStr == "") { |
| | | alert(SGLang.i18n("Text26")); |
| | | SGWorld.ProjectTree.DeleteItem(ObjID); |
| | | Reset(0, 0); |
| | | return; |
| | | } |
| | | } |
| | | // Remove previos popup |
| | | SGWorld.Window.RemovePopupByCaption(gPopupCaption); |
| | | |
| | | gPopupCaption = SGLang.i18n("Text14") + " " + Date().toString(); |
| | | var url = abspath() + "/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); |
| | | // var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, SGWorld.Window.Rect.Height * 2 / 3, SGWorld.Window.Rect.Width - 2, SGWorld.Window.Rect.Height / 3 - 55, -1); |
| | | var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, -1000, 100, 100, -1); |
| | | |
| | | popupMsg.Flags = 2 + 32; |
| | | SGWorld.Window.ShowPopup(popupMsg); |
| | | |
| | | Reset(0, 0); |
| | | } |
| | | |
| | | |
| | | //--------------- |
| | | // ValidateInput |
| | | function ValidateInput() { |
| | | return true; |
| | | } |
| | | //-------------- |
| | | // CheckNumberEx |
| | | function CheckNumberEx(field, defVal, MinNum, MaxNum) { |
| | | try { |
| | | field.value = validateNumber(field.value); |
| | | |
| | | if (field.value < MinNum) |
| | | field.value = MinNum; |
| | | if (field.value > MaxNum) |
| | | field.value = MaxNum; |
| | | } |
| | | catch (e) { field.value = defVal } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040gCDs9m8bCxbziuTHTWvi.9wqY6eqFIP4xbcbTySdT18rgR7ju6KH#aImsTx6#UNxHBfe7NsR4UENRAj.ypshJ2JJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| | | |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | .MenuButton |
| | | { |
| | | height: 78px; |
| | | width: 64px; |
| | | margin: 3px; |
| | | padding: 0px; |
| | | white-space: normal; |
| | | } |
| | | .MenuButtonHighlight |
| | | { |
| | | color: Red; |
| | | font-weight: bold; |
| | | } |
| | | html, body |
| | | { |
| | | height:100%; |
| | | } |
| | | html, body { |
| | | height: 100%; |
| | | margin: 0px; |
| | | padding: 0px; |
| | | } |
| | | |
| | | #wrapper { |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: auto; |
| | | position: relative; |
| | | } |
| | | |
| | | #header { |
| | | height: 40px; |
| | | |
| | | } |
| | | |
| | | #content { |
| | | position:absolute; |
| | | bottom:0px; |
| | | top: 40px; |
| | | width:100%; |
| | | overflow: auto; |
| | | |
| | | } |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0; |
| | | overflow: auto; height:100%;overflow:hidden" id="Body" onload="Init()" onunload="Exit();" oncontextmenu_="return false;"> |
| | | |
| | | <div id="abortDiv" style="display:none;"> |
| | | <table border=0 style="width:100%; height:100%;" id="Table1" style="display:none;" cellspacing=0 cellpadding=1> |
| | | <tr tyle="width:100%"> |
| | | <td align="center"> |
| | | <span class="i18n" style="font-size:24px">Text4</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <div id="header"> |
| | | <table border=0 style="width:100%;display:none; " id="mainTbl" cellspacing=0 cellpadding=1> |
| | | <tr style="width:100%; height:40px;"> |
| | | <td align="left"> |
| | | <span style="padding-left:30px;" /> |
| | | <img src="img/ZoomOut.png" style="cursor:pointer;" onclick="gPlot.zoomOut();" align="absmiddle" /> |
| | | <img src="img/ZoomIn.png" style="cursor:pointer;" onclick="gPlot.zoom();" align="absmiddle" /> |
| | | <img src="img/Zoomall.png" style="cursor:pointer;" onclick="DrawGraph();" align="absmiddle" /> |
| | | <span style="padding-left:30px;" /> |
| | | <input type="checkbox" id= "WaypointsID" style="width:15px; vertical-align:middle;" onclick="DrawGraph();" /><img src="img/waypoint.jpg" align="absmiddle" /><span class="i18n">Text50</span> |
| | | <span style="padding-left:10px;" /> |
| | | <input type="checkbox" id="MinMaxAltID" style="width:15px; vertical-align:middle;" onclick="DrawGraph();"/><img src="img/minmaxAlt.jpg" align="absmiddle" /><span class="i18n">Text48</span> |
| | | <span style="padding-left:10px;" /> |
| | | <input type="checkbox" id="MinMaxSlopeID" style="width:15px; vertical-align:middle;" onclick="DrawGraph();"/><img src="img/minmaxSlope.jpg" align="absmiddle" /><span class="i18n">Text49</span> |
| | | <span style="padding-left:10px;" /> |
| | | <span class="i18n">Text51</span> <span class="i18n" id="UnitID"></span> |
| | | </td> |
| | | <td align="right"> |
| | | <button style="background-color:#2b2b2b; border:0px solid black; color:White; height:25px;" id="CreateLayerButton" onclick="CreateLayer();"><span class="i18n">Text40</span></button> |
| | | <span style="padding-left:10px;" /> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <div id="content"> |
| | | <div class="demo-container" style="height:100%;width:100%; "> |
| | | <div id="chartdiv" style="height:100%;width:99%; "></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <object id="SGWorld" style="display:none" classid="CLSID:3A4F9199-65A8-11D5-85C1-0001023952C1"> </object> |
| | | |
| | | <script language="javascript" src="../ToolsCommon65.js"></script> |
| | | |
| | | |
| | | <script language="javascript" type="text/javascript" src="../jquery/jquery.min.js"></script> |
| | | <script language="javascript" type="text/javascript" src="../jquery/jquery.flot.min.js"></script> |
| | | <script language="javascript" type="text/javascript" src="../jquery/jquery.flot.navigate.min.js"></script> |
| | | <script language="javascript" type="text/javascript" src="../jquery/jquery-ui-1.10.4.custom.min.js"></script> |
| | | <script language="javascript" type="text/javascript" src="../jquery/jquery.flot.resize.min.js"></script> |
| | | <script language="javascript" type="text/javascript" src="../jquery/jquery.flot.symbol.min.js"></script> |
| | | |
| | | |
| | | <script language="JavaScript"> |
| | | |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | var gPolyObj =null; |
| | | var gPolyMethod; |
| | | var gPolygonText = SGLang.i18n("Text35"); |
| | | var gPolylineText = SGLang.i18n("Text36"); |
| | | var gDrawPolyClick = null; |
| | | var gEndDrawPoly = DrawPoly; |
| | | var gAbort = false; |
| | | //** |
| | | |
| | | var isGroupFlag = false; |
| | | var lineCounter = 0; |
| | | var objectNameIndex = 0; |
| | | var gSamplingInterval = []; |
| | | var gObjectName = []; |
| | | var gFollowLineGroup ; |
| | | |
| | | var isPolyline = true; // Decided to switch to PolylineLayer. If we want to switch to the point layer in the future, we can change the true condition. |
| | | //var gPointLayer; // gPointLayer has been changed in order to create a polyline layer with the same code |
| | | var gLayer; |
| | | |
| | | var tmpGroundDistance = 0; |
| | | var gPositionsArray = []; |
| | | var gAltitudeArray = []; |
| | | var gPointsArray = []; |
| | | var gMaxAltitudeArray = []; |
| | | var gMinAltitudeArray = []; |
| | | var gMaxSlopeArray = []; |
| | | var gMinSlopeArray = []; |
| | | var gWaypointsArray = []; |
| | | |
| | | var gLinePointsArray = []; |
| | | var gTotalDistance = []; |
| | | var gGroundDistance = []; |
| | | var gHorizontalDistance = []; |
| | | var gNumPoints = 0; |
| | | var gPointsIndex = 0; |
| | | var gNumLines = 0; |
| | | var gWaypointIndex = 0; |
| | | var gVisibilityDistance; |
| | | var gSpacing = 1; |
| | | var gDensity = 1; |
| | | var gGraphReady = false; |
| | | var gFoundLine = false; |
| | | var gExtraLines = 0; |
| | | var gUnit = 1.0; |
| | | var unitMethod = SGLang.i18n("Text57"); |
| | | var gColorArray = ["#ff0000", "#00ff00", "#0000FF", "#FF00FF", "#C0FFFF", "#FFFF00", "#FFC119", "#B16CF8", "#D2FF01", "#AD8943"]; |
| | | var gColorArray2 = [255, 65280, 16711680, 12583104, 16777152, 65535, 4499444, 16280753, 65490, 4426157]; |
| | | |
| | | var gCaption; |
| | | var gActionType; |
| | | |
| | | var bInEdit; |
| | | var bFirstTime; |
| | | var bDontAskme; |
| | | var gPlot; |
| | | ///var gTotalHours; |
| | | |
| | | var gDisableChangeInputMode = 0; |
| | | //-------------- |
| | | // Init |
| | | function Init() { |
| | | } |
| | | |
| | | |
| | | $(document).ready(function() { setTimeout(StartQuery, 500); }); |
| | | //------------ |
| | | // StartQuery |
| | | function StartQuery() { |
| | | try { |
| | | Reset(1, 0); |
| | | gActionType = GetParamValue("Type", "0"); |
| | | gFollowLineGroup = GetParamValue("ObjID", "0"); |
| | | gDisableChangeInputMode = GetParamValue("DisableChangeInputMode", "0"); |
| | | var Compare = GetParamValue("Compare", "0"); |
| | | gCaption = GetParamValue("Caption", ""); |
| | | gDensity = parseInt(GetParamValue("Density", "1")); |
| | | if (SGWorld.GetOptionParam("AltitudeAndDistance") == 1) { // Feet |
| | | gUnit = 3.28084; |
| | | $("#UnitID").html(SGLang.i18n("Text53")); |
| | | unitMethod = SGLang.i18n("Text59"); |
| | | } |
| | | else { // meters |
| | | $("#UnitID").html(SGLang.i18n("Text52")); |
| | | } |
| | | |
| | | |
| | | |
| | | if (Compare == "1") { |
| | | var ElevationID = GetParamValue("ElevationID", "0"); |
| | | var ElevationObj = SGWorld.Creator.GetObject(ElevationID); |
| | | |
| | | ElevationObj.Visibility.Show = false; |
| | | StartProfile(gActionType); |
| | | ElevationObj.Visibility.Show = true; |
| | | StartProfile(gActionType); |
| | | } |
| | | else |
| | | StartProfile(gActionType); |
| | | |
| | | |
| | | setTimeout ("resizePopup();",500); |
| | | } |
| | | catch (e) { alert(e); } |
| | | } |
| | | //------------ |
| | | // resizePopup |
| | | function resizePopup() { |
| | | if (!gFoundLine) |
| | | return; |
| | | |
| | | var popupMsg = SGWorld.Window.GetPopupByCaption(gCaption); |
| | | popupMsg.Left = 1; |
| | | popupMsg.Top = SGWorld.Window.Rect.Height * 2 / 3; |
| | | popupMsg.Height = SGWorld.Window.Rect.Height / 3; |
| | | popupMsg.Width = SGWorld.Window.Rect.Width - 2; |
| | | |
| | | if (gPointsIndex > 0) { |
| | | CalcMinMax(); |
| | | gGraphReady = true; |
| | | DrawGraph(); |
| | | } |
| | | |
| | | Reset(0, 0); |
| | | /// setTimeout("$('<span> </span>').appendTo(document.body);", 100); // Do not remove this line. It fixes a redraw problem. |
| | | |
| | | |
| | | if (gAbort){ |
| | | $("#abortDiv").show(); |
| | | $("#header").hide(); |
| | | $("#content").hide(); |
| | | } |
| | | $("#mainTbl").css('display', 'inline'); |
| | | |
| | | setTimeout("resizePopup1();", 1000); |
| | | } |
| | | //------- |
| | | // resizePopup1 |
| | | function resizePopup1() { |
| | | var popupMsg = SGWorld.Window.GetPopupByCaption(gCaption); |
| | | popupMsg.Height = popupMsg.Height+1 ; |
| | | } |
| | | //------------ |
| | | // Exit |
| | | function Exit() |
| | | { |
| | | try { |
| | | if (gFollowLineGroup != "0" && gActionType != "3") // && !$("#CreateLayerButton")[0].disabled - include this condition to the if if you don't want to remove the FollowLine |
| | | SGWorld.ProjectTree.DeleteItem(gFollowLineGroup); |
| | | } |
| | | catch (e) { } |
| | | |
| | | } |
| | | //---------------- |
| | | //-- StartProfile |
| | | function StartProfile(ActionType) { |
| | | switch (ActionType) { |
| | | case "0": // Manual drawing |
| | | DrawGroup(gFollowLineGroup); |
| | | break; |
| | | case "1": // Group selection |
| | | SelectGroupObjects(); |
| | | break; |
| | | case "2": // Clipboard |
| | | SelectClipboardObjects(); |
| | | break; |
| | | case "3": // 3D line (from Threat Dome analysis) |
| | | for (var i = 0; i < 10; i++) { |
| | | var a = "ObjID" + i; |
| | | var objID = GetParamValue(a, "0"); |
| | | if (objID != "0") |
| | | if (Draw3DLine(objID)== false){ |
| | | gAbort = true; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) { |
| | | |
| | | |
| | | gPolyObj = null; |
| | | gLayer = null; |
| | | bDontAskme = false; |
| | | gVisibilityDistance = 4000; |
| | | |
| | | $("#lineButton").removeClass("MenuButtonHighlight"); |
| | | $("#areaButton").removeClass("MenuButtonHighlight"); |
| | | $("#groupButton").removeClass("MenuButtonHighlight"); |
| | | $("#clipboardButton").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | bInEdit = false; |
| | | |
| | | if (FirstTime != 1 && FromMouseInputMode == 0) |
| | | { |
| | | if(gDisableChangeInputMode==0) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | } |
| | | //----------- |
| | | // DrawGroup |
| | | function DrawGroup(node) { |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19")); |
| | | |
| | | searchGeometries2(node, DrawPoly); |
| | | |
| | | // Reset(0, 0); |
| | | } |
| | | //------------- |
| | | // Draw3DLine |
| | | function Draw3DLine(node) { |
| | | gPointsIndex = 0; |
| | | gPositionsArray[gNumLines] = []; |
| | | gAltitudeArray[gNumLines] = []; |
| | | var lineWaypointPositions = []; |
| | | gFoundLine = true; |
| | | var totlaDistance = 0; |
| | | |
| | | var line = SGWorld.Creator.GetObject(node); |
| | | gNumPoints = line.Geometry.Points.count; |
| | | for (var k = 0; k < line.Geometry.Points.count; k++) // calculate total distance |
| | | lineWaypointPositions[k] = SGWorld.Creator.CreatePosition(line.Geometry.Points.Item(k).X, line.Geometry.Points.Item(k).Y, line.Geometry.Points.Item(k).Z, 3, 0, 0, 0, 0); |
| | | |
| | | for (var k = 1; k < line.Geometry.Points.count; k++) // calculate total distance |
| | | totlaDistance += lineWaypointPositions[k - 1].DistanceTo(lineWaypointPositions[k]); |
| | | |
| | | gSpacing = totlaDistance / 1000 / gDensity; |
| | | |
| | | for (var k = 0; k < line.Geometry.Points.count; k++) // calculate total distance |
| | | if (AddPoint(lineWaypointPositions[k], false, true)==false) |
| | | return false; |
| | | |
| | | gTotalDistance[gNumLines] = totlaDistance; |
| | | gSamplingInterval[gNumLines] = gSpacing; |
| | | |
| | | gNumLines += 1; |
| | | |
| | | } |
| | | //----------- |
| | | // SelectGroupObjects |
| | | function SelectGroupObjects() { |
| | | var node = SGWorld.ProjectTree.GetNextItem("", 10); |
| | | if (node == 0 || !(SGWorld.ProjectTree.IsGroup(node) || SGWorld.ProjectTree.IsLayer(node))) { |
| | | alert(SGLang.i18n("Text24")); |
| | | return; |
| | | } |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19")); |
| | | gFoundLine = false; |
| | | searchGeometries2(node, DrawPoly); |
| | | GetFunctionName(node); |
| | | isGroupFlag = true; |
| | | if (!gFoundLine) |
| | | alert(SGLang.i18n("Text56")); |
| | | } |
| | | //----------- |
| | | // SelectClipboardObjects |
| | | function SelectClipboardObjects() { |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19"), -1); |
| | | gFoundLine = false; |
| | | searchGeometriesClipboard(DrawPoly); |
| | | if (!gFoundLine) |
| | | alert(SGLang.i18n("Text29")); |
| | | } |
| | | |
| | | //------------- |
| | | // DrawPoly |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19")); |
| | | SGWorld.ProjectTree.EnableRedraw(0); |
| | | |
| | | if (!ValidateInput()) |
| | | return false; |
| | | if (gNumLines > 9) { |
| | | alert(SGLang.i18n("Text20")); |
| | | return false; |
| | | } |
| | | if (type == 1) { |
| | | if (!DrawOnPolyline(geometry, type, altitudeType)){ |
| | | gAbort = true; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | |
| | | } |
| | | //---- |
| | | // DrawOnPolyline |
| | | function DrawOnPolyline(polylineGeometry, type, altitudeType) { |
| | | var lastCoord; |
| | | var currCoord; |
| | | var tmpCoord; |
| | | var SegmentLength; |
| | | var lastSegmentLenght; |
| | | var totlaDistance = 0; |
| | | var tmpHorizontal = 0; |
| | | gPointsIndex = 0; |
| | | gFoundLine = true; |
| | | gPositionsArray[gNumLines] = []; |
| | | gAltitudeArray[gNumLines] = []; |
| | | var lineWaypointPositions = []; |
| | | |
| | | // Houre glass cursor |
| | | if(gDisableChangeInputMode==0) |
| | | SGWorld.Window.SetInputMode(1, abspath()+"/hourglass.cur", true); |
| | | |
| | | for (var k = 0; k < polylineGeometry.Points.count; k++) // calculate total distance |
| | | { |
| | | // We must convert the altitudes to absolute to avoid problems related to terrain changes during the loops below |
| | | //var Altitude = SGWorld.Terrain.GetGroundHeightInfo(polylineGeometry.Points.Item(k).X, polylineGeometry.Points.Item(k).Y, 2, true).Position.Altitude; |
| | | var Altitude = 0; // According to bug #20540 we decided to flat the polyline by setting all altitdutes to 0 |
| | | lineWaypointPositions[k] = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k).X, polylineGeometry.Points.Item(k).Y, Altitude, 3); |
| | | if (k > 0) { |
| | | totlaDistance += lineWaypointPositions[k - 1].DistanceTo(lineWaypointPositions[k]); |
| | | tmpHorizontal += SGWorld.CoordServices.GetDistance(polylineGeometry.Points(k - 1).X, polylineGeometry.Points(k - 1).Y, polylineGeometry.Points(k).X, polylineGeometry.Points(k).Y); |
| | | } |
| | | } |
| | | |
| | | //gSpacing = Math.max(totlaDistance / 1000 / gDensity, 1 / gDensity); |
| | | gSpacing = totlaDistance / 1000 / gDensity; |
| | | |
| | | gNumPoints = totlaDistance / gSpacing; |
| | | var firstSegment = true; |
| | | |
| | | for (var i = 1; i < polylineGeometry.Points.count; i++) { |
| | | lastCoord = lineWaypointPositions[i-1].copy(); |
| | | currCoord = lineWaypointPositions[i].copy(); |
| | | |
| | | lastCoord.yaw = lastCoord.AimTo(currCoord).yaw; |
| | | |
| | | // AddWaypoint(lastCoord); |
| | | var Waypoint = true; |
| | | if (firstSegment) { |
| | | tmpCoord = lastCoord.Copy(); |
| | | if (AddPoint(tmpCoord, Waypoint,false) == false) |
| | | return false; |
| | | Waypoint = false; |
| | | } |
| | | SegmentLength = lastCoord.DistanceTo(currCoord); |
| | | lastSegmentLenght = SegmentLength; |
| | | |
| | | while (SegmentLength > 0.00001 && lastSegmentLenght >= SegmentLength) { |
| | | lastSegmentLenght = SegmentLength; |
| | | if (SegmentLength < gSpacing) |
| | | lastCoord = lastCoord.MoveToward(currCoord, SegmentLength); |
| | | else lastCoord = lastCoord.MoveToward(currCoord, gSpacing); |
| | | tmpCoord = lastCoord.Copy(); |
| | | if (AddPoint(tmpCoord, Waypoint,false) == false) |
| | | return false; |
| | | Waypoint = false; |
| | | SegmentLength = lastCoord.DistanceTo(currCoord); |
| | | } |
| | | |
| | | firstSegment = false; |
| | | } |
| | | |
| | | //// Add lst point |
| | | tmpCoord = currCoord.Copy(); |
| | | if (AddPoint(tmpCoord, true,false) == false) |
| | | return false; |
| | | |
| | | // fix for bug #14439 |
| | | //Restore3DModelToGroundObject(); |
| | | |
| | | gNumLines += 1; |
| | | |
| | | gTotalDistance[lineCounter] = totlaDistance; |
| | | gSamplingInterval[lineCounter] = gSpacing; |
| | | gHorizontalDistance[lineCounter] = (tmpHorizontal * gUnit).toFixed(2); |
| | | gGroundDistance[lineCounter] = (tmpGroundDistance * gUnit).toFixed(2); |
| | | //var a = (SGWorld.Analysis.MeasureTerrainGroundDistance(polylineGeometry, gSamplingInterval, true) * gUnit).toFixed(2); |
| | | tmpGroundDistance = 0; |
| | | lineCounter++; |
| | | return true; |
| | | } |
| | | |
| | | //------------- |
| | | // AddPoint |
| | | function AddPoint(pos, waypoint, fromThreatDome) { |
| | | if(SGWorld.GetParam(9901)) // user click on the ESC button in TE |
| | | return false; |
| | | |
| | | var position1 = pos.ToAbsolute(0); |
| | | if (!fromThreatDome) { |
| | | var Altitude = SGWorld.Terrain.GetGroundHeightInfo(position1.X, position1.Y, 2, true).Position.Altitude; |
| | | position1.Altitude = Altitude; |
| | | } |
| | | else |
| | | Altitude = pos.Altitude; |
| | | |
| | | gPointsArray[gNumLines] = gPointsIndex; |
| | | gPositionsArray[gNumLines][gPointsIndex] = position1; |
| | | gAltitudeArray[gNumLines][gPointsIndex] = [gPointsIndex * gSpacing * gUnit, Altitude * gUnit]; |
| | | if (waypoint) { |
| | | gWaypointsArray[gWaypointIndex] = [gPointsIndex * gSpacing * gUnit, Altitude * gUnit]; |
| | | gWaypointIndex += 1; |
| | | } |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text3") + " [" + (gNumLines + 1) + "] : " + Math.floor((gPointsIndex / gNumPoints) * 100) + "%"+ SGLang.i18n("TextAbort")); |
| | | if (gPointsIndex >= 1) |
| | | tmpGroundDistance += gPositionsArray[gNumLines][gPointsIndex - 1].DistanceTo(gPositionsArray[gNumLines][gPointsIndex]); |
| | | gPointsIndex += 1; |
| | | return true; |
| | | } |
| | | //------------- |
| | | // CalcMinMax |
| | | function CalcMinMax() { |
| | | |
| | | for (var Line = 0; Line < gNumLines; Line++) { |
| | | gMaxAltitudeArray[Line] = [0, -9999999]; |
| | | gMinAltitudeArray[Line] = [0, 9999999]; |
| | | var maxSlope = -999999; |
| | | var minSlope = 999999; |
| | | |
| | | for (var Point = 0; Point <= gPointsArray[Line]; Point++) { |
| | | var Altitude = gPositionsArray[Line][Point].Altitude * gUnit; |
| | | // Min / Max altitude |
| | | if (Altitude > gMaxAltitudeArray[Line][1]) |
| | | gMaxAltitudeArray[Line] = gAltitudeArray[Line][Point]; |
| | | |
| | | if (Altitude < gMinAltitudeArray[Line][1]) |
| | | gMinAltitudeArray[Line] = gAltitudeArray[Line][Point]; |
| | | |
| | | // Min / Max Slope |
| | | var Slope = CalcSlope(Line, Point); |
| | | if (Slope > maxSlope) { |
| | | gMaxSlopeArray[Line] = gAltitudeArray[Line][Point]; |
| | | maxSlope = Slope; |
| | | } |
| | | |
| | | if (Slope < minSlope) { |
| | | gMinSlopeArray[Line] = gAltitudeArray[Line][Point]; |
| | | minSlope = Slope; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //------------ |
| | | // DrawGraph |
| | | function DrawGraph() { |
| | | if (!gGraphReady) |
| | | return; |
| | | gExtraLines = 0; |
| | | lineCounter = 0; |
| | | var data = []; |
| | | if ($("#MinMaxAltID").attr('checked')) { |
| | | data.push({ data: gMaxAltitudeArray, points: { show: true, symbol: "square", radius: 4 }, color: "#ff00ff" }); |
| | | data.push({ data: gMinAltitudeArray, points: { show: true, symbol: "square", radius: 4 }, color: "#ff00ff" }); |
| | | gExtraLines += 2; |
| | | } |
| | | if ($("#MinMaxSlopeID").attr('checked')) { |
| | | data.push({ data: gMaxSlopeArray, points: { show: true, symbol: "diamond", radius: 4 }, lines: { show: false }, color: "#0000ff" }); |
| | | data.push({ data: gMinSlopeArray, points: { show: true, symbol: "diamond", radius: 4 }, lines: { show: false }, color: "#0000ff" }); |
| | | gExtraLines += 2; |
| | | } |
| | | if ($("#WaypointsID").attr('checked')) { |
| | | data.push({ data: gWaypointsArray, points: { show: true, symbol: "circle", radius: 2 }, lines: { show: false }, color: "#000000" }); |
| | | gExtraLines += 1; |
| | | } |
| | | // |
| | | for (var i = 0; i < gNumLines; i++) |
| | | { |
| | | data.push({ data: gAltitudeArray[i], label: SGLang.i18n("Text15") + ": " + (i + 1) + " " + SGLang.i18n("Text58") + ": " + gGroundDistance[i] + unitMethod, lines: { show: true, fill: false }, color: gColorArray[i] }); |
| | | } |
| | | |
| | | gPlot = $.plot("#chartdiv", data, |
| | | { |
| | | xaxis: { zoomRange: [0, ], panRange: [0, ] }, |
| | | |
| | | grid: { |
| | | hoverable: true, |
| | | clickable: true |
| | | }, |
| | | zoom: { |
| | | interactive: true |
| | | }, |
| | | pan: { |
| | | interactive: true |
| | | }, |
| | | legend: { |
| | | labelFormatter: function (label, series) { |
| | | if (lineCounter >= gNumLines) |
| | | lineCounter = 0; |
| | | lineCounter++; |
| | | if (isGroupFlag) |
| | | return '<div id="labelTooltip" style="cursor:pointer" title="' + SGLang.i18n("Text60") + ': ' + gSamplingInterval[lineCounter - 1].toFixed(1) + ' ' + SGLang.i18n("Text62") +': ' + gObjectName[lineCounter - 1] + ' ' + SGLang.i18n("Text61") +': ' + gHorizontalDistance[lineCounter - 1] + '" style=BORDER:1px solid #fdd;font-size:12px;padding:2px;opacity:0.8;>' + label + '</div>'; |
| | | else return '<div id="labelTooltip" style="cursor:pointer" title="' + SGLang.i18n("Text60") + ': ' + gSamplingInterval[lineCounter - 1].toFixed(1) + ' ' + SGLang.i18n("Text61") +': ' + gHorizontalDistance[lineCounter - 1] + '" style=BORDER:1px solid #fdd;font-size:12px;padding:2px;opacity:0.8;>' + label + '</div>'; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | $("<div id='tooltip'></div>").css({ |
| | | position: "absolute", |
| | | display: "none", |
| | | border: "1px solid #fdd", |
| | | padding: "2px", |
| | | "background-color": "#fee", |
| | | opacity: 0.80, |
| | | fontSize: "12px" |
| | | }).appendTo("body"); |
| | | |
| | | |
| | | // Tooltip |
| | | $("#chartdiv").bind("plothover", function (event, pos, item) { |
| | | if (item) { |
| | | ToolTip(item, item.seriesIndex - gExtraLines, item.dataIndex); |
| | | } else { |
| | | $("#tooltip").hide(); |
| | | } |
| | | }); |
| | | |
| | | // Click the graph |
| | | $("#chartdiv").bind("plotclick", function (event, pos, item) { |
| | | if (item) { |
| | | JumpToPoint(item.seriesIndex - gExtraLines, item.dataIndex); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | //------------- |
| | | // Tool tip |
| | | function ToolTip(item, Line, Point) { |
| | | |
| | | if (Line >= gNumLines) // Max/Min altitude/slope |
| | | return; |
| | | |
| | | |
| | | var htmlStr = ""; |
| | | var Slope = CalcSlope(Line, Point); |
| | | if (SGWorld.GetOptionParam("ShowMGRS")) // if MGRS checkbox is checked |
| | | htmlStr = "X: " + gPositionsArray[Line][Point].X.toFixed(5) + "<br/>Y: " + gPositionsArray[Line][Point].Y.toFixed(5) + "<br/>MGRS: " + SGWorld.CoordServices.ConvertCoordinateToMGRS(gPositionsArray[Line][Point].X, gPositionsArray[Line][Point].Y) + "<br/>" + SGLang.i18n("Text45") + ": " + gAltitudeArray[Line][Point][1].toFixed(2) + "<br/>" + SGLang.i18n("Text47") + ": " + Slope.toFixed(2) + "\u00B0"; |
| | | else htmlStr = "X: " + gPositionsArray[Line][Point].X.toFixed(5) + "<br/>Y: " + gPositionsArray[Line][Point].Y.toFixed(5) + "<br/>" + SGLang.i18n("Text45") + ": " + gAltitudeArray[Line][Point][1].toFixed(2) + "<br/>" + SGLang.i18n("Text47") + ": " + Slope.toFixed(2) + "\u00B0"; |
| | | |
| | | $("#tooltip").html(htmlStr) |
| | | .css({ top: item.pageY + 5, left: item.pageX + 5 }) |
| | | .fadeIn(200); |
| | | |
| | | } |
| | | |
| | | //------------- |
| | | // Tool tip |
| | | function LineToolTip(item) { |
| | | var htmlStr = ""; |
| | | htmlStr = "X: " + item; |
| | | |
| | | $("#labelTooltip").html(htmlStr) |
| | | .css({ top: item.pageY + 5, left: item.pageX + 5 }) |
| | | .fadeIn(200); |
| | | |
| | | } |
| | | //------------- |
| | | // CalcSlope |
| | | function CalcSlope (Line, Point) { |
| | | var tmpPos = gPositionsArray[Line][Point].Copy(); |
| | | var Slope; |
| | | |
| | | if (Point >= gPointsArray[Line] ) { |
| | | nextPoint = gPositionsArray[Line][Point - 1].Copy(); |
| | | Slope = nextPoint.AimTo(tmpPos).Pitch; |
| | | } |
| | | else { |
| | | nextPoint = gPositionsArray[Line][Point + 1].Copy(); |
| | | Slope = tmpPos.AimTo(nextPoint).Pitch; |
| | | } |
| | | |
| | | return Slope; |
| | | } |
| | | //------------- |
| | | // JumpToPoint |
| | | function JumpToPoint (Line, Point) |
| | | { |
| | | if (Line >= gNumLines) // Max/Min altitude/slope |
| | | return; |
| | | |
| | | var nextPoint; |
| | | var nextSign; |
| | | |
| | | if (Point >= gPointsArray[Line]) { |
| | | nextPoint = gPositionsArray[Line][Point - 1].Copy(); |
| | | nextSign = 1; |
| | | } |
| | | else { |
| | | nextPoint = gPositionsArray[Line][Point + 1].Copy(); |
| | | nextSign = -1; |
| | | } |
| | | |
| | | var jumpPos = gPositionsArray[Line][Point].Copy(); |
| | | var tmpPos = gPositionsArray[Line][Point].Copy(); |
| | | jumpPos.Distance = 250; |
| | | jumpPos.Pitch = -60; |
| | | jumpPos.Yaw = tmpPos.AimTo(nextPoint).Yaw + 90*nextSign; |
| | | |
| | | SGWorld.Navigate.JumpTo(jumpPos); |
| | | } |
| | | //----------- |
| | | // Create Layer |
| | | function CreateLayer() { |
| | | var cLineString = []; |
| | | for (var i = 0; i < gNumLines; i++) { |
| | | for (var j = 0; j < gPointsArray[i]; j++) { |
| | | cLineString.push(gPositionsArray[i][j].X, gPositionsArray[i][j].Y, gPositionsArray[i][j].Altitude); |
| | | DrawObject(gPositionsArray[i][j], i , j); |
| | | } |
| | | if (isPolyline) |
| | | { |
| | | DrawPolyline(cLineString, i); |
| | | cLineString = []; |
| | | } |
| | | } |
| | | gLayer.Save(); |
| | | if (gFollowLineGroup != "0" && gActionType != "3") { |
| | | //var groupID = SGWorld.ProjectTree.CreateGroup(gLayer.TreeItem.Name, ""); |
| | | var groupID = selectGid(); |
| | | SGWorld.ProjectTree.SetParent(gLayer.ID, groupID); |
| | | //SGWorld.ProjectTree.SetParent(gFollowLineGroup, groupID); |
| | | } |
| | | |
| | | $("#CreateLayerButton").attr("disabled", true); |
| | | } |
| | | // selectGid |
| | | function selectGid() { |
| | | var gid = SGWorld.ProjectTree.FindItem("ç¨æ·æ°æ®\\ä¸´æ¶æ°æ®"); |
| | | if (!gid) { |
| | | var pid = SGWorld.ProjectTree.FindItem("ç¨æ·æ°æ®"); |
| | | if (!pid) { |
| | | pid = SGWorld.ProjectTree.CreateGroup("ç¨æ·æ°æ®", ""); |
| | | } |
| | | gid = SGWorld.ProjectTree.CreateGroup("ä¸´æ¶æ°æ®", pid); |
| | | } |
| | | |
| | | return gid; |
| | | } |
| | | //--------------- |
| | | function DrawObject(position, i, j) { |
| | | var ObjType; |
| | | var LayerColor; |
| | | if (isPolyline) |
| | | ObjType = "Polyline"; |
| | | else ObjType = "ImageLabel"; |
| | | |
| | | LayerColor = LayerColorFunction(i); |
| | | |
| | | var size = -2; |
| | | |
| | | if (gLayer == null) { |
| | | CreateGroupOrLayer(); |
| | | |
| | | // style the feature group |
| | | if (featureLayerStyles[ObjType] != null) { |
| | | var result = featureLayerStyles[ObjType](size, abspath() + "/img/point.gif"); // ,"[Color]"); |
| | | if (result === false) |
| | | return false; |
| | | } |
| | | } |
| | | try { |
| | | if (!isPolyline) |
| | | gLayer.FeatureGroups.Point.CreateFeature([position.X, position.Y, position.Altitude], (i + 1) + ";" + Altitude + ";" + LayerColor); |
| | | } |
| | | catch (ex) |
| | | { |
| | | alert(ex); |
| | | } |
| | | |
| | | return true; |
| | | |
| | | } |
| | | |
| | | // -------------- |
| | | function DrawPolyline(cLineString, i) |
| | | { |
| | | layerColor = LayerColorFunction(i); |
| | | |
| | | try { |
| | | var cLineStringGeometry = SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(cLineString); |
| | | gLayer.FeatureGroups.Polyline.CreateFeature(cLineStringGeometry, gGroundDistance[i] + ";" + gHorizontalDistance[i] + ";" + layerColor); |
| | | } |
| | | catch (err) { |
| | | alert(err.description); |
| | | } |
| | | } |
| | | |
| | | // ------------ |
| | | function LayerColorFunction(i) |
| | | { |
| | | if (i < 10) |
| | | return gColorArray2[i]; |
| | | else |
| | | return (255 + 0 * 256 + 0 * 65536); // red |
| | | |
| | | } |
| | | |
| | | //---------- |
| | | // CreateGroupOrLayer |
| | | function CreateGroupOrLayer() { |
| | | |
| | | |
| | | if (gLayer == null) { |
| | | var postfix = new Date().getTime(); |
| | | var LayerName = SGLang.i18n("Text13") + " - " + postfix; |
| | | if (isPolyline) { |
| | | gLayer = SGWorld.Creator.CreateNewFeatureLayer(LayerName, LayerGeometryType.LGT_POLYLINE, "FileName=TerrainProfile" + postfix + ".shp;TEPlugName=OGR;", SGWorld.ProjectTree.RootID); |
| | | } |
| | | else |
| | | gLayer = SGWorld.Creator.CreateNewFeatureLayer(LayerName, LayerGeometryType.LGT_POINT, "FileName=TerrainProfile" + postfix + ".shp;TEPlugName=OGR;", SGWorld.ProjectTree.RootID); |
| | | gLayer.Streaming = $("#createAs").val() == "LayerStreaming"; |
| | | gLayer.BlockWidth = gSpacing * 60; |
| | | gLayer.Refresh(); |
| | | if (isPolyline) |
| | | { |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text54"), 2, 20, 2); // Ground Distance = Total Slope |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text55"), 2, 20, 2); // Total Horizontal |
| | | } |
| | | else |
| | | { |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text44"), 1, 20, 1); // Line |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text45"), 2, 20, 1); // Elevation |
| | | } |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("Text46"), 1, 20, 0); // Color |
| | | try { |
| | | gLayer.DataSourceInfo.Attributes.ImportAll = true; |
| | | gLayer.Visibility.MaxVisibilityDistance = gVisibilityDistance; |
| | | } |
| | | catch (err) { |
| | | alert(err); |
| | | } |
| | | // style the feature group |
| | | if (isPolyline) |
| | | gLayer.FeatureGroups.Polyline.DisplayAs = ObjectTypeCode.OT_POLYLINE; |
| | | else gLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_LABEL; |
| | | |
| | | } |
| | | |
| | | } |
| | | var featureLayerStyles = { |
| | | |
| | | "ImageLabel": function (size, param) { |
| | | gLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_IMAGE_LABEL; |
| | | gLayer.FeatureGroups.Point.SetProperty("Image file", param) |
| | | gLayer.FeatureGroups.Point.SetProperty("Image Color", "[" + SGLang.i18n("Text46") + "]") |
| | | gLayer.FeatureGroups.Point.SetProperty("Scale", size); |
| | | gLayer.FeatureGroups.Point.SetProperty("Altitude Method", 1); |
| | | gLayer.FeatureGroups.Point.SetProperty("Limit growth", true); |
| | | gLayer.FeatureGroups.Point.SetProperty("Tool Tip", SGLang.i18n("Text45") + ": [" + SGLang.i18n("Text45") + "]"); |
| | | }, |
| | | "Polyline": function (size) { |
| | | gLayer.FeatureGroups.Polyline.SetProperty("Line Color", "[" + SGLang.i18n("Text46") + "]"); |
| | | gLayer.FeatureGroups.Polyline.SetProperty("Altitude Method", 1); |
| | | gLayer.FeatureGroups.Polyline.SetProperty("Line Width", size); |
| | | } |
| | | } |
| | | |
| | | |
| | | //--------------- |
| | | // ValidateInput |
| | | function ValidateInput() { |
| | | return true; |
| | | } |
| | | //-------------- |
| | | // CheckNumberEx |
| | | function CheckNumberEx(field, defVal, MinNum, MaxNum) { |
| | | try { |
| | | field.value = validateNumber(field.value); |
| | | |
| | | if (field.value < MinNum) |
| | | field.value = MinNum; |
| | | if (field.value > MaxNum) |
| | | field.value = MaxNum; |
| | | } |
| | | catch (e) { field.value = defVal } |
| | | } |
| | | |
| | | function GetFunctionName(node) { |
| | | var getFunctionNameNode = SGWorld.ProjectTree.GetNextItem(node, 11); |
| | | while (getFunctionNameNode != "") { |
| | | if (SGWorld.ProjectTree.IsGroup(getFunctionNameNode) || SGWorld.ProjectTree.IsLayer(getFunctionNameNode)) |
| | | GetFunctionName(getFunctionNameNode); |
| | | else { |
| | | var Object = SGWorld.Creator.GetObject(getFunctionNameNode); |
| | | if (Object != null) |
| | | if (Object.ObjectType == 1 || Object.ObjectType == 2) |
| | | { |
| | | gObjectName[objectNameIndex] = SGWorld.ProjectTree.GetItemName(getFunctionNameNode); |
| | | objectNameIndex++; |
| | | } |
| | | } |
| | | getFunctionNameNode = SGWorld.ProjectTree.GetNextItem(getFunctionNameNode, 13); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | |
| | | <!--Sig:00000040fRlM10W#5PHcUWSmKcVMuS9XHCwFU2mZ94XDDskmtDR6MBjAhT4DyEnmc1FK3uJzaRUBH0ePc0enxZ3HCL7jGAJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <html> |
| | | <HEAD> |
| | | <TITLE>TerraExplorer Pro - Skyline Software Systems, Inc.</TITLE> |
| | | <LINK REL=StyleSheet HREF="../Style.css" TYPE="text/css"> |
| | | </head> |
| | | <body> |
| | | <table border=0 cellPadding=0 CELLSPACING=0 class="s9" width=100%> |
| | | <tr><td class="s12b" align=center> |
| | | Terrain Profile tool |
| | | </tD></tr> |
| | | <tr><td> |
| | | <br> |
| | | |
| | | <div class=WordSection1> |
| | | |
| | | |
| | | |
| | | <p class=MsoNormal>The Terrain Profile tool displays the terrain elevation profile along a defined path, and related information on this profile such as maximum and minimum elevation values and slope. The terrain profile can also compare between the base terrain and an elevation layer.</p> |
| | | |
| | | <p class=ProcedureHeader style='margin-left:0in;text-indent:0in'><span dir=LTR></span>To use the Terrain Profile tool:</p> |
| | | |
| | | <p class=ListFirstLevel>1.<span style='font:7.0pt "Times New Roman"'> |
| | | |
| | | </span><span dir=LTR></span>Enter the following parameters:</p> |
| | | |
| | | <table class=SkyTable border=1 cellspacing=0 cellpadding=0 width=535 |
| | | style='width:401.0pt;margin-left:.35in;border-collapse:collapse;border:none'> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Mode</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border:solid #4BACC6 1.0pt; |
| | | border-left:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal >Select the profile mode. </p> |
| | | <p class=MsoNormal ><b>Normal</b> Â Display a profile only for the selected polyline(s). </p> |
| | | <p class=MsoNormal ><b>Compare</b> Â Compare the selected polyline's profile to that of a specified elevation layer. </p> |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Quality</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Determines the distance between sample points along the polyline for which the terrain profile is being calculated. High Quality will yield a more accurate result, but take longer to calculate.</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>Elevation Layer</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border:solid #4BACC6 1.0pt; |
| | | border-left:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class=MsoNormal >Select the elevation layer to which to compare the defined polyline. This parameter is only available if Compare is selected in the Mode field. </p> |
| | | |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | |
| | | |
| | | <p class=ListFirstLevel>2.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span> Select one of the following methods of designating the polyline(s) for which the terrain profile should be calculated:</p> |
| | | <ul> |
| | | <li><b>Follow Line</b> - A terrain profile is created along the drawn line. In the 3D Window, click the left mouse button to place the line waypoints, and right-click to complete the line. |
| | | </li> |
| | | |
| | | <li><b>Selected Group</b> - A terrain profile is created for each of the polylines in the selected group. Select the required layer from the Project Tree, and then click Selected Group. |
| | | </li> |
| | | |
| | | <li><b>From Clipboard</b> - A terrain profile is created for each of the polylines in the clipboard. |
| | | </li> |
| | | |
| | | </ul> |
| | | |
| | | </div> |
| | | </td></tr> |
| | | </table> |
| | | |
| | | <table> |
| | | <tr> |
| | | <td> |
| | | <p class=ListFirstLevel>3.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span> A terrain profile graph opens, displaying the terrain elevation profile. </p> |
| | | |
| | | <p><b>Note: </b>When you click any point on the graph, the corresponding point on the polyline in the 3D Window is displayed in the center of the screen. </p> |
| | | |
| | | <p class=ListFirstLevel>4.<span style='font:7.0pt "Times New Roman"'> |
| | | </span><span dir=LTR></span> If you want to export the terrain profile to a shapefile layer, click <b>Export to Layer</b>. </p> |
| | | <p><b>Note</b>: When a terrain profile created for multiple lines (in a group or from clipboard), is exported to a layer, the line color on the graph corresponds to the color of the points that make up the line in the layer.</p> |
| | | |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <br /> |
| | | <span style="font-size:11px;">Flot graph: copyright (c) 2007-2014 IOLA and Ole Laursen</span> |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040VyxGyMzDNk7gMtBfLnOCA2eh9d59#PPFXEd4k.rcqCzKBKrVoknYHT7CUCJKaEah4NeucE6WJwDR2vfOFmnUGpJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SGLang.lang = $.extend(SGLang.lang, { |
| | | ToolTitle: "SkylineGlobe - Skyline Software Systems, Inc.", |
| | | ToolName: "Volume Analysis", |
| | | resultHeader: "Volume Analysis Results", |
| | | help: "Help", |
| | | compare: "Compare", |
| | | select: "Select", |
| | | aboveSurface: "Horizontal Plane", |
| | | modifySelect: "Modify Terrain â Select Existing", |
| | | selectModifyFromlist: "Select modify terrain object(s) ", |
| | | selectElevationFromlist: "Select elevation layer", |
| | | modifyNew: "Modify Terrain â Draw New", |
| | | elevationLayer: "Elevation Layer", |
| | | quality: "Quality", |
| | | low: "Low", |
| | | medium: "Medium", |
| | | high: "High", |
| | | refresh: "Refresh list", |
| | | drawObjects: "Results Layer", |
| | | startCalculate: "Start<br\>Calculation", |
| | | TextAbort: " (Esc to abort)", |
| | | createModify: "Create<br\>Modify", |
| | | drawArea: "Draw<br\>Area", |
| | | fromClipboard: "From<br>Clipboard", |
| | | noPolygon: "No polygon objects were detected on the clipboard", |
| | | OnTerrainIgnore:"The Volume Analysis tool does not support 'On terrain' polygons", |
| | | sqm: "square meters", |
| | | cubicm: "cubic meters", |
| | | sqft: "square feet", |
| | | cubicf: "cubic feet", |
| | | volume: "Volume", |
| | | volumeResult: "Volume Analysis Result", |
| | | volumeType: "VolumeType", |
| | | volumeArea: "VolumeArea", |
| | | volumeAreaTitle: "Cell Area", |
| | | volumePlane: "Volume Horizontal Plane", |
| | | volumeChange: "Volume Change", |
| | | volumeDiff: "VolumeDiff", |
| | | volumeAdded: "Volume Fill", |
| | | volumeRemoved: "Volume Cut", |
| | | volumeEqual: "No Change", |
| | | objectVolumeAdded: "Volume <b>fill: </b>", |
| | | objectVolumeRemoved: "Volume <b>cut: </b>", |
| | | totalNetVolume: "Total net volume: ", |
| | | Area: "Area", |
| | | cut: "(cut)", |
| | | fill: "(fill)", |
| | | totalVolumeAdded: "Total volume <b>fill: </b>", |
| | | totalVolumeRemoved: "Total volume <b>cut: </b>", |
| | | PrepareClaculation: "Generating elevation buffers...", |
| | | calculatingVolume: "Calculating volume of object ", |
| | | drawPolygon: "Draw polygon around area to measure. First point defines the polygon's elevation. Right click to start the volume measurement.", |
| | | selectModify: "Select one or more Modify Terrain objects from the list", |
| | | selectElevation: "Select an Elevation Layer from the list", |
| | | color: "Color", |
| | | noElevation: "Could not find elevation layer overlap with the selected polygon", |
| | | Text_AlertCaption: "TerraExplorer", |
| | | |
| | | Text999: "" |
| | | }); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <script src="..\Jquery\jquery.min.js"></script> |
| | | <head> |
| | | <title>ToolTitle</title> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
| | | <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> |
| | | <link rel="StyleSheet" href="../Style.css" type="text/css"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td class="ToolTopArea" id="TopAreaTD" width="100%" valign="middle" > |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| | | <tr> |
| | | <td width="55px"><img style="margin-left:5px;" src="ToolIcon.png" alt="" /></td> |
| | | <td id="TitleTD" align="center" class="s12w i18n">ToolName</td> |
| | | <td align="right" id="CloseHelpTd"><img style="margin-right:5px;" alt="" src="../CommonImg/help.png" border="0" class="i18n" alt="help" title="help" onclick="DisplayHelpPopup6(SGLang.i18nFile('help.html'),SGLang.i18n('help'))" style="cursor: pointer;"></td> |
| | | </tr> |
| | | </table> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ToolTopSeperator"></td> |
| | | </tr> <tr class="s8"> |
| | | <td > |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="2" > |
| | | |
| | | <tr class='TableOtherLine'> |
| | | <td class="s8b" > |
| | | <label for="Mode" class="i18n">compare</label> |
| | | </td> |
| | | <td align="left"> |
| | | <select id="CompareModeID" onchange="ChangeMode();" style="width:155pt;"> |
| | | <option class="i18n" value="3" selected="selected">aboveSurface</option> |
| | | <option class="i18n" value="1" >modifyNew</option> |
| | | <option class="i18n" value="0" >modifySelect</option> |
| | | <!-- <option class="i18n" value="2" >elevationLayer</option> --> |
| | | |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | <tr id="modifyListDiv"> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">select</label> |
| | | </td> |
| | | <td> |
| | | <!-- DO NOT REMOVE THE FOCUS CALL IN THE LIST BELOW!! |
| | | This focus call minimize the effect of a very strange bug. When you select an entry from the Viewshed list, click on the terrain and then ctrl-click on other list entry the HTML list control do not really recieve this additional selection (although you do see the new line highlighted). |
| | | --> |
| | | <!-- <span class="i18n">selectModifyFromlist</span> --> |
| | | <select id="ModifyID" size='5' multiple onmouseover="this.focus()" ondblclick="flyToSelected('ModifyID');" style="width:100%;" > </select> </br> |
| | | <span id="refresh" onclick="RefreshList('ModifyID',30);" style="text-decoration:underline;cursor:pointer;" class="i18n">refresh</span> |
| | | |
| | | </td> |
| | | </tr> |
| | | <!-- |
| | | <tr id="elevationListDiv"> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">select</label> |
| | | </td> |
| | | <td> --> |
| | | <!-- DO NOT REMOVE THE FOCUS CALL IN THE LIST BELOW!! |
| | | This focus call minimize the effect of a very strange bug. When you select an entry from the Viewshed list, click on the terrain and then ctrl-click on other list entry the HTML list control do not really recieve this additional selection (although you do see the new line highlighted).--> |
| | | <!-- <span class="i18n">selectElevationFromlist</span> |
| | | <span class="i18n" style="text-decoration:underline;cursor:pointer;" onclick="RefreshList('ElevationsID',38);">refresh</span> <br /> |
| | | <select id="ElevationsID" size="5" ondblclick="flyToSelected('ElevationsID');" onmouseover="this.focus()" style="width:100%;" > |
| | | </select> |
| | | |
| | | </td> |
| | | </tr> |
| | | --> |
| | | <tr > |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">quality</label> |
| | | </td> |
| | | <td align="left"> |
| | | <select id="DensityID" > |
| | | <option class="i18n" value="0" >low</option> |
| | | <option class="i18n" value="1" selected="selected">medium</option> |
| | | <option class="i18n" value="2" >high</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr > |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">drawObjects</label> |
| | | </td> |
| | | <td align="left"> |
| | | <label class="switch"> |
| | | <input type="checkbox" id="showObjectsID"> |
| | | <span class="slider round"></span> |
| | | </label> |
| | | <!-- <input type="checkbox" id="showObjectsID" /> --> |
| | | </td> |
| | | </tr> |
| | | |
| | | </table> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="center" class="ToolButtonsArea"> |
| | | <div id="selectModifyDiv"> |
| | | <button id="selectModifyBtn" class="MenuButton MenuButtonLast" onclick="startCalculate();"> <img src="./img/Calculate.png" /><br /><span class="i18n">startCalculate</span></button> |
| | | </div> |
| | | |
| | | <div id="ModifyDiv" style="display:none"> |
| | | <button id="DrawModifyBtn" class="MenuButton MenuButtonLast" onclick="startCalculate();"> <img src="./img/ModifyTerrain.png" /><br /><span class="i18n">createModify</span></button> |
| | | </div> |
| | | |
| | | <div id="SurfaceDiv" style="display:none"> |
| | | <button id="DrawPlaneBtn" class="MenuButton" onclick="startCalculate();"> <img src="../commonImg/polygon.png" /><br /> <span class="i18n">drawArea</span></button> |
| | | <button id="clipboardButton" class="MenuButton MenuButtonLast" onclick="SelectClipboardObjects()"> <img src="../commonImg/Clipboard.png" /><br /> <span class="i18n">fromClipboard</span></button> |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <!-- <object id="SGWorld" classid="CLSID:3a4f9197-65a8-11d5-85c1-0001023952c1"> </object> --> |
| | | <object id="SGWorld" classid="CLSID:3a4f9199-65a8-11d5-85c1-0001023952c1"> </object> |
| | | |
| | | |
| | | <script language="javascript" src="../ToolsCommon71.js"></script> |
| | | |
| | | <script language="JavaScript"> |
| | | //** this is a global variables for the polyline/polygon drawings |
| | | var gDebug = false; |
| | | var gPopupCaption = ""; |
| | | var gFoundPolygon = false; |
| | | |
| | | var gObjectsList = []; |
| | | var gGeometryList = []; |
| | | var gVolumeResultHTML = ""; |
| | | var gTotalVolumeAdded = 0; |
| | | var gTotalVolumeRemoved = 0; |
| | | var gLayer; |
| | | var gCreateModifyMode = false; |
| | | //var gElevationBuffer=[]; |
| | | var gQuaryResolution = 1024; |
| | | var ResolutionsArray= { "0": 8, "1":4, "2":2 }; |
| | | var gOnTerrainMessageDisplayed = false; |
| | | |
| | | |
| | | //var SGWorld = new ActiveXObject("TerraExplorerX.SGWorld70"); |
| | | |
| | | Date.prototype.stdTimezoneOffset = function () { |
| | | var jan = new Date(this.getFullYear(), 0, 1); |
| | | var jul = new Date(this.getFullYear(), 6, 1); |
| | | return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); |
| | | } |
| | | |
| | | Date.prototype.dst = function () { |
| | | return this.getTimezoneOffset() < this.stdTimezoneOffset(); |
| | | } |
| | | |
| | | //-------------- |
| | | // Init |
| | | function Init() { |
| | | window.ondragstart = function() { return false; } |
| | | |
| | | ChangeMode(); |
| | | gPolyObj = null; |
| | | |
| | | if (SGWorld.Version.Type == 2) // if TE Viewer remove the "Add New Modify Terrain" option because it is not available even via the API |
| | | $("#CompareModeID option[value='1']").detach(); |
| | | Reset(); |
| | | } |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset() { |
| | | |
| | | GroupID = null; |
| | | gCreateModifyMode = false; |
| | | bDontAskme = false; |
| | | gObjectsList = []; |
| | | gGeometryList = []; |
| | | gTotalVolumeAdded = 0; |
| | | gTotalVolumeRemoved = 0; |
| | | gOnTerrainMessageDisplayed = false; |
| | | gVolumeResultHTML = ""; |
| | | |
| | | $("#DrawModifyBtn").removeClass("MenuButtonHighlight"); |
| | | $("#DrawPlaneBtn").removeClass("MenuButtonHighlight"); |
| | | |
| | | SGWorld.ProjectTree.EnableRedraw(1); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | |
| | | } |
| | | //------------------- |
| | | // ChangeMode |
| | | function ChangeMode() { |
| | | |
| | | $("#modifyListDiv").hide(); |
| | | $("#elevationListDiv").hide(); |
| | | $("#selectModifyDiv").hide(); |
| | | $("#ModifyDiv").hide(); |
| | | $("#SurfaceDiv").hide(); |
| | | |
| | | var CompareMode = $("#CompareModeID").val(); |
| | | |
| | | if (CompareMode == "0") { // Modify list |
| | | $("#selectModifyDiv").show(); |
| | | $("#modifyListDiv").show(); |
| | | RefreshList("ModifyID", 30); |
| | | } |
| | | if (CompareMode == "1") { // Modify new |
| | | $("#ModifyDiv").show(); |
| | | } |
| | | |
| | | if (CompareMode == "3") { // Polygon Surface |
| | | $("#SurfaceDiv").show(); |
| | | } |
| | | } |
| | | //------------------- |
| | | // RefreshList |
| | | function RefreshList(list, objectType) { |
| | | var ModifyObjects=[]; |
| | | |
| | | $("#"+list).html(""); |
| | | // BuildList(SGWorld.ProjectTree.RootID, list, objectType); |
| | | BuildObjectsList(SGWorld.ProjectTree.RootID, ModifyObjects, objectType); |
| | | |
| | | ModifyObjects.forEach (function (val){ |
| | | var name = SGWorld.ProjectTree.GetItemName (val); |
| | | $("#"+list).append("<option value=" + val + ">" + name + "</option>"); |
| | | }); |
| | | } |
| | | |
| | | //--------------- |
| | | // flyToSelected |
| | | function flyToSelected(list) { |
| | | $("#"+list+" option:selected").each(function () { |
| | | var ElevationID = ($(this).val()); |
| | | SGWorld.Navigate.FlyTo(ElevationID, 10); |
| | | }); |
| | | } |
| | | |
| | | //-------------- |
| | | // startCalculate |
| | | //-------------- |
| | | function startCalculate() { |
| | | var compareMode = $("#CompareModeID").val(); |
| | | |
| | | if (compareMode == 0) { // Select existing Modify Terrain object(s) |
| | | if ($("#ModifyID option:selected").length == 0) { |
| | | TEAlert (SGLang.i18n("Text_AlertCaption"),SGLang.i18n("selectModify")); |
| | | return; |
| | | } |
| | | $("#ModifyID option:selected").each(function () { |
| | | gObjectsList.push ($(this).val()); |
| | | gGeometryList.push(null); |
| | | }); |
| | | CalculateList(); |
| | | Reset(); |
| | | } |
| | | |
| | | if (compareMode == 1) { // create new Modify Terrain |
| | | gCreateModifyMode = true; |
| | | SGWorld.Command.Execute(1012, 15); |
| | | SGWorld.AttachEvent("OnObjectAction", OnObjectAction); |
| | | } |
| | | |
| | | if ( compareMode == 3) { // Draw polygon (for volume above plane) |
| | | if (drawing.drawingEditMode !=-1) { // already in drawing . Reset everyting |
| | | drawing.abort(); |
| | | } |
| | | else { |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("drawPolygon")); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | drawing.drawPolygon ({ |
| | | style: { |
| | | lineColor:"#ffffff", |
| | | lineWidth: 3, |
| | | fillColor: "#FFD800", |
| | | fillOpacity: 0.1 // fill opacity (0-1). Default = 0 |
| | | }, |
| | | horizontal: true, |
| | | altitudeMethod:3, // altitudeMethod - use 2 of "OnTerrain" (drape on terrain) and 3 for "Absolute" (above mean sea level). Currently other methods are not supported |
| | | deleteWhenExit: true, // |
| | | //parentGoupID: volumeGroup, |
| | | saveOnExit: false, // save the polyline/polygon when exiting the project. Default = false |
| | | onFinish: endDrawPolygon, |
| | | onAbort: Reset |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | //------------- |
| | | // OnObjectAction |
| | | function OnObjectAction(ObjID, action) { |
| | | |
| | | if (gCreateModifyMode && action.Code == 16) { // Push the new Modify Terrain object to the list and calculate the volume |
| | | try { |
| | | gCreateModifyMode = false; |
| | | gObjectsList.push(ObjID); |
| | | gGeometryList.push(null); |
| | | CalculateList(); |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | Reset(); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | //----------- |
| | | // SelectClipboardObjects |
| | | function SelectClipboardObjects() { |
| | | var compareMode = $("#CompareModeID").val(); |
| | | gFoundPolygon = false; |
| | | |
| | | searchGeometriesClipboard(calculatePolygon); |
| | | if (!gFoundPolygon) |
| | | TEAlert (SGLang.i18n("Text_AlertCaption"),SGLang.i18n("noPolygon")); |
| | | else { |
| | | if (compareMode==3) |
| | | CalculateListSurface(); |
| | | } |
| | | |
| | | Reset(); |
| | | } |
| | | //------------- |
| | | // endDrawPolygon |
| | | function endDrawPolygon(geometry, type, altitudeType,ObjID) { |
| | | var compareMode = $("#CompareModeID").val(); |
| | | try { |
| | | if (calculatePolygon(geometry, type, altitudeType)){ |
| | | if (compareMode==3) |
| | | CalculateListSurface(); |
| | | } |
| | | |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | |
| | | } |
| | | //------------- |
| | | // calculatePolygon |
| | | function calculatePolygon(geometry, type, altitudeType) { |
| | | var compareMode = $("#CompareModeID").val(); |
| | | |
| | | if (type != 2) |
| | | return true; |
| | | gFoundPolygon = true; |
| | | |
| | | if (compareMode==3){ // compare surface polygon |
| | | if (altitudeType==2){ // Ignore OnTerrain polygons |
| | | if (!gOnTerrainMessageDisplayed) |
| | | TEAlert (SGLang.i18n("Text_AlertCaption"),SGLang.i18n("OnTerrainIgnore")); |
| | | gOnTerrainMessageDisplayed = true; |
| | | |
| | | } |
| | | else { |
| | | gObjectsList.push(altitudeType); |
| | | gGeometryList.push(geometry); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //------------------- |
| | | // CalculateList |
| | | function CalculateList ( ) { |
| | | try { |
| | | setUnits(); |
| | | var resultHTML=""; |
| | | $(gObjectsList).each(function (index, value) { |
| | | var volumeGeometry; |
| | | var MeasuredObject = SGWorld.ProjectTree.GetObject(value); |
| | | if (gGeometryList[index]!=null) |
| | | volumeGeometry = gGeometryList[index]; |
| | | else |
| | | volumeGeometry = MeasuredObject.Geometry; |
| | | |
| | | var origVisability = SGWorld.ProjectTree.GetVisibility(value); |
| | | var qualityStep = ResolutionsArray[$("#DensityID").val()]; |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("PrepareClaculation"), 1,-1); |
| | | SGWorld.ProjectTree.SetVisibility(value, false); |
| | | var elevationBufferBefore = getElevationBuffer (volumeGeometry, gQuaryResolution); |
| | | |
| | | SGWorld.ProjectTree.SetVisibility(value, true); |
| | | var elevationBufferAfter = getElevationBuffer (volumeGeometry, gQuaryResolution); |
| | | if (calculateVolume(volumeGeometry,qualityStep, SGLang.i18n("Area")+index,elevationBufferBefore,elevationBufferAfter,-999)==false){ |
| | | Reset (); |
| | | return false; |
| | | } |
| | | resultHTML += gVolumeResultHTML; |
| | | SGWorld.ProjectTree.SetVisibility(value, origVisability); |
| | | }); |
| | | |
| | | showResultPopup (resultHTML); |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | //------------------- |
| | | // CalculateList |
| | | // Special function to handle volume above flat surface |
| | | function CalculateListSurface ( ) { |
| | | try { |
| | | setUnits(); |
| | | var resultHTML=""; |
| | | |
| | | $(gGeometryList).each(function (index, value) { |
| | | var pos = SGWorld.Creator.CreatePosition (value.Rings(0).Points(0).x,value.Rings(0).Points(0).y,value.Rings(0).Points(0).z,gObjectsList[index],0,0,0,0); |
| | | var absPos = pos.ToAbsolute(2); |
| | | var qualityStep = ResolutionsArray[$("#DensityID").val()]; |
| | | |
| | | SGWorld.Window.ShowMessageBarText(SGLang.i18n("PrepareClaculation"), 1,-1); |
| | | var elevationBuffer = getElevationBuffer (value, gQuaryResolution); |
| | | if (calculateVolume(value,qualityStep, SGLang.i18n("Area")+index,elevationBuffer,null,absPos.Altitude)==false){ |
| | | Reset(); |
| | | return false; |
| | | } |
| | | resultHTML += gVolumeResultHTML; |
| | | |
| | | AddResultPolygon (value,absPos.Altitude,gVolumeResultHTML); |
| | | }); |
| | | |
| | | showResultPopup (resultHTML); |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | |
| | | //------------------ |
| | | function showResultPopup (resultHTML){ |
| | | var netStr = (gTotalVolumeAdded>gTotalVolumeRemoved)?SGLang.i18n("fill"):SGLang.i18n("cut"); |
| | | resultHTML += "<br/>" + SGLang.i18n("totalNetVolume") + "<b>" + (Math.abs(gTotalVolumeAdded-gTotalVolumeRemoved)).toFixed(3) + "</b> "+ netStr+" " + gVolumeUnit + "<br/>"; |
| | | if (gGeometryList.length > 0) |
| | | DisplayMessagePopup(SGLang.i18n("ToolName"), SGLang.i18n("resultHeader"), abspath() + "/img/volumeblack.png", resultHTML, 100, 100, 400, 300, true); |
| | | } |
| | | //------------- |
| | | // calculateVolume |
| | | function calculateVolume(geometry, qualityStep, ObjName, elevationBuffer0, elevationBuffer1, flatAltitude) { |
| | | |
| | | |
| | | var polygonGeometry = geometry.Clone(); // to enable edit geometry (ref) when geometry type is RelativeToPivot. Navon. |
| | | var envelope = polygonGeometry.Envelope; // Multi polygon evnelope (min/max) |
| | | var MinX = Math.min(envelope.Rings(0).Points(0).x, envelope.Rings(0).Points(2).x); |
| | | var MaxX = Math.max(envelope.Rings(0).Points(0).x, envelope.Rings(0).Points(2).x); |
| | | var MinY = Math.min(envelope.Rings(0).Points(0).y, envelope.Rings(0).Points(2).y); |
| | | var MaxY = Math.max(envelope.Rings(0).Points(0).y, envelope.Rings(0).Points(2).y); |
| | | |
| | | var stepX = Math.abs(MaxX - MinX) / gQuaryResolution; |
| | | var stepY = Math.abs(MaxY - MinY) / gQuaryResolution; |
| | | |
| | | // calculate cell 2D size |
| | | var cellPos0= SGWorld.Creator.CreatePosition(MinX, MaxY, 0, 3, 0, 0, 0, 1); |
| | | var cellPos1 = SGWorld.Creator.CreatePosition(MinX , MaxY - stepY, 0, 3, 0, 0, 0, 1); |
| | | var cellPos2 = SGWorld.Creator.CreatePosition(MinX + stepX, MaxY, 0, 3, 0, 0, 0, 1); |
| | | var cellWidth = cellPos0.DistanceTo(cellPos1) * qualityStep; |
| | | var cellArea = cellPos0.DistanceTo(cellPos1) * cellPos0.DistanceTo(cellPos2) * qualityStep * qualityStep * gAreaUnitFactor; |
| | | |
| | | //var startDate = new Date(); |
| | | var drawObjects = $("#showObjectsID").is(':checked') ? true : false; |
| | | if (drawObjects) { |
| | | CreateLayer(cellWidth * 100, ObjName); |
| | | var result = featureLayerStyles["ImageLabel"](cellWidth/40, abspath() + "/img/point.png"); // ,"[Color]"); |
| | | } |
| | | |
| | | var VolumeAdded = 0; |
| | | var VolumeRemoved = 0; |
| | | var MessageBarIndex = 0; |
| | | var GeoIntersect= []; |
| | | var x,y; |
| | | try{ |
| | | for (var i = qualityStep/2; i < gQuaryResolution-qualityStep; i = i + qualityStep) { |
| | | if(SGWorld.GetParam(9901)){ // user click on the ESC button in TE |
| | | if (drawObjects) |
| | | SGWorld.ProjectTree.DeleteItem(gLayer.ID); |
| | | return false; |
| | | } |
| | | |
| | | // Build line geometry WKT |
| | | var WKT = ""; |
| | | for (var j = qualityStep / 2; j < gQuaryResolution-qualityStep; j = j + qualityStep){ |
| | | x = MinX + i * stepX; |
| | | y = MaxY - j * stepY; |
| | | WKT += "("+x+" "+y+"), "; |
| | | } |
| | | var fullWKT = "MULTIPOINT ("+ WKT.substr(0,WKT.length -2)+")"; |
| | | var pointGeometryArry = SGWorld.Creator.GeometryCreator.CreateGeometryFromWKT (fullWKT); // "MULTIPOINT ((10 40), (40 30), (20 20), (30 10))"); |
| | | var GeoIntersectTmp = polygonGeometry.SpatialOperator.Intersection(pointGeometryArry); |
| | | var GeoIntersectCount = GeoIntersectTmp.Count; |
| | | if (GeoIntersectTmp.GeometryType == 0) // single point |
| | | GeoIntersectCount = 1; |
| | | else // Multiple Points |
| | | GeoIntersect = GeoIntersectTmp; |
| | | |
| | | for (var jj = 0; jj < GeoIntersectCount; jj++){ |
| | | if (GeoIntersectCount==1){ |
| | | x = GeoIntersectTmp.x; |
| | | y = GeoIntersectTmp.y; |
| | | } |
| | | else{ |
| | | x = GeoIntersect(jj).x; |
| | | y = GeoIntersect(jj).y; |
| | | } |
| | | var objColor = "#000000"; |
| | | var volumeType = 0; |
| | | |
| | | var j = Math.round((MaxY-y)/stepY); |
| | | var altitude = (elevationBuffer1 != null)? elevationBuffer1[j * gQuaryResolution + i] : flatAltitude; |
| | | var elevationDiff = altitude - elevationBuffer0[j * gQuaryResolution + i]; |
| | | var volumeDiff = cellArea * elevationDiff * gDistanceUnitFactor; |
| | | if (elevationDiff > 0) { // Added |
| | | volumeType = 1; |
| | | VolumeAdded += Math.abs(volumeDiff); |
| | | objColor = 65280; // "#00ff00"; // green |
| | | } |
| | | else if (elevationDiff < 0) { // Removed |
| | | volumeType = 2; |
| | | VolumeRemoved += Math.abs(volumeDiff); |
| | | objColor = 255; // "#ff0000"; // red |
| | | } |
| | | else { |
| | | volumeType = 0; |
| | | objColor = 0; // "#000000"; // black |
| | | } |
| | | if (drawObjects) { // && i % ObjInterval == 0 && j % ObjInterval == 0) { |
| | | var altitude = (elevationBuffer1 != null)? elevationBuffer1[j * gQuaryResolution + i] : flatAltitude; |
| | | var pos = SGWorld.Creator.CreatePosition(x, y, altitude, 3, 0, 0, 0, 1); |
| | | gLayer.FeatureGroups.Point.CreateFeature([pos.X, pos.Y, pos.Altitude], volumeType + ";" + cellArea.toFixed(3) + ";" + volumeDiff.toFixed(3) + ";" + objColor); |
| | | //SGWorld.Creator.CreateSphere(pos, 2, 0, objColor, objColor, 2, group, "sphere"); |
| | | } |
| | | } // for jj |
| | | MessageBarIndex++; |
| | | if (MessageBarIndex % 10 == 0) { |
| | | var progress = (i / gQuaryResolution) * 100; |
| | | htmlStr = SGLang.i18n("calculatingVolume") + ObjName + ": " + progress.toFixed(0) + "%"+SGLang.i18n("TextAbort"); |
| | | SGWorld.Window.ShowMessageBarText(htmlStr, 1, -1); |
| | | } |
| | | } // for i |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | |
| | | //alert ((new Date() - startDate)/1000); |
| | | SGWorld.Window.HideMessageBarText(); |
| | | gVolumeResultHTML = "<br/><u>" + ObjName + " ("+(polygonGeometry.Area).toFixed(3)+" "+ gAreaUnit+") :</u><br/>" + SGLang.i18n("objectVolumeAdded") + "<b>" + VolumeAdded.toFixed(3) + "</b> " + gVolumeUnit + " <br/> " + SGLang.i18n("objectVolumeRemoved") + "<b>" + VolumeRemoved.toFixed(3) + "</b> " + gVolumeUnit + "<br/>"; |
| | | gTotalVolumeAdded += VolumeAdded; |
| | | gTotalVolumeRemoved += VolumeRemoved; |
| | | if (drawObjects) |
| | | gLayer.Save(); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | //---------- |
| | | // AddResultPolygon |
| | | function AddResultPolygon(geometry,flatAltitude,resultHTML) { |
| | | try { |
| | | // Clear altitude values from geomerty and set it as "Relative to Pivot" with Altitude=flatAltitude |
| | | var WKB = geometry.Wks.ExportToWKB(false); |
| | | var geometryFlat = SGWorld.Creator.GeometryCreator.CreateGeometryFromWKB (WKB); |
| | | |
| | | var volumeGroup = getVolumeGroup(); |
| | | |
| | | var PlaneObj = SGWorld.Creator.createPolygon(geometryFlat, SGWorld.Creator.CreateColor(255, 255, 255, 1), SGWorld.Creator.CreateColor(255, 255, 0, 128),3, getVolumeGroup(), SGLang.i18n("volumePlane")); |
| | | PlaneObj.Position.Altitude = flatAltitude; |
| | | var popupMsg = SGWorld.Creator.CreatePopupMessage(SGLang.i18n("volume"), "", 0,0, 400, 200, -1); |
| | | popupMsg.Flags = 2 + 32; |
| | | popupMsg.InnerText = "<html><body>"+resultHTML; |
| | | PlaneObj.Message.MessageID = popupMsg.ID; |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | } |
| | | //---------- |
| | | // getVolumeGroup |
| | | function getVolumeGroup() { |
| | | try { |
| | | var volumeGroup= SGWorld.ProjectTree.FindItem(SGLang.i18n("volumeResult")); |
| | | if (volumeGroup ==0) |
| | | volumeGroup = SGWorld.ProjectTree.CreateGroup (SGLang.i18n("volumeResult"),SGWorld.ProjectTree.RootID); |
| | | return volumeGroup; |
| | | } |
| | | catch (err) { return SGWorld.ProjectTree.RootID; } |
| | | } |
| | | //---------- |
| | | // CreateLayer |
| | | function CreateLayer(blockWidth, ObjName) { |
| | | try { |
| | | var postfix = new Date().getMilliseconds(); |
| | | var LayerName = SGLang.i18n("volume")+"-"+ObjName+"-"+ postfix; |
| | | |
| | | gLayer = SGWorld.Creator.CreateNewFeatureLayer(LayerName, LayerGeometryType.LGT_POINT, "FileName=VolumeAnalysis" + postfix + ".shp;TEPlugName=OGR;", getVolumeGroup()); |
| | | gLayer.Streaming = true; |
| | | gLayer.BlockWidth = blockWidth; |
| | | gLayer.Refresh(); |
| | | |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("volumeType"), 1, 10, 0); // Integer (0=no change, 1=Added, 2=Removed) |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("volumeArea"), 2, 20, 2); // Double |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("volumeDiff"), 2, 20, 2); // Double |
| | | gLayer.DataSourceInfo.Attributes.CreateAttribute(SGLang.i18n("color"), 1, 20, 0); // Integer (color) |
| | | |
| | | gLayer.DataSourceInfo.Attributes.ImportAll = true; |
| | | gLayer.Visibility.MaxVisibilityDistance = blockWidth*50; |
| | | gLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_LABEL; |
| | | } |
| | | catch (err) { if (gDebug) alert(err.message); } |
| | | |
| | | } |
| | | var featureLayerStyles = { |
| | | |
| | | "ImageLabel": function (size, icon) { |
| | | gLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_IMAGE_LABEL; |
| | | gLayer.FeatureGroups.Point.SetProperty("Image file", icon) |
| | | gLayer.FeatureGroups.Point.SetProperty("Image Color", "[" + SGLang.i18n("color") + "]") |
| | | gLayer.FeatureGroups.Point.SetProperty("Scale", size); |
| | | gLayer.FeatureGroups.Point.SetProperty("Lock Mode", 1); |
| | | gLayer.FeatureGroups.Point.SetProperty("Altitude Method", 1); |
| | | gLayer.FeatureGroups.Point.SetProperty("Limit growth", false); |
| | | gLayer.FeatureGroups.Point.SetProperty("Smallest Visible Size", 1); |
| | | gLayer.FeatureGroups.Point.SetProperty("Tool Tip", SGLang.i18n("volumeAreaTitle") + ": [" + SGLang.i18n("volumeArea") + "] " + gAreaUnit + ", " + SGLang.i18n("volumeChange") + ": [" + SGLang.i18n("volumeDiff") + "] " + gVolumeUnit); |
| | | } |
| | | } |
| | | var gAreaUnitFactor = 1; |
| | | var gDistanceUnitFactor = 1; |
| | | var gAreaUnit = ""; |
| | | var gVolumeUnit = ""; |
| | | //-------------- |
| | | //setUnits |
| | | function setUnits() { |
| | | if (SGWorld.GetOptionParam("AltitudeAndDistance") == 0) { |
| | | gAreaUnitFactor = 1; |
| | | gDistanceUnitFactor = 1; |
| | | gAreaUnit = SGLang.i18n("sqm"); ; |
| | | gVolumeUnit = SGLang.i18n("cubicm"); |
| | | } |
| | | else { |
| | | gDistanceUnitFactor = 3.28084; |
| | | gAreaUnitFactor = gDistanceUnitFactor*gDistanceUnitFactor; |
| | | gAreaUnit = SGLang.i18n("sqft"); ; |
| | | gVolumeUnit = SGLang.i18n("cubicf"); |
| | | } |
| | | |
| | | } |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040A4D6tC7Zom5gxtxWpTemnbB5tB4ONWWklxGtYL74Gk8af.GyjC6c2WZEJmRsLUMH0cRACFIY2P2B1iQRzM0NMRJJ--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <html class="helpHtml" > |
| | | <HEAD> |
| | | <TITLE>TerraExplorer Pro - Skyline Software Systems, Inc.</TITLE> |
| | | <LINK REL=StyleSheet HREF="../Style.css" TYPE="text/css"> |
| | | </head> |
| | | <body class="s8"> |
| | | <table border=0 cellPadding=0 CELLSPACING=0 class="s8" width=100%> |
| | | <tr><td class="s12b" align=center> |
| | | Volume Analysis |
| | | </tD></tr> |
| | | <tr><td> |
| | | <br> |
| | | |
| | | <div class="s8" > |
| | | |
| | | |
| | | <p class="s8">The Volume Analysis tool analyzes the volume of the terrain or model removed or added by selected horizontal planes or modify terrain/3DML objects. </p> |
| | | |
| | | <p class=ProcedureHeader style='margin-left:0in;text-indent:0in'><span dir=LTR></span>To use the Volume Analysis tool:</p> |
| | | |
| | | <p class="s8">1.<span > |
| | | </span><span dir=LTR></span>In the <b>Compare </b>field, select one of the following analysis modes:</p> |
| | | |
| | | <ul > |
| | | <li class="s8"><b>Horizontal Plane</b> â Calculate the volume added or removed by a horizontal plane defined either by a polygon you now draw or by polygons already on the clipboard.</li> |
| | | <li class="s8"><b>Modify Terrain â Draw New</b> â Calculate the volume added or removed by a new Modify Terrain object that you now create.</li> |
| | | <li class="s8"><b>Modify Terrain â Select Existing</b> â Calculate the volume added or removed by the Modify Terrain object(s) selected from the list.</li> |
| | | </ul> |
| | | <p class="s8">2.<span > |
| | | </span><span dir=LTR></span>Enter the required parameters</p> |
| | | |
| | | <table class=SkyTable border=1 cellspacing=0 cellpadding=0 width=535 |
| | | style='width:401.0pt;margin-left:.35in;border-collapse:collapse;border:none'> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class="s8" style='margin-left:.25in;text-indent:-.25in'>Compare</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border:solid #4BACC6 1.0pt; |
| | | border-left:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class="s8" style=''> |
| | | This field is displayed only when <b>Modify Terrain â Select Existing</b> mode is selected.<br /> |
| | | Select one or more Modify Terrain objects from the list. Use CTRL-click or SHIFT-click to multi-select.<br /> |
| | | Click <b> Refresh </b>to update the list if changes were made to the project.</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class="s8" style='margin-left:.25in;text-indent:-.25in'>Quality</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:#D2EAF1;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class="s8" > |
| | | Determines the accuracy level by which the analysis is performed. Select one of the following options: |
| | | <ul> |
| | | <li class="s8">Low â Performs 16K samples </li> |
| | | <li class="s8">Medium â Performs 65K samples</li> |
| | | <li class="s8">High â Performs 260K samples</li> |
| | | </ul> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td width=115 valign=top style='width:86.05pt;border:solid #4BACC6 1.0pt; |
| | | border-top:none;background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class="s8" style='margin-left:.25in;text-indent:-.25in'>Results Layer</p> |
| | | </td> |
| | | <td width=420 valign=top style='width:314.95pt;border-top:none;border-left: |
| | | none;border-bottom:solid #4BACC6 1.0pt;border-right:solid #4BACC6 1.0pt; |
| | | background:white;padding:1.45pt 5.75pt 4.3pt 5.75pt'> |
| | | <p class="s8" >Select this option to create a point feature layer representing each volume analysis result. The area and volume (removed or added) of each sample in the feature layer is stored in attribute fields of the feature that represents the sample.</p> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <p class="s8"> </p> |
| | | |
| | | <p class="s8">3.<span > |
| | | </span><span dir=LTR></span>Perform the steps relevant to the selected mode:</p> |
| | | |
| | | <p style='margin-left:.25in;' class="s8b">Horizontal Plane Mode<br /></p> |
| | | <ul > |
| | | <li class="s8">Select either of the following methods to mark your area of interest:</li> |
| | | <ul> |
| | | <li class="s8"><b>Draw Area â</b> The area is marked by drawing a polygon in the 3D Window. If this option is selected, left-click in the 3D Window to place the polygon waypoints, and right-click to complete. </li> |
| | | <li class="s8"><b>From Clipboard â</b> Analysis is performed in the locations of all polygon clipboard objects. The polygons must be on the clipboard before selecting this option. </li> |
| | | </ul> |
| | | </ul> |
| | | <p style='margin-left:.25in;'> |
| | | <span class="s8b">Modify Terrain â New Object Mode</span><br /> |
| | | <br /> |
| | | a. Click Create Modify. The Modify Terrain property sheet is displayed.<br /> |
| | | b. In the 3D Window, left-click to place the polygon waypoints, and right-click to complete.<br /> |
| | | c. Close the property sheet to start calculation.<br /> |
| | | <br /> |
| | | <span class="s8b">Modify Terrain â Select Mode</span><br /> |
| | | </p> |
| | | <ul><li class="s8">Click Start Calculate.</li></ul> |
| | | |
| | | |
| | | |
| | | <p class="s8">4.<span > |
| | | </span><span dir=LTR></span>When calculation is complete, a dialog box is displayed with the analysis results.</p> |
| | | |
| | | </div> |
| | | |
| | | </td></tr> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040MUqfpTINZl1hd8e7yoILHPbXZKwTurHEKJZCrY9ndju8VoP58hwAv1xUsBZXw9T5VDIxwhLiXZYF7A6L3ba7XtJJ--> |
| | |
| | | </COMReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\area.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\AreaMeasurement.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\img\3d_palne_area.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\img\delete.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\img\delete_last_point.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\img\horizontal.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\img\snap.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\img\surface.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\AreaMeasurement\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\cursor_m.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\dis.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\distanceMeasurement.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\height.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\Hourglass.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\aerial.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\delete.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\delete_last_point.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\horizontal.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\snap.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\TerrainProfile.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\img\verticle.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\DistanceMeasurement\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\2052\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\arrow.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\cursor_m.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\help.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\img\point.gif"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\SlopeMapQuery.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\SlopeMapQuery\ToolIcon.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\1033\help.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\1033\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\2052\help.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\2052\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\cursor_m.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\help.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\Hourglass.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\ButtonBackground.jpg"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\minmaxAlt.jpg"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\minmaxSlope.jpg"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\point.gif"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\waypoint.jpg"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\zoomall.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\zoomin.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\img\zoomout.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\TerrainProfile.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\TerrainProfile.ico"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\TerrainProfilePopup.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\TerrainProfile\ToolIcon.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\cursor_m.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\help.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\Hourglass.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\img\Calculate.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\img\ModifyTerrain.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\img\point.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\img\VolumeBlack.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\ToolIcon.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\Volume\Volume.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\CrossSection.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\CrossSectionPopup.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\cursor_m.cur"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\help.html"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\img\Add.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\img\SaveObject.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\img\SaveObjectDisabled.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\Lang.js"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="Resources\CrossSection\ToolIcon.png"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | <Content Include="Resources\log4net4.dll" /> |
| | | <Content Include="Resources\Newtonsoft.Json.dll" /> |
| | | </ItemGroup> |