当前位置: 首页 > news >正文

优质院校建设网站wordpress 显示ip

优质院校建设网站,wordpress 显示ip,如何做网站不被坑,网站建设的客户都在哪里功能#xff1a;检查图斑中所有的夹角#xff0c;如果为锐角#xff0c;在单独的标记图层中标记。生成的结果放在默认gdb中#xff0c;以 图层名_锐角检查 的方式命名 大体实现方式#xff1a;遍历图层中的所有要素#xff08;多部件要素分别处理#xff09;#xff0…功能检查图斑中所有的夹角如果为锐角在单独的标记图层中标记。生成的结果放在默认gdb中以 图层名_锐角检查 的方式命名 大体实现方式遍历图层中的所有要素多部件要素分别处理对每个夹角进行判断。 具体功能与ArcMap中锐角检查工具类似 DayDreamInGIS数据处理工具 V1.1.5_beta 锐角检查工具源码与解析_daydreamingistool-CSDN博客 工具界面 使用prowindow样式确实更和谐 界面代码 controls:ProWindow x:ClassDayDreamInGISTool.CornerCheck.CornerCheckWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:controlsclr-namespace:ArcGIS.Desktop.Framework.Controls;assemblyArcGIS.Desktop.Frameworkxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:extensionsclr-namespace:ArcGIS.Desktop.Extensions;assemblyArcGIS.Desktop.Extensionsmc:IgnorabledTitle锐角检查 Width500 Height200 WindowStartupLocationCenterOwnercontrols:ProWindow.ResourcesResourceDictionaryResourceDictionary.MergedDictionariesextensions:DesignOnlyResourceDictionary Sourcepack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml//ResourceDictionary.MergedDictionaries/ResourceDictionary/controls:ProWindow.ResourcesGrid Margin5Grid.RowDefinitionsRowDefinition/RowDefinitionRowDefinition/RowDefinitionRowDefinition/RowDefinition/Grid.RowDefinitionsGridGrid.ColumnDefinitionsColumnDefinition Width90/ColumnDefinitionColumnDefinition/ColumnDefinition/Grid.ColumnDefinitionsLabel VerticalAlignmentCenter HorizontalAlignmentRight图层/LabelComboBox Grid.Column1 NamecmbLayer VerticalAlignmentCenter Height27/ComboBox/GridGrid Grid.Row1Grid.ColumnDefinitionsColumnDefinition Width90/ColumnDefinitionColumnDefinition/ColumnDefinition/Grid.ColumnDefinitionsLabel VerticalAlignmentCenter HorizontalAlignmentRight角度阈值(度)/LabelTextBox Grid.Column1 NametxtYuzhi VerticalAlignmentCenter Height27 Text10/TextBox/GridGrid Grid.Row2Grid.ColumnDefinitionsColumnDefinition/ColumnDefinitionColumnDefinition/ColumnDefinition/Grid.ColumnDefinitionsButton Width140 Height35 NamebtnOK ClickbtnOK_Click确定/ButtonButton Width140 Height35 Grid.Column1 NamebtnCancel ClickbtnCancel_Click取消/Button/Grid/Grid /controls:ProWindow界面交互代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using ArcGIS.Core.Data; using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Mapping; using RGeometryArcGIS.Core.Geometry; using GISCommonHelper; using ArcGIS.Core.Geometry; using ArcGIS.Desktop.Core; using ArcGIS.Core.Data.DDL; using ArcGIS.Desktop.Editing; using ArcGIS.Core.Data.Exceptions; using ArcGIS.Core.Internal.CIM;namespace DayDreamInGISTool.CornerCheck {/// summary/// Interaction logic for CornerCheckWindow.xaml/// /summarypublic partial class CornerCheckWindow : ArcGIS.Desktop.Framework.Controls.ProWindow{private FeatureLayer player;private double yuzhi;public CornerCheckWindow(){InitializeComponent();try{var map MapView.Active.Map;cmbLayer.setLyrlistFeatureLayer(map, (o, e) {if (cmbLayer.SelectedIndex ! -1){Player this.cmbLayer.SelectedValue as FeatureLayer;}});}catch (Exception){}}public FeatureLayer Player { get player; set player value; }public double Yuzhi { get yuzhi; set yuzhi value; }private void btnCancel_Click(object sender, RoutedEventArgs e){this.DialogResult false;}private void btnOK_Click(object sender, RoutedEventArgs e){if (this.cmbLayer.SelectedIndex -1){MessageBox.Show(请设置图层);return;}if(double.TryParse(txtYuzhi.Text,out yuzhi)){}else{MessageBox.Show(阈值必须为数字);return;}this.DialogResult true;}} }核心逻辑代码放在ProWindow的showButton中。 using ArcGIS.Core.CIM; using ArcGIS.Core.Data; using ArcGIS.Core.Data.DDL; using ArcGIS.Core.Data.Exceptions; using ArcGIS.Core.Geometry; using ArcGIS.Desktop.Catalog; using ArcGIS.Desktop.Core; using ArcGIS.Desktop.Editing; using ArcGIS.Desktop.Extensions; using ArcGIS.Desktop.Framework; using ArcGIS.Desktop.Framework.Contracts; using ArcGIS.Desktop.Framework.Dialogs; using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Layouts; using ArcGIS.Desktop.Mapping; using GISCommonHelper; using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using System.Text; using System.Threading.Tasks;namespace DayDreamInGISTool.CornerCheck {internal class ShowCornerCheckWindow : Button{private CornerCheckWindow _cornercheckwindow null;private FeatureClass resultFtCls null;string orignoidfdnm Orign_OId; //源oidstring corneranglefdnm CornerAngle; //夹角string targetanglefdnm Angle; //指向角string summaryfdnm Summary; //其他说明private FeatureLayer pftlyr;private double yuzhi;ProgressDialog progDlg null;CancelableProgressorSource progSrc null;protected override void OnClick(){//already open?if (_cornercheckwindow ! null)return;_cornercheckwindow new CornerCheckWindow();_cornercheckwindow.Owner FrameworkApplication.Current.MainWindow;//_cornercheckwindow.Closed (o, e) { _cornercheckwindow null; };//_cornercheckwindow.Show();//uncomment for modaltry{progDlg new ProgressDialog($锐角检查中..., 取消, 100, true);bool? res _cornercheckwindow.ShowDialog();if (res.Value){yuzhi _cornercheckwindow.Yuzhi;pftlyr _cornercheckwindow.Player;//{pftlyr.GetDefinition().Name} progDlg.Show();progSrc new CancelableProgressorSource(progDlg);execute();}}catch (Exception ex){MessageBox.Show(发生未知异常_ex.Message);}finally{if (progDlg ! null){progDlg.Hide();progDlg.Dispose();}_cornercheckwindow null;}}private void execute(){//暂时不做进度条QueuedTask.Run(() {long ftcountpftlyr.GetFeatureClass().GetCount();progSrc.Progressor.Max (uint)ftcount;resultFtCls createResultFtCls();FeatureClass ftcls pftlyr.GetFeatureClass();using (RowCursor cursor ftcls.Search()){EditOperation editOperation new EditOperation();while (cursor.MoveNext()){using (Feature feature cursor.Current as Feature){long oid feature.GetObjectID();Geometry geo feature.GetShape();if (geo.GeometryType ArcGIS.Core.Geometry.GeometryType.Polygon){var polygon geo as Polygon;check(polygon, oid, editOperation);}progSrc.Progressor.Value;progSrc.Message $要素:{oid} 检查完成;}}string message ;try{// 执行编辑操作bool creationResult editOperation.Execute();// 如果操作失败存储错误消息if (!creationResult) { message editOperation.ErrorMessage; }}catch (GeodatabaseException exObj){// 如果出现地理数据库异常存储异常消息message exObj.Message;throw;}}},progSrc.Progressor);}private void check(Polygon polygon, long oid, EditOperation editOperation){//多部件要素,每个部分单独处理var list GeometryEngine.Instance.MultipartToSinglePart(polygon);foreach (var item in list){CornerAngleCheck(item as Polygon, yuzhi, oid, editOperation);}}private void CornerAngleCheck(Polygon pPolygon, double tolerance, long oid, EditOperation editOperation){var pntCol pPolygon.Points;for (int i 0; i pntCol.Count - 1; i) //循环,多边形的点首尾相接,最后一个点不用核查{MapPoint currentpnt pntCol[i];MapPoint prePoint null;MapPoint nextPoint null;if (i 0){prePoint pntCol[pntCol.Count - 2]; //获取倒数第二个点,即为肉眼意义上的前一个点}else{prePoint pntCol[i - 1];}if (i pntCol.Count - 2){nextPoint pntCol[0];}else{nextPoint pntCol[i 1];}double ca calcCornerAngle(currentpnt, prePoint, nextPoint);double aindegredd GISCommonHelper.MathHelper.Radian2Degree(ca);double d1 GISCommonHelper.GeometryHelper.getDistance(currentpnt, prePoint);double d2 GISCommonHelper.GeometryHelper.getDistance(currentpnt, nextPoint);//定位点距离大致算double dis (d1 d2) / 5.0; //平均边长的十分之一处//生成定位点MapPoint pc GeometryEngine.Instance.ConstructPointFromAngleDistance(currentpnt, GISCommonHelper.GeometryHelper.getAngle(currentpnt, prePoint) ca / 2.0, dis);if (aindegredd tolerance){editOperation.Callback(context {using RowBuffer rowBuffer resultFtCls.CreateRowBuffer();rowBuffer[orignoidfdnm] oid;rowBuffer[corneranglefdnm] aindegredd;//rowBuffer[targetanglefdnm] 0; //指向角度//构建线Polyline pln GISCommonHelper.GeometryHelper.getPolyline(pc, currentpnt, MapView.Active.Map.SpatialReference);rowBuffer[resultFtCls.GetDefinition().GetShapeField()] pln;using Feature feature resultFtCls.CreateRow(rowBuffer);context.Invalidate(feature);}, resultFtCls);}else{//非锐角}}}/// summary/// 计算夹角 返回结果弧度/// /summary/// param namecPnt顶点/param/// param namep1起点/param/// param namep2结点/param/// returns弧度/returnspublic double calcCornerAngle(MapPoint cPnt, MapPoint p1, MapPoint p2){double a1 GISCommonHelper.GeometryHelper.getAngle(cPnt, p1);double a2 GISCommonHelper.GeometryHelper.getAngle(cPnt, p2);double a a2 - a1;if (a 0){a a Math.PI * 2;}return a;}string ruijiaojcfcname 锐角检查;/// summary/// 创建结果要素类 默认/// /summary/// returns/returnsprivate FeatureClass createResultFtCls(){ruijiaojcfcname ${pftlyr.GetDefinition().Name}_锐角检查;var sr pftlyr.GetFeatureClass().GetDefinition().GetSpatialReference();//在当前数据库中创建var DefaultGDB Project.Current.DefaultGeodatabasePath;using (Geodatabase gdb new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(DefaultGDB)))){bool isexist gdb.FeatureClassExists(ruijiaojcfcname);//如果存在,则先删除if (isexist){var drMessageBox.Show(工作空间已经存在锐角检查数据集,是否删除?, 提示, System.Windows.MessageBoxButton.YesNo);if(dr System.Windows.MessageBoxResult.Yes){//删除已有var featureclass gdb.OpenDatasetFeatureClass(ruijiaojcfcname);FeatureClassDescription fdc new FeatureClassDescription(featureclass.GetDefinition());SchemaBuilder sb3 new SchemaBuilder(gdb);sb3.Delete(fdc);}else{ruijiaojcfcname $锐角检查_{DateTime.Now.GetTimeStamp()};}progSrc.Progressor.Message $创建结果数据集 {ruijiaojcfcname} 完成;}var hasZ false;var hasM false;var shapeDescription new ShapeDescription(GeometryType.Polyline, sr){HasM hasM,HasZ hasZ};var f0 new ArcGIS.Core.Data.DDL.FieldDescription(OBJECTID, FieldType.OID);var f1 new ArcGIS.Core.Data.DDL.FieldDescription(orignoidfdnm, FieldType.Integer);var f2 new ArcGIS.Core.Data.DDL.FieldDescription(corneranglefdnm, FieldType.Double);var f3 new ArcGIS.Core.Data.DDL.FieldDescription(targetanglefdnm, FieldType.Double);var f4 new ArcGIS.Core.Data.DDL.FieldDescription(summaryfdnm, FieldType.String);f4.Length 80;var fieldDescriptions new ListArcGIS.Core.Data.DDL.FieldDescription(){f0,f1,f2,f3,f4};//创建FeatureClassDescriptionvar fcDescription new FeatureClassDescription(ruijiaojcfcname, fieldDescriptions, shapeDescription);//创建SchemaBuilderSchemaBuilder sb new SchemaBuilder(gdb);sb.Create(fcDescription);bool success sb.Build();var featureclass2 gdb.OpenDatasetFeatureClass(ruijiaojcfcname); ; //再次打开//添加图层Uri uu featureclass2.GetPath();var layer LayerFactory.Instance.CreateLayer(uu, MapView.Active.Map, 0, ruijiaojcfcname);return featureclass2;}}} }
http://www.pierceye.com/news/816745/

相关文章:

  • 租赁网站开发台州网站优化
  • 网站开发人员工工资网站开发一个支付功能要好多钱
  • 工程建设管理网站源码网站怎样做地理位置定位
  • 太仓公司网站建设电话网络公关名词解释
  • 江门网站建设策划什么是网络营销职能
  • 北京网站托管毕设做网站是不是太low
  • 企业网站建设费用属管理费用吗重庆网站建设制作设计公司哪家好
  • 深圳营销型网站需要多少钱做网站个体户经营范围
  • php 手机网站 上传图片晋州做网站的联系电话
  • 云天下网站建设做抖音seo排名软件是否合法
  • 网站开发合同管辖权异议龙岩网上办事大厅官网
  • 建网站费用明细海口建设网站
  • 网站页面设计说明怎么写影视小程序源码
  • 传媒网站制作网站申请建设
  • 前端做项目的网站新密市城乡建设局网站
  • 网站app建设方案智能外呼系统
  • 创建网站免费注册wordpress 熊掌号代码
  • 的广州建网站的公司黄山市网站建设
  • 做网站外包需要提供什么登录百度账号
  • 网站备案要买备案号西安鑫瀚通网站建设
  • 做网站的公司违约怎么处理免费免费网站模板
  • 动漫网站建设方案项目书目录做网站站长先把作息和身体搞好
  • 网站建设说明书网页制作成品图加代码
  • 中国网站设计师联盟福州网站大全
  • 香奈儿网站建设竞价培训
  • 毕业设计做网站的步骤电脑培训学校在哪里
  • 怎样在网站图片上做店铺广告公司名logo设计图片
  • 做ic什么网站好攀枝花三线建设网站
  • 台州市网站建设东莞网站策划
  • 网站建设响应技术wordpress502