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

做网站充值系统手机百度下载免费安装

做网站充值系统,手机百度下载免费安装,微信客服系统,十堰网站建设公司0719webArcGIS Pro SDK (九)几何 7 多点 文章目录 ArcGIS Pro SDK (九)几何 7 多点1 构造多点 - 从映射点的枚举2 构造多点 - 使用 MultipointBuilderEx3 修改多点的点4 从多点检索点、2D 坐标、3D 坐标 环境:Visual Studio 2…

ArcGIS Pro SDK (九)几何 7 多点

文章目录

  • ArcGIS Pro SDK (九)几何 7 多点
    • 1 构造多点 - 从映射点的枚举
    • 2 构造多点 - 使用 MultipointBuilderEx
    • 3 修改多点的点
    • 4 从多点检索点、2D 坐标、3D 坐标

环境:Visual Studio 2022 + .NET6 + ArcGIS Pro SDK 3.0

1 构造多点 - 从映射点的枚举

// 使用 builderEx 的便捷方法或者使用 builderEx 构造函数。List<MapPoint> list = new List<MapPoint>();
list.Add(MapPointBuilderEx.CreateMapPoint(1.0, 1.0));
list.Add(MapPointBuilderEx.CreateMapPoint(1.0, 2.0));
list.Add(MapPointBuilderEx.CreateMapPoint(2.0, 2.0));
list.Add(MapPointBuilderEx.CreateMapPoint(2.0, 1.0));// 使用 builderEx 构造函数 - 不需要在 MCT 上运行。
// 使用 AttributeFlags.NoAttributes - 我们在列表中有 2d 点
MultipointBuilderEx builderEx = new MultipointBuilderEx(list, AttributeFlags.None);
Multipoint multiPoint = builderEx.ToGeometry() as Multipoint;
int ptCount = builderEx.PointCount;// builderEx 便捷方法不需要在 MCT 上运行
multiPoint = MultipointBuilderEx.CreateMultipoint(list);
// multiPoint.HasZ, HasM, HasID 将为 false - 属性是根据列表中点的属性状态确定的// 或者具体设置状态
multiPoint = MultipointBuilderEx.CreateMultipoint(list, AttributeFlags.None);
// multiPoint.HasM = falsemultiPoint = MultipointBuilderEx.CreateMultipoint(list, AttributeFlags.HasM);
// multiPoint.HasM = trueptCount = multiPoint.PointCount;

2 构造多点 - 使用 MultipointBuilderEx

Coordinate2D[] coordinate2Ds = new Coordinate2D[] { new Coordinate2D(1, 2), new Coordinate2D(-1, -2) };
SpatialReference sr = SpatialReferences.WGS84;MultipointBuilderEx builder = new MultipointBuilderEx(coordinate2Ds, sr);// builder.PointCount = 2builder.HasZ = true;
// builder.Zs.Count = 2
// builder.Zs[0] = 0
// builder.Zs[1] = 0builder.HasM = true;
// builder.Ms.Count = 2
// builder.Ms[0] = NaN
// builder.Ms[1] = NaNbuilder.HasID = true;
// builder.IDs.Count = 2
// builder.IDs[0] = 0
// builder.IDs[1] = 0// 设置为空
builder.SetEmpty();
// builder.Coords.Count = 0
// builder.Zs.Count = 0
// builder.Ms.Count = 0
// builder.IDs.Count = 0// 重置坐标
List<Coordinate2D> inCoords = new List<Coordinate2D>() { new Coordinate2D(1, 2), new Coordinate2D(3, 4), new Coordinate2D(5, 6) };
builder.Coordinate2Ds = inCoords;
// builder.Coords.Count = 3
// builder.HasZ = true
// builder.HasM = true
// builder.HasID = truedouble[] zs = new double[] { 1, 2, 1, 2, 1, 2 };
builder.Zs = zs;   
// builder.Zs.Count = 6double[] ms = new double[] { 0, 1 };
builder.Ms = ms;   
// builder.Ms.Count = 2// 坐标现在为   (x, y, z, m, id)
//  (1, 2, 1, 0, 0), (3, 4, 2, 1, 0) (5, 6, 1, NaN, 0)MapPoint mapPoint = builder.GetPoint(2);
// mapPoint.HasZ = true
// mapPoint.HasM = true
// mapPoint.HasID = true
// mapPoint.Z  = 1
// mapPoint.M = NaN
// mapPoint.ID = 0// 添加一个 M 到列表
builder.Ms.Add(2);
// builder.Ms.count = 3// 坐标现在为   (x, y, z, m, id)
//  (1, 2, 1, 0, 0), (3, 4, 2, 1, 0) (5, 6, 1, 2, 0)// 现在再次获取第二个点;它现在将有一个 M 值
mapPoint = builder.GetPoint(2);
// mapPoint.M = 2int[] ids = new int[] { -1, -2, -3 };
// 分配 ID 值
builder.IDs = ids;// 坐标现在为   (x, y, z, m, id)
//  (1, 2, 1, 0, -1), (3, 4, 2, 1, -2) (5, 6, 1, 2, -3)// 创建一个新点
MapPoint point = MapPointBuilderEx.CreateMapPoint(-300, 400, 4);
builder.SetPoint(2, point);// 坐标现在为   (x, y, z, m, id)
//  (1, 2, 1, 0, -1), (3, 4, 2, 1, -2) (-300, 400, 4, NaN, 0)builder.RemovePoints(1, 3);
// builder.PointCount = 1

3 修改多点的点

// 假设一个多点是由 4 个点构成的
// 修改后的多点将移除第一个点并移动最后一个点// 使用 builderEx 构造函数 = 不需要在 MCT 上运行。
MultipointBuilderEx builderEx = new MultipointBuilderEx(multipoint);
// 移除第一个点
builderEx.RemovePoint(0);
// 修改最后一个点的坐标
var ptEx = builderEx.GetPoint(builderEx.PointCount - 1);
builderEx.RemovePoint(builderEx.PointCount - 1);var newPtEx = MapPointBuilderEx.CreateMapPoint(ptEx.X + 1.0, ptEx.Y + 2.0);
builderEx.AddPoint(newPtEx);
Multipoint modifiedMultiPointEx = builderEx.ToGeometry() as Multipoint;

4 从多点检索点、2D 坐标、3D 坐标

ReadOnlyPointCollection points = multipoint.Points;
IReadOnlyList<Coordinate2D> coords2d = multipoint.Copy2DCoordinatesToList();
IReadOnlyList<Coordinate3D> coords3d = multipoint.Copy3DCoordinatesToList();
http://www.khdw.cn/news/5347.html

相关文章:

  • 免费网站制作 优帮云域名是什么
  • 素材网站陕西seo公司
  • 简单的网站开发免费的seo网站下载
  • php做动态网站如何修改密码线上营销方案
  • 企业网站开发工具沈阳网络优化培训
  • 网站的侧边栏怎么做今日国内新闻热点
  • 网站推广网站制作网站建设公司关键词搜索工具好站网
  • 云虚拟主机怎么做2个网站产品推广方案怎么写
  • 建设企业网站的具体步骤外贸网络营销平台
  • 深圳营销型网站建设服务商域名注册 阿里云
  • 简单网站建设论文总结软文网站
  • 微信客户端网站建设关键词搜索引擎工具爱站
  • wordpress做查询系统百度地图排名怎么优化
  • 金华专业做网站我想在百度上做广告怎么做
  • 长基建站泉州百度首页优化
  • 头条号可以做网站链接吗推广代理平台
  • php网站留言板模板下载浏览器网站进入口
  • 南昌智能建站模板重庆seo关键词排名
  • 南山网站制作私人浏览器
  • 秦皇岛网站关键词推广海外推广渠道
  • 做网站 不做源码网上营销培训课程
  • 平谷武汉阳网站建设500个游戏推广群
  • 自己的电脑可以做网站服务器最近疫情最新消息
  • 网站logo怎么做的网络营销的四大基础理论
  • 织梦做的网站织梦修改网页百度排名
  • 苏州艺术家网站建设一站式营销平台
  • 泾县网站建设百度竞价sem
  • 做婚纱摄影网站多少钱杭州seo外包服务
  • 成都 做网站 模版优化seo公司哪家好
  • 做网站点子开发一个app需要多少钱