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

莆田网站建设电话乐陵seo公司

莆田网站建设电话,乐陵seo公司,小米手机网站架构,建网站需要什么程序第二篇记录下Geometry函数#xff0c;相对于其它语言#xff0c;Arcade对Geometry的支持是一大亮点#xff0c;这使得它的上限被大大提高了。 三、Geometry函数 1、Angle【角度】 单位为度#xff08;0-360#xff09;#xff0c;正北为90度#xff0c;只考虑x-y平面。…第二篇记录下Geometry函数相对于其它语言Arcade对Geometry的支持是一大亮点这使得它的上限被大大提高了。 三、Geometry函数 1、Angle【角度】 单位为度0-360正北为90度只考虑x-y平面。忽略任何z坐标。 // 返回点和要素之间的角度【两点之间的角度】 var pointA Point({ x:976259, y:8066511, spatialReference: { wkid: 3857 } }); Angle(pointA, $feature) // 三点之间的角度 var pointA Point({ x:976259, y:8066511, spatialReference: { wkid: 3857 } }); var pointC Point({ x:308654, y:9005421, spatialReference: { wkid: 3857 } }); Angle(pointA, $feature, pointC) 连接的字符串间可以添加符号 Concatenate([$feature.DLBM,$feature.DLMC,$feature.QSDWMC],/) return 0307/其他林地/小村村 2、Area【面积】 第二个参数是面积单位可以不输入。 Area($feature, square-meters) 3、AreaGeodetic【大地测量面积】 盲猜应该就是椭球面积待验证。 AreaGeodetic($feature, square-meters) 4、Buffer【缓冲区】 和缓冲工具生成的结果差不多。 Buffer($feature, 0.5, miles) 5、BufferGeodetic【Geodetic缓冲区】 也是缓冲区不过是大地测量的不知道用在什么地方... BufferGeodetic($feature, 0.5, miles) 6、Centroid【质心点】 返回输入几何体的质心。 // 可以返回要素的质心 Centroid($feature) // 也可以返回环Geometry的质心 var ringPoints Geometry($feature).rings[0]; Centroid(ringPoints); 7、Clip【裁剪】 跟裁剪工具差不多参数1是输入要素参数2是裁剪要素。 var envelope Extent({ ... }); Clip($feature, envelope) 8、Contains【图形包含】 判断一个几何图形是否包含另一个几何图形。Contains返回值有2个情况一种是布尔值一种是返回包含在内部的要素集 FeatureSet。 // 参数2是feature的话返回布尔值 var container Polygon({ ... }); Contains(containerGeometry, $feature); // 参数2是features的话返回features var parcels FeatureSetByName($map, parcels) var projectArea $feature; Count(Contains(projectArea, parcels)); 9、ConvexHull【凸包】 计算几何体的凸包。凸包是包围几何体的最小凸多边形。 var pacman_like_shape Polygon({rings: [[[1, 2], [2, 0], [1, -2], [-1, -2], [-2, -1], [-1, -1.5], [0, -1.5], [-2, 1], [-1, 2]]],spatialReference: { wkid: 3857 } }); return ConvexHull(pacman_like_shape).rings[0]; // Returns the geometry [[1,2],[2,0],[1,-2],[-1,-2],[-2,-1],[-2,1],[-1,2],[1,2]] 10、Crosses【相交】 判断一个几何图形是否与另一个几何图元相交。 var geom2 Polygon({ ... }); Crosses($feature, geom2); 11、Cut【剪切】 包括线线剪切线面剪切等。 var cutter Polyline({ ... }); Cut($feature, cutter)); 12、DefaultValue【获取值】 如果几何体中不存在关键点或者指定关键点处的值为null或为空文本值则返回指定的默认值。 找一个要素的Z值的情况 // 如果有Z值的话返回Z值没有的话就返回1000 DefaultValue(Geometry($feature), z, 1000) 如果是找多层的值就麻烦一点这里找第一个环的第一个点的“z”值值为100就返回100。 var shape Polygon({rings: [[Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })]],hasZ: true,spatialReference: { wkid: 102100 } });return DefaultValue(shape, [rings,0,0,z], 1000)如果是去找第3个环然而不存在这个对象则返回默认值1000。 var shape Polygon({rings: [[Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })]],hasZ: true,spatialReference: { wkid: 102100 } });return DefaultValue(shape, [rings,2,0,z], 1000) 环找到但是对应的M值没有的情况一样返回默认值1000。 var shape Polygon({rings: [[Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })]],hasZ: true,spatialReference: { wkid: 102100 } });return DefaultValue(shape, [rings,0,0,m], 100) 13、Densify【加密】 通过插入顶点以创建不超过指定间隔的线段来加密几何体。 // 按最大间隔10米来加密线段 var maxLength 10; Densify($feature, maxLength, meters); 14、DensifyGeodetic【Geodetic加密】 DensifyGeodetic($feature, 10000, meters); 15、Difference【擦除】 类似擦除工具。 var subtractor Polygon({ ... }); Difference($feature, subtractor); 16、Disjoint【不相交判断】 判断2个要素是否不相交返回布尔值。 var geom2 Polygon({ ... }); Disjoint($feature, geom2); 17、Distance【距离】 以给定单位返回两个几何图形之间的平面距离。 var geom2 Point({ ... }); Distance($feature, geom2, meters) 18、DistanceToCoordinate【沿线移动得到的坐标】 返回基于给定距离沿输入线的坐标。返回值为Dictionary里面含有一个coordinate属性即坐标点。 var result DistanceToCoordinate($feature, 1038); return result.coordinate; 19、EnvelopeIntersects【包络线相交】 判断一个几何图形的包络线或范围是否与另一个几何图元的包络线相交。。 var geom2 Polygon({ ... }); EnvelopeIntersects($feature, geom2); 20、Equals【相等】 在给定数据的空间参考和容差的情况下判断两个几何图形是否相等。 var geom2 Point({ ... }); Equals($feature, geom2); 21、Extent【范围】 从字典中构造一个【Extent】对象。 Extent({xMax: -95.34,xMin: -97.06138,yMax: 32.837,yMin: 12.003,hasM: false,hasZ: false,spatialReference: { wkid: 3857 } }); 或者从Geometry构造一个【Extent】对象。 Extent($feature); 或者从序列化的JSON文本构造Extent对象。  var extentJSON {xmin: -109.55, ymin: 25.76, xmax: -86.39, ymax: 49.94, spatialReference: { wkid: 3857 }}; Extent(extentJSON); 22、Generalize【概化】 和编辑里的概化是一样的作用。 例如删除顶点使线段距离原始几何体不超过100米 Generalize($feature, 100, true, meters) 23、Geometry【构造Geometry】 从要素、序列化的JSON文本或字典构造Geometry对象。 // 从要素 Geometry($feature) // 从Json文本 var pointJSON {x: -118.15, y: 33.80, spatialReference: { wkid: 3857 } }; Geometry(pointJSON); 24、HasValue【判断是否有值】 判断几何图形在给定键或索引处是否具有值。 if( TypeOf(Geometry($feature)) Point){return HasValue(Geometry($feature), z)// returns true }if( TypeOf(Geometry($feature)) Polygon){return HasValue(Geometry($feature), verticalCoordinateSystem)// returns false } 多层查找 var shape Polygon({rings: [[Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })]],hasZ: true,spatialReference: { wkid: 102100 } });if(HasValue(shape, [rings,0,0,x])){return shape.rings[0][0].x;// returns -97.06138 } 25、Intersection【相交】 和相交工具一样。 var geom2 Polygon({ ... }); Area(Intersection($feature, geom2), square-miles); 26、Intersects【相交判断】 判断2个要素是否相交返回布尔值。 var geom2 Polygon({ ... }); Intersects($feature, geom2); 27、IsSelfIntersecting【自相交判断】 判断Geometry是否存在自相交。 var polyline Polyline({ ... }); IsSelfIntersecting(polyline); 28、IsSimple【单部件判断】 判断要素是否是单部件返回布尔值。 IsSimple($feature); 29、MultiPartToSinglePart【多部件转单部件】 和多部件转单部件作用相同。 var allParts MultiPartToSinglePart($feature) 30、Multipoint【多点】 从点坐标、Json文本构造多点对象。 // 从属性定义构造 Multipoint({hasM: true,hasZ: true,points: [[-97.06138,32.837,1000,0],[-97.06133,32.836,1500,15],[-97.06124,32.834,1000,30],[-97.06127,32.832,500,50],[-97.06138,32.837,1000,0]],spatialReference: { wkid: 3857 } }); // 从Json文本构造 var multipointJSON {points: [[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]],spatialReference : { wkid: 3857 }}; Multipoint(multipointJSON); 31、NearestCoordinate【最近点】 返回输入几何体与搜索点最近的坐标而非顶点。返回的字典还包括从搜索点到最近坐标的最短平面距离。如果搜索点与输入几何体相交则搜索点将作为距离为零的结果返回。 var buildings FeatureSetByPortalItem(Portal(https://www.arcgis.com),7b1fb95ab77f40bf8aa09c8b59045449,0,[*],true ); var nearestBuilding First(Intersects(buildings, BufferGeodetic($feature, 100, feet))); var result NearestCoordinate(nearestBuilding, $feature); return result.distance; // or return result.coordinate; 32、Offset【偏移】 和编辑里的偏移作用相同。 Offset($feature, 10, meters, square); 33、Overlaps【长度】 判断一个几何图形是否与另一个几何图元重叠。 var geom2 Polygon({ ... }); Overlaps($feature, geom2); 34、Point【构造点】 // 从字典构造Point对象 Point({hasM: true,hasZ: true,x: -97.06138,y: 32.837,z: 1500,m: 15,spatialReference: { wkid: 3857 } }); // 从JSON文本构造Point对象 var pointJSON { x: -118.15, y: 33.80, spatialReference: { wkid: 3857 }}; Point(pointJSON) 35、PointToCoordinate【点到Geometry的距离】 例如根据单击的位置返回到输入多段线上最近坐标的距离。 var result;if (TypeOf($userInput) Point){result PointToCoordinate(Geometry($feature), $userInput); }return result.distanceAlong; 36、Polygon【构建面】 // 从字典构造有内环的情况 Polygon({rings: [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832],[-97.06138,32.837]],[[-97.06326,32.759],[-97.06298,32.755],[-97.06326,32.759]]],spatialReference: { wkid: 3857 } }); // 从json构造 var polygonJSON {rings: [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832], [-97.06138,32.837]],[[-97.06326,32.759],[-97.06298,32.755],[-97.06153,32.749], [-97.06326,32.759]]],spatialReference: { wkid: 3857 }}; Polygon(polygonJSON); 37、Polyline【构造线】 // 从字典构造多部件的线 Polyline({hasM: true,hasZ: true,paths: [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]],[[-97.06326,32.759],[-97.06298,32.755]]],spatialReference: { wkid: 3857 } }); // 从json构造 var polylineJSON {paths: [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]], [[-97.06326,32.759],[-97.06298,32.755]]], spatialReference: { wkid: 3857 } } Polyline(polylineJSON); 38、RingIsClockwise【顺时针】 判断多边形环中的点是否按顺时针方向排列。 var polygonRings Geometry($feature).rings; IIf(RingIsClockwise(polygonRings[0]), correct polygon, incorrect direction) 39、Rotate【旋转】 按几何体的质心、指定的度数将几何体逆时针旋转。 Rotate($feature, 90) 40、SetGeometry【设置或替换Geometry】 var pointFeature Feature(Point( ... ), name, buffer centroid); var mileBuffer BufferGeodetic(Geometry(pointFeature), 1, mile); SetGeometry(pointFeature, mileBuffer); 41、Simplify【简化】 对几何图形执行简化操作。 Simplify($feature); 42、SymmetricDifference【交集取反】 和交集取反工具效果相同。 var geom2 Polygon({ ... }); SymmetricDifference($feature, geom2); 43、Union【联合】 和联合工具效果相同。 var geom2 Polygon({ ... }); Union([ $feature, geom2 ]); 44、Within【包含】 判断一个几何体是否在另一个几何体内。 var outerGeom Polygon({ ... }); Within($feature, outerGeom);
http://www.pierceye.com/news/666802/

相关文章:

  • 网站视觉分析上海做saas平台网站的公司
  • 沈阳网站设计网站一键制作
  • 建设工程中标查询网站北京建设质量协会网站
  • 做公司网站要素做关于灯饰的网站
  • 网站编辑工具软件单位发购物或电影卡有哪些app
  • dw网站导航怎么做3免费网站建站
  • 用jsp做网站的代码句容网站建设制作
  • 宁国新站seo网页版微信登录提示二维码已失效
  • 深圳英文网站建设去哪家公司电商网站开发
  • 黑色网站后台出库入库管理软件app
  • 网站建设公司团队简介国外有网站备案制度吗
  • 怎么让公司网站随便就搜的到wordpress后台卡顿
  • 网站怎么做图片动态图片不显示报价单模板怎么做
  • 怎么建一个公司运营网站江西网站建设哪家专业
  • 网站后期维护费用网站开发学徒工作如何
  • 网站建站程序一站式网站建设服务
  • 滨州内做网站系统的公司购物网站开发用什么软件
  • 网站建设静态部分报告总结在合肥哪里学网站建设
  • 建站行业现状网易与暴雪合作
  • 网站中添加百度地图购物网站产品做促销能赚钱吗
  • 金融公司 网站开发怎么样建网站卖东西
  • 网站导航栏垂直如何提高你的网站的粘性
  • 直播网站开发接入视频中国建筑招聘官网2022
  • 大连专业企业建站找哪家wordpress 保护wp-login.php
  • 微网站建设哪家便宜想要找个网站做环评公示
  • 建设银行网银网站激活个人简历模板电子版可填写
  • 肃州区建设局网站宁夏百度seo
  • 关于做电影的网站设计西安网站建设制作 熊掌号
  • idc网站建设怎么自己做一个网页链接
  • 网站开发安全模块方案个人网站搭建软件