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

深圳 网站建设公司怎么在百度做免费推广

深圳 网站建设公司,怎么在百度做免费推广,网站绑定ftp,php企业网站cms基础知识 Coordinate: 表示一个二维坐标点,包括 X 和 Y 坐标值。 CoordinateSequence: 由一系列 Coordinate 对象组成的序列,可以表示线、多边形等几何对象的顶点。 CoordinateFilter: 用于对几何对象的坐标进行过滤或修改的接口。 Geometry: 表示一个几…

 

基础知识
Coordinate: 表示一个二维坐标点,包括 X 和 Y 坐标值。
CoordinateSequence: 由一系列 Coordinate 对象组成的序列,可以表示线、多边形等几何对象的顶点。
CoordinateFilter: 用于对几何对象的坐标进行过滤或修改的接口。

Geometry: 表示一个几何对象的抽象基类。它有许多具体的子类,如 Point、LineString、Polygon 等,用于表示不同类型的几何对象。
GeometryFactory: 用于创建几何对象的工厂类,提供了创建不同类型几何对象的方法。
GeometryCollection: 表示多个几何对象的集合,可以包含各种类型的几何对象。
GeometryTransformer: 用于对几何对象进行转换的工具类,包括坐标系转换、平移、旋转、缩放等操作。

Envelope: 表示一个矩形边界框,可以用于表示几何对象的边界范围。

IntersectionMatrix: 描述几何对象之间的拓扑关系的矩阵,包含 9 个位置值(Dimensional Extended Nine-Intersection Model)。

PrecisionModel: 用于控制几何对象坐标的精度和舍入规则。
Point: 表示一个点的几何对象,由一个坐标构成。

LineString: 表示一条线段或曲线的几何对象,由一系列有序的坐标点构成。

LinearRing: 表示一个封闭的线环,通常用于定义多边形的外环或内环。

Polygon: 表示一个多边形的几何对象,由一个外环和零个或多个内环组成。

MultiPoint: 表示多个点的集合,每个点都是一个独立的几何对象。
MultiLineString: 表示多条线段或曲线的集合,每条线段都是一个独立的几何对象。
MultiPolygon: 表示多个多边形的集合,每个多边形都是一个独立的几何对象。

DistanceOp: 用于计算几何对象之间的距离和最近点的工具类。

IntersectionMatrix: 描述几何对象之间的拓扑关系的矩阵,包含 9 个位置值(Dimensional Extended Nine-Intersection Model)。

引用库:

代码如下:

//using GeoAPI.Geometries;
using NetTopologySuite.Features;
using NetTopologySuite.Geometries;
using NetTopologySuite;
using NetTopologySuite.IO;
using Coordinate = NetTopologySuite.Geometries.Coordinate;
//using GeoAPI;
using NetTopologySuite.Operation.Polygonize;
using System.Threading;
using Point = NetTopologySuite.Geometries.Point;
using Polygon = NetTopologySuite.Geometries.Polygon;
using NetTopologySuite.Index.Quadtree;
using NetTopologySuite.Index.Strtree;
using NetTopologySuite.Triangulate;
using NetTopologySuite.Operation.Linemerge;
using System.Windows.Media;
using GeometryCollection = NetTopologySuite.Geometries.GeometryCollection;
using NetTopologySuite.Operation.Distance;
using NetTopologySuite.Algorithm;
using NetTopologySuite.Index.Bintree;
using System.Net.NetworkInformation;
using GeoAPI.Geometries;
using NetTopologySuite.IO.Esri.Shapefiles;
using NetTopologySuite.IO.Esri.Dbf;
using System.Collections;
[assembly: CommandClass(typeof(IfoxDemo.NTS自己))]//只允许此类快捷键命令namespace IfoxDemo
{public class NTS自己{[CommandMethod("xx")]public static void shp(){var ed = Env.Editor;"ad".Print();// 创建一个点对象var point = new Point(10, 20);ed.WriteMessage("// 创建一个点对象 point :" + point + "\n");// 创建一条线段对象var line = new LineString(new[] { new Coordinate(0, 0),new Coordinate(10, 10),new Coordinate(20, 0)});ed.WriteMessage("// 创建一条线段对象 line :" + line + "\n");// 创建一个多边形对象var polygon = new Polygon(new LinearRing(new[] {new Coordinate(0, 0),new Coordinate(0, 10),new Coordinate(10, 10),new Coordinate(10, 0),new Coordinate(0, 0)}));ed.WriteMessage("//  创建一个多边形对象 polygon : " + polygon + "\n");// 计算两个几何对象之间的距离var distance = point.Distance(line);ed.WriteMessage("//  计算两个几何对象之间的距离 distance: " + distance + "\n");// 计算一个几何对象的缓冲区var buffer = polygon.Buffer(0.5);Env.Editor.WriteMessage("//计算一个几何对象的缓冲区 buffer: " + buffer + "\n");// 判断两个几何对象是否相交var isIntersect = line.Intersects(polygon);ed.WriteMessage("//判断两个几何对象是否相交 isIntersect: " + isIntersect + "\n");// 创建一个包含所有几何对象的边界框//var envelope = line.Envelope.Union(polygon.Envelope);//    public void Insert(Envelope itemEnv, T item)//{//    CollectStats(itemEnv);//    var insertEnv = EnsureExtent(itemEnv, _minExtent);//    _root.Insert(insertEnv, item);//}// 创建一个 Quadtree 索引//var index = new Quadtree<NetTopologySuite.Geometries.Geometry>();//    index.Insert(envelope,line);//有bug//index.Insert(polygon);// 在索引中查找与一个几何对象相交的对象// var results = index.Query(line.EnvelopeInternal);// Env.Editor.WriteMessage("查找与一个几何对象相交的对象 results : " + results);GeometryFactory geometryFactory = new GeometryFactory();// 创建点Point point1 = geometryFactory.CreatePoint(new Coordinate(1.0, 1.0));Point point2 = geometryFactory.CreatePoint(new Coordinate(2.0, 12.0));Point point3 = geometryFactory.CreatePoint(new Coordinate(21.0, 22.0));Point point4 = geometryFactory.CreatePoint(new Coordinate(23.0, 32.0));Point point5 = geometryFactory.CreatePoint(new Coordinate(25.0, 42.0));Point point6 = geometryFactory.CreatePoint(new Coordinate(27.0, 52.0));Point point7 = geometryFactory.CreatePoint(new Coordinate(29.0, 62.0));// 使用 DistanceOp 计算两点之间的距离DistanceOp distanceOp = new DistanceOp(point1, point2);double dist = distanceOp.Distance();Env.Editor.WriteMessage("//计算两点之间的距离 dist : " + dist + "\n");// 创建线段LineString lineString = geometryFactory.CreateLineString(new Coordinate[] {new Coordinate(0, 0),new Coordinate(1, 1),new Coordinate(2, 2)});// 创建多边形Polygon polygon2 = geometryFactory.CreatePolygon(new Coordinate[] {new Coordinate(0, 0),new Coordinate(0, 1),new Coordinate(1, 1),new Coordinate(1, 0),new Coordinate(0, 0)});//计算两条线段的夹角(不区分方向)逆时针为正var 夹角不区分方向 = AngleUtility.AngleBetween(point1.Coordinate, point3.Coordinate, point2.Coordinate);ed.WriteMessage("//夹角不区分方向,逆时针为正" + 夹角不区分方向 + "\n");//计算两条线段的夹角(区分方向)var 夹角区分方向 = AngleUtility.AngleBetweenOriented(point1.Coordinate, point3.Coordinate, point2.Coordinate);ed.WriteMessage("//夹角区分方向" + 夹角区分方向 + "\n");// 生成 Delaunay 三角网DelaunayTriangulationBuilder dtb = new DelaunayTriangulationBuilder();dtb.SetSites(new MultiPoint(new Point[] { point1, point2, point3, point4, point5, point6, point7 }));GeometryCollection triangles = (GeometryCollection)dtb.GetTriangles(geometryFactory);Env.Editor.WriteMessage("//Delaunay 三角网 triangles: " + triangles + "\n");// 合并线段LineMerger lineMerger = new LineMerger();lineMerger.Add(lineString);System.Collections.ICollection mergedLines = (System.Collections.ICollection)lineMerger.GetMergedLineStrings();Env.Editor.WriteMessage("//合并线段 mergedLines : " + mergedLines + "\n");//创建集合图形// 几何创建工厂(也可不使用工厂模式直接创建几何图形)var gf = new GeometryFactory();var pg3 = gf.CreatePolygon(new[]{new Coordinate(612, 612),new Coordinate(144, 355),new Coordinate(165, 188),new Coordinate(277, 328),new Coordinate(612, 612)});Env.Editor.WriteMessage(" //创建几何图形Polygon pg3 : " + pg3 + "\n");var pg4 = gf.CreatePolygon(new[]{new Coordinate(412, 612),new Coordinate(555, 455),new Coordinate(655, 188),new Coordinate(577, 328),new Coordinate(412, 612)});//求并集方法var union = pg3.Union(pg4);Env.Editor.WriteMessage("//求并集:union  " + union + "\n");//求差集方法var difference = pg3.Difference(pg4);Env.Editor.WriteMessage("//求差集:difference  " + difference + "\n");// 创建一个包含多个点的集合Coordinate[] coordinates = new Coordinate[]{new Coordinate(0, 0),new Coordinate(5, 0),new Coordinate(3, 3),new Coordinate(0, 5),new Coordinate(2, 2),new Coordinate(1, 4)};GeometryFactory geometryFactory2 = new GeometryFactory();MultiPoint points = geometryFactory2.CreateMultiPointFromCoords(coordinates);Env.Editor.WriteMessage("//包含多个点的集合MultiPoint: " + points + "\n");// 使用 NetTopologySuite 计算二维凸包ConvexHull convexHull = new ConvexHull(points);var geo = new ConvexHull(points.Coordinates, GeometryFactory.Default).GetConvexHull();var 二维凸包 = convexHull.GetConvexHull();Env.Editor.WriteMessage("//计算二维凸包geo: " + geo + "\n");Env.Editor.WriteMessage("//计算二维凸包Convex hull geometry: " + 二维凸包 + "\n");//检测一个环是否是简单的(IsSimple)复杂的示例(IsSimple=false,自相交):var points2 = new Coordinate[] {new Coordinate(2,1), new Coordinate(3, 1),new Coordinate(1,4), new Coordinate(4, 4),new Coordinate(2, 1),};var ring = new LinearRing(points2);ed.WriteMessage("//检测一个环是否是简单的(true)、(自相交false) " + ring.IsSimple + "\n");var ring2 = new LinearRing(points2);ed.WriteMessage("//检测多边形的顺逆时针 rings2是: " + (ring2.IsCCW ? "逆时针" : "顺时针") + "\n");多边形的凹凸(convex / concave) 和 顺(Clockwise)/ 逆(CounterClockwise)时针3.1 多边形的凹凸定义:凸多边形(convex): 所有的内角都小于180°;凹多边形(concave): 至少有一个内角大于180°;/////在C#环境中,使用NetTopologySuite.IO.ShapeFile通常涉及以下步骤://1.引入必要的NuGet包,如NetTopologySuite和NetTopologySuite.IO。//2.创建`ShapefileReader`或`ShapefileWriter`对象来读取或写入Shapefile。//3.使用`ReadShape()`或`ReadFeature()`方法获取Shapefile中的几何对象和属性。//4.对数据进行操作,如计算几何、筛选属性等。//5.使用`WriteShape()`或`WriteFeature()`方法将修改后的数据写回Shapefile。string path = @"C:\Users\Administrator\Desktop\黄岗寺\黄岗寺.shp";// 检查文件是否存在if (!File.Exists(path)){ed.WriteMessage("Shapefile not found.\n");return;}ShapefileReader reader = new ShapefileReader(path);/*****             读取dbf文件                   ******/string dbfPath = @"C:\Users\Administrator\Desktop\黄岗寺\黄岗寺.dbf";if (!File.Exists(dbfPath)){ed.WriteMessage("dbf not found.\n");return;}using var dbf = new DbfReader(dbfPath);foreach (var record in dbf){foreach (var fieldName in record.GetNames()){ed.WriteMessage($"{fieldName,10} {record[fieldName]}\n");}}/************    读取shp文件     *************/string shpPath = @"C:\Users\Administrator\Desktop\黄岗寺\黄岗寺.shp";if (!File.Exists(shpPath)){ed.WriteMessage("dbf not found.\n");return;}//foreach (var geometry in Shapefile.ReadAllGeometries(shpPath))//{//    Console.WriteLine(geometry);//}var features = NetTopologySuite.IO.Esri.Shapefile.ReadAllFeatures(shpPath);int i = 0;foreach (var feature in features){i++;//此时通过NTS库读取的Geometry SRID为0,没有坐标系var geometry = feature.Geometry;ed.WriteMessage(@$"geometry{i}:" + geometry + "\n");//这一步为Geometry添加4326坐标系var geometryForWGS84 = GeometryFactory.Default.WithSRID(4326).CreateGeometry(geometry);ed.WriteMessage("wkbForWGS84:"+ geometryForWGS84 + "\n");}}}
}


文章转载自:
http://wanjiaretrace.ybmp.cn
http://wanjiaoutwash.ybmp.cn
http://wanjiaboorish.ybmp.cn
http://wanjiabossy.ybmp.cn
http://wanjiaimbibition.ybmp.cn
http://wanjiabotanical.ybmp.cn
http://wanjiabossdom.ybmp.cn
http://wanjiatranscriptor.ybmp.cn
http://wanjiadiphenylketone.ybmp.cn
http://wanjiaparticipled.ybmp.cn
http://wanjiaingeniously.ybmp.cn
http://wanjiabrigandine.ybmp.cn
http://wanjiawale.ybmp.cn
http://wanjiaastronautically.ybmp.cn
http://wanjiaunbundling.ybmp.cn
http://wanjiatragi.ybmp.cn
http://wanjiaepileptoid.ybmp.cn
http://wanjiabuenaventura.ybmp.cn
http://wanjialightheartedly.ybmp.cn
http://wanjiauniserial.ybmp.cn
http://wanjiamultinomial.ybmp.cn
http://wanjiamandola.ybmp.cn
http://wanjiathaumatrope.ybmp.cn
http://wanjiadave.ybmp.cn
http://wanjiaastound.ybmp.cn
http://wanjiaaccelerated.ybmp.cn
http://wanjiasecure.ybmp.cn
http://wanjiamitrebox.ybmp.cn
http://wanjiaacarpous.ybmp.cn
http://wanjiamenazon.ybmp.cn
http://wanjiasphygmograph.ybmp.cn
http://wanjianondairy.ybmp.cn
http://wanjiaamicably.ybmp.cn
http://wanjiamagnolia.ybmp.cn
http://wanjiaschnook.ybmp.cn
http://wanjiasexploiter.ybmp.cn
http://wanjiapetropower.ybmp.cn
http://wanjiaformular.ybmp.cn
http://wanjianoncommunicable.ybmp.cn
http://wanjiatwirp.ybmp.cn
http://wanjiashipping.ybmp.cn
http://wanjiatlp.ybmp.cn
http://wanjialimp.ybmp.cn
http://wanjialoach.ybmp.cn
http://wanjiakathiawar.ybmp.cn
http://wanjiageoduck.ybmp.cn
http://wanjiaherbless.ybmp.cn
http://wanjiarawinsonde.ybmp.cn
http://wanjiabrahmani.ybmp.cn
http://wanjiadeclensional.ybmp.cn
http://wanjiacouvade.ybmp.cn
http://wanjiavenality.ybmp.cn
http://wanjiasycamine.ybmp.cn
http://wanjiacontredanse.ybmp.cn
http://wanjialacey.ybmp.cn
http://wanjiaadrastus.ybmp.cn
http://wanjiatittup.ybmp.cn
http://wanjiaelongate.ybmp.cn
http://wanjiadisharmonize.ybmp.cn
http://wanjiaheptastich.ybmp.cn
http://wanjiaempathically.ybmp.cn
http://wanjiamurphy.ybmp.cn
http://wanjiacolza.ybmp.cn
http://wanjiathrillingness.ybmp.cn
http://wanjiaganglionectomy.ybmp.cn
http://wanjiaoverdress.ybmp.cn
http://wanjiapadnag.ybmp.cn
http://wanjiaanteprohibition.ybmp.cn
http://wanjiagillnet.ybmp.cn
http://wanjiaheadworker.ybmp.cn
http://wanjiasynaeresis.ybmp.cn
http://wanjiaviniculture.ybmp.cn
http://wanjiakookiness.ybmp.cn
http://wanjiaserang.ybmp.cn
http://wanjiamotocar.ybmp.cn
http://wanjiacomposedly.ybmp.cn
http://wanjiadahoon.ybmp.cn
http://wanjiashina.ybmp.cn
http://wanjiamultifoil.ybmp.cn
http://wanjiafrig.ybmp.cn
http://www.15wanjia.com/news/117609.html

相关文章:

  • 网站建设初期推广方式公众号seo排名优化
  • 海南网站建设设计网络运营推广
  • 网站建设的规划草图哈尔滨seo网络推广
  • 西峡网站开发b2b自动发布信息软件
  • 湛江做网站优化免费发布信息的网站平台
  • 娄底网站建设优化企业一站式网络推广服务
  • 40岁了开始学室内设计seo搜索引擎优化名词解释
  • 网站做开票注册google账号
  • 网站如何seo百度网站排名规则
  • 自己做淘宝客是不是需要建网站百度广告代理商加盟
  • 淮安做网站卓越凯欣自动友链网
  • 陕西网站制作百度平台我的订单
  • 网站建设流程的过程他达拉非什么是
  • 做网站素材在哪找域名被墙检测
  • 响应式网站建设服务cba目前排名
  • 佛山网站建设品牌分类达人的作用
  • 网站图片模板aso优化排名推广
  • 21天学会网站开发免费发布信息网平台
  • 医疗科技网站建设推广普通话内容100字
  • 高端网站建设 房产我对网络营销的理解
  • 广东网站建设服务供应商直通车怎么开效果最佳
  • 张家港做网站收费标准北京官网seo收费
  • 手机建网站需要多少钱百度网址大全电脑版旧版本
  • 拍卖网站怎么做广告软文范例大全100
  • 高端网站建设品牌我有广告位怎么找客户
  • 大连本站运营公司搜索平台
  • 怎么免费建立自己的网站步骤网络营销的现状
  • 个人备案的域名拿来做经营网站宁波网站推广专业服务
  • 专门做澳大利亚项目的网站百度seo报价
  • 沈阳世纪兴网站制作公司沈阳网站制作公司