版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 SpatialReference and Coodinate System 空间参考(Spatial Reference) 空间参考(Spatial Reference)是GIS数据的骨骼框架,能 够将我们的数据定位到相应的位置,为地图中的每一点提供准确 的坐标。 ArcGIS Engine提供了一系列对彖供开发者管理GIS系统的 坐标系统。对大部分开发者而言了解 ProjectedCoordinateSystem,Geogra phicCoordinateSystem ,SpatialReference Environment这三个组件类是非常有必要 的,对于高级开发者而言,可能需要自定义
2、坐标系统可以使用这 些对彖Projection,Datum,AngularUnit, Spheriod, PrimeMeridian 和 GeoTransformation等。 分辨率(Resolution) 分辨率反映了数据库中可以存储的坐标值的最小地图单 位长度,例如如果分辨率是0.01,那么122和123将会被存 储为不同的点,而1.222和1.223将会被认为都是1.22o 兀丫 coordinate space y-axis 1.22 1.23 values different x-axi3 -1.222 1523 * J- values are axixaid at - 1.22
3、121 -yoo 0.0 i resdubon 1.23 1 24 分辨率的单位和地图单位 致,如果当前投影坐标系统的 单位是米,那么分辨率的单位也是米,默认的分辨率大小为 0.0001m;如果是英尺为单位,则默认值是a0003281英尺 (0.003937英寸);如果是经纬度的,则默认值是 0.000000001 度. 默认情况下,ArcGIS 9.3为整数坐标采用53位空间存储 ,当然在编辑没有升级空间参考的空间数据库中的数据时, 也可以保持向下兼容。新的COM接口已经可以用来判断数据 采用的是低精度的各种空间参考,还是高精度的,同时有新 的接口可以在低精度空间参考和高精度空间参考之间转换
4、。 容限(Tolerance) 容限反映了数据的坐标精度,也就是坐标值之间的最小 距离,小于这个容限的将会被认为是同一个点。容限经常会 被使用在关系和拓扑运算中,来确定两个点是否会被合并为 同一个点。对于以米为单位的投影坐标系统,默认的容限值 是O.OOh也就是10倍的分辨率值。用户可以自定义容限值 ,但是不要小于分辨率的2倍大小 默认情况下,Tolerance=1 O*resolution, minimum tolerance=2*resolution=2.0/scale factor, tolerance决定 在relational和topological操作中,两个坐标之间的垠小距离 ,
5、当小于该距离时,认为这两个坐标为相同的坐标。 relational和top ological操作采用不同的tolera nee会得到 不同的处理结果。92之前tolerance值受resolution的影响, 92中必须要明确指定tolerance的值,在 IRelationalOperator ITopologicalOperator等对两个几何 对象进行Geometry操作的接口中,使用第一个对象的 tolerance来判断两几何体点点之间的关系,如果空间参考是 未定义,或没有空间参考和几何体关联,将采用该格网所允 许的最小tolerance取值。 Spatial Fftr*rncEnvr
6、onmnt E3cMURcrcrrrKcFtory O l$upprtrTorln|Q O i5ooHnmfMccfMMn ; lUMMae OwiaOwi/n fdMmTa tlSRDiftjnTm) O*n - OWc!)nSMaM=fe7mE UMO UpMHMrarae iSp tBarum xP5vMD voiv9tope -OsotsProotMlArcMallncri 改变空间参考 IGeoDatasetSchemaEdit 接 口的 AlterSpatialReference 方 法可以改变空间参考,在改变前先用 Can Alters patialRefere nee属性看其能
7、否被改变 P GeoDatasetSchemaEdit. Alters patialReference(pSpati alReference);/改变图层的空间参考 改变一个图层的空间参考 private void AlterspatialReferrenc( IMap pMap, IFeatureLayer featurelayer) lActiveView pActiveView = pMap as lActiveView; IFeatureClass pFeatureclass s featurelayerFeatureClass; IGeoDataset pGeoDataset = p
8、FeatureClass as IGeoDataset; IGeoDatasetSchemaEdit pGeoDatasetEdit = pGeoDataset as IGeoDatasetSchemaEdit; fl If (pGeoDatasetEdit.CanXMterSpatialReference = true) ISpatlalReferenceFactory2 pSpatRefFact = new Sp atialReferenceEnvironmantClassO; IGeographicCoordinateSystem pGeoSys s pSp atRefFact.Crea
9、teGeogra phlcCoordlnateSystem(4214);esHSRGeoCSTy pe .esriSRGeoCSBeijjng1954 pGeoDatasetEditAlterSpatial Refere nc epGeoSys); pActiveView.RefreshO; Lesson overview Geometry Operators: Working with feature geometry Drawing geometry Geop recessing Po lylinesPo lygons Feature geometry P oints Multipoint
10、s o。o oO 2 Paths 1 Line 线段:在曲线的起点和终点之间 线段集合成Paths/rings P aths/rings 集合成 lines/po lygons 可以在任何层次上编辑_ Geometry objects Of 1 Poly 3 Rings (closed paths) Bezier curve Segments Line Circular arc Points and multi points 点是零维的 通过X、Y坐标来定义 可以拥有Z和M属性值 Multi points 是 points的集合 As IPolnt Dim pPoint Point- Set
11、pPoin已 New Point pPoint.X = 300 ppointY 450 I Multi point with Six points Dim pMultiPts As IPointCollectlon Set pMultiPts = New MultiPoint pMultiPts.AddPoxnt pPoint Segme nts 由起点、终点和方程定义三个方面组成 From To 子类:Line, BezierCurve, CircularArc To From 线段用来创建其它的几个对象 Paths, polylines, rings, and polygons Dim p
12、Segment As ILine Set pSegxnent = New Line pSegmentFromPoint pPolntA pSegment.ToPolnt = pPolntB Paths and polygons Polylines 由一组闭合或不闭合的Paths组成 Po lygons 由一个或多个rings组成 Poly gon with seven rings Envel opes 定义了 feature的空间范围 最小外接矩形 所有的几何对象都有Envelo p属性 Get or set with IGeometry : Envelope Dim pEnvelope As
13、 TEnvelope Set pEnvelope pLlne.Envelope Zoomi ng in to a Feature Get the extent using a shapes Envelope property On the IGeometry interface Set the ActiveView Extent property with an Envelope pMxDoc.ActiveView.ExLent pFeature.Shape.Envelope pMxDoc ActiveView. Refresh Displaying features Display obje
14、cts DitpUr (tiKU w 4rw 牙卞网F韻?: on 1 vanxf Display!ng features 凋用IScreenDisplay接口的几个Draw方法 StartDrawing:为绘制准备显示环境 Draw Point, DrawMultipoint, DrawPolyline, DrawPolygon FInishDrawIng:把缓存中的内容绘制到屏幕上 Quick draw of geometry and symbol Dim pDisplay As TScreenDlsplay Set pDisplay = pMxApp丄ication.Display pD
15、lsplayStartDrawlng pDsplay HDC, esrlNoScreenCache pDisplay.SetSymbol pSym pDIsplayDrawPolygon pPolygon pDisplay.Fin ishDrawing IRubberBand Interface IRUbberBand是一个能帮助我们画图形元素的接口(如 点,线,面等)它有实现绘制几何形体(Geometry) 的方法TrackNew.以及移动一个一个几何形体的方法 TrackExtsting, 方法 功能 TrackExisting Indicates if to move or reshap
16、e an existing shape on the specified screen in response to a mouse down event. TrackNew Call in response to mouse down event to rubberband a new shape on the specified screen. CoClasses and Classes Description Rubbercircle Rubberbanding class for circles. RubberEnvel ope Rubberbanding class for simp
17、le envelopes. RubberLine Rubberbanding class for lines. Rubber Point Rubberbanding class for points. Rubber Po lygon Rubberbanding class for polygons. RubberRectangular Po lygon Rubberbanding class for rectangular polygons (rotatable envelopgs). Geometry sp atial op erator in terfaces Interfaces sup
18、ported by subtypes of Geometry ITopologIcalOperator (空间操作) IProxImityOperator (测量 IRelationalOperator (检査) 用于 完成例如buffer, cut, clip等空间操作 测fi shapes之间的距离 检査空间关系 通过空间标准来进行査询 ITopo logicalO perator 提供方法去操作几何对象 由 Point,Multi point, Po lyline, and Po lygon 提供 Buffer Intersect Union Cut Dim pTopoOp As ITo
19、pologicalOperator Dim pBuffPoly As IPolygon Set pTopoOp = pFeature.Shape Set pBuffPoly pTopoOp.Buffer (intBufferDistance) ITop ologicalO perator ITop ologicalO perator*接口用来通过对已存在的 几何对象做空间拓扑运算以产生新的几何对象。 ITopologicalO perator接口在GIS开发中使用非常 广泛,通常GIS系统中缓冲区分析,裁剪几何图形, 几何图形差分操作,几何图形合并操作等都需要使用 此接口。 方法名称 说明 B
20、oundary 几何图形对的边界 Buffer 对几何图形对欽进行缓冲区空间拓扑操作 clip 对几何图形对象进行裁剪空间拓扑操作 Constructunion 高效的合并多个枚举几何对您与单个几何对銀合并为单个几何 对象.这对于大a几何对叙的合并非常高效 ConvexHull 构建几何对象的凸边形 Cut 切割几何对象 Difference 一个几何图形减去它与另一个几何图形相交的部分 Intersect 两个同维度几何对彖的交集部分 Simplify 使几何对象拓扑一致 SymmetricDiffe Fence 对称差分将两个几何图形的并集部分减去两个几何图形交集的 部分 Union 合并
21、两个同维度的几何对象为单个几何对象 IRelationalO perator 提供检査空间关系的功能(return Boolean) Equals;几何对象在空间上是否相同? Touches:边界是否接触? Contains:是否是包容关系? 其它操作 Dim pRelatlonOp As IRelatlonalOpexatoz Dim booTouches As Boolean Set pRelationOp = pPoly booTouches = pRelationOp .Touches (pAnotherPoly IP roximityOperator 提供检査两个空间对象的相邻关系功
22、能 ReturnDistance: Returns the minimum distance between features (double) ReturnNearestPoint: Finds and returns the nearest point on the specified feature (point) Dim pProxOp As TProximityOperator Dim dblDlstance As Double Set pProxOp = pLlne dblDistance = pProxOp.ReturnDlstance (pSomeOtherliine) Geo
23、p recessing IBasicGeoprocessor provides access to methods found in the Geoprocessing Wizard Use for an entire Feature class Most methods require an input table Cli p Dissolve Infersect Merge Union Area and length Each feature is a type of Geometry Queryinterface to Curve (Line features) or Polygon Dim pArea As
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- xx电池厂动火作业办法
- 护理人员的专业发展
- 护理课件在线学习资源
- 学校校园消防安全隐患整改及复查报告
- 学校妇女工作开展自查自纠整改落实报告
- 学校教职工年度考核量化实施细则
- 2026年第三季度意识形态领域分析研判报告
- 2026第三届全国应急管理普法知识竞赛题库附完整答案必刷
- 学校空调使用管理规定
- 无痛肠镜检查的术后观察指标
- 2026年露天矿山复工复产试卷
- 2026广东广州市中级人民法院招募就业见习人员25人考试参考题库及答案解析
- 2026年扎兰屯职业学院单招职业技能考试题库含答案解析
- 2026年江西旅游商贸职业学院单招职业适应性测试题库含答案解析
- 2026吉林农业大学三江实验室办公室招聘工作人员考试参考题库及答案解析
- 2023年12月英语四级真题及答案-第3套
- 2026年内蒙古商贸职业学院单招职业技能测试题库带答案详解(考试直接用)
- 高职高专学生心理健康教育 第四版 课件 第第五讲 相伴适应路
- 心血管疾病健康知识科普
- 农副产品营销培训课件
- 装饰工程施工质量方案
评论
0/150
提交评论