




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
AE 中的坐标系统转换中的坐标系统转换 ArcEngine 开发总结 2008 09 04 22 47 33 阅读 405 评论 0 字号 大中小 在搞 AE 开发的时候 经常碰到的一个问题就是不同坐标系统之间的转换 AE 中 IGlobeControl 控 件中提供了 IGlobeViewUtil 类实现了大地坐标 屏幕坐标和地理坐标三者之间的转换 IMapControl 中则 提供了 ToMapPoint 和 FromMapPoint 两种方法实现屏幕坐标和地理坐标之间的转换 但在实际开发中 这些转换还不够 比如当我们需要实现地理坐标转换到自定义格式的大地坐标时 上述方法则不能解决这 些问题 最好的解决方法是使用 IGeometry 对象的 Project 方法 实现不同空间参照系之间的相互转换 以下以地理坐标转为自定义的 Albers 坐标系统为例予以说明 其主要用到的接口有 ISpatialReferenceFactory IProjectedCoordinateSystem IProjectedCoordinateSystemEdit ISpatialRe ferenceFactory IGeographicCoordinateSystem ISpatialReference 等 其 C 代码如下 将任意坐标系统转换为自定义 Albers 大地坐标 米 public static IPoint GeoToGra IPoint point IPoint pt new PointClass pt PutCoords point X point Y ISpatialReferenceFactory2 pFact new SpatialReferenceEnvironmentClass 定义地理坐标 由输入的对象决定 也可以自己定义 参考 esriSRGeoCSType IGeographicCoordinateSystem pGCS new GeographicCoordinateSystemClass pGCS pFact CreateGeographicCoordinateSystem point SpatialReference FactoryCode 自定义投影方式 IProjectedCoordinateSystem pProjectedCS new ProjectedCoordinateSystemClass IProjectedCoordinateSystemEdit pProjectedCSEdit pProjectedCS as IProjectedCoordinateSystemEdit 定义投影方式 参考 esriSRProjectionType IProjection pProjection new ProjectionClass pProjection pFact CreateProjection int esriSRProjectionType esriSRProjection Albers 定义投影单位 参考 esriSRUnitType ILinearUnit pUnit new LinearUnitClass pUnit pFact CreateUnit int esriSRUnitType esriSRUnit Meter as ILinearUnit 定义其他参数 参考 esriSRParameterType IParameter pParm new IParameter 6 pParm 0 pFact CreateParameter int esriSRParameterType esriSRParameter FalseEasting pParm 0 Value 0 pParm 1 pFact CreateParameter int esriSRParameterType esriSRParameter FalseNorthing pParm 1 Value 0 pParm 2 pFact CreateParameter int esriSRParameterType esriSRParameter CentralMeridian pParm 2 Value 110 pParm 3 pFact CreateParameter int esriSRParameterType esriSRParameter StandardParallel1 pParm 3 Value 25 pParm 4 pFact CreateParameter int esriSRParameterType esriSRParameter StandardParallel2 pParm 4 Value 47 pParm 5 pFact CreateParameter int esriSRParameterType esriSRParameter LatitudeOfOrigin pParm 5 Value 0 设置投影相关信息 object name User Defined Albers object alias Albers object abbreviation Albers object remarks User Defined Albers is the projection object usage object gcs pGCS object projectedUnit pUnit object projection pProjection object parameters pParm pProjectedCSEdit Define ref name ref alias ref abbreviation ref remarks ref usage ref gcs ref projectedUnit ref projection ref parameters 获取自定义空间参考 ISpatialReference pSpatialRef pProjectedCS as ISpatialReference IGeometry pGeometry IGeometry pt pGeometry SpatialReference pGCS as ISpatialReference 重投影处理 pGeometry Project pSpatialRef return pt 将平面坐标转换为地理坐标 WGS1984 经纬度 public static IPoint GetGeo IGeometry pg IPoint pt new PointClass pt PutCoords pg Envelope XMax pg Envelope YMax 这里 IGeometry 对象可换成 IPoint 等 对象 ISpatialReferenceFactory2 spatialReferenceFact new SpatialReferenceEnvironmentClass IGeometry geo IGeometry pt geo SpatialReference spatialReferenceFact CreateProjectedCoordinateSystem pg SpatialReference FactoryCode ISpatialReference pSR spatialReferenceFact CreateGeographicCoordinateSystem int esriSRGeoCSType esriSRGeoCS WG S1984 geo Project pSR return pt 以上实现可以参考 ESRI 提供的相关帮助示例文档 IProjectedCoordinateSystemEdit Define Example CreateParameter Example ISpatialReferenceFactory Example CreateProjection Example CreateUnit Example CreateGeographicCoordinateSystem Example CreateProjectedCoordinateSystem Example 自定义不同的坐标系统 需要设置不同的参数 所有的地图投影都必须有 FalseEasting 和 FalseNorthing 两个参数 每种不同投影的其他参数的参数如下所示 具体参照 IProjectedCoordinateSystemEdit Interface Aitoff CentralMeridian Albers CentralMeridian StandardParallel1 StandardParallel2 LatitudeOfOrigin Azimuthal Equidistant CentralMeridian LatitudeOfOrigin Behrmann CentralMeridian Bonne CentralMeridian StandardParallel1 Cassini CentralMeridian ScaleFactor LatitudeOfOrigin Craster Parabolic CentralMeridian Cylindrical Equal Area CentralMeridian StandardParallel1 Double Stereographic CentralMeridian ScaleFactor LatitudeOfOrigin Eckert I CentralMeridian Eckert II CentralMeridian Eckert III CentralMeridian Eckert IV CentralMeridian Eckert V CentralMeridian Eckert VI CentralMeridian Equidistant Conic CentralMeridian StandardParallel1 StandardParallel2 LatitudeOfOrigin Equidistant Cylindrical CentralMeridian StandardParallel1 Flat Polar Quartic CentralMeridian Gall Stereographic CentralMeridian Gauss Kruger CentralMeridian ScaleFactor LatitudeOfOrigin Gnomonic LongitudeOfCenter LatitudeOfCenter Hammer Aitoff CentralMeridian Hotine Oblique Mercator Azimuth Center ScaleFactor Azimuth LongitudeOfCenter LatitudeOfCenter Hotine Oblique Mercator Azimuth Natural Origin ScaleFactor Azimuth LongitudeOfCenter LatitudeOfCenter Hotine Oblique Mercator Two Point Center LatitudeOf1st LatitudeOf2nd ScaleFactor LongitudeOf1st LongitudeOf2nd LatitudeOfCenter Hotine Oblique Mercator Two Point Natural Origin LatitudeOf1st LatitudeOf2nd ScaleFactor LongitudeOf1st LongitudeOf2nd LatitudeOfCenter Krovak PseudoStandardParallel1 ScaleFactor Azimuth LongitudeOfCenter LatitudeOfCenter XScaleFactor YScaleFactor Rotation Lambert Azimuthal Equal Area CentralMeridian LatitudeOfOrigin Lambert Conformal Conic CentralMeridian StandardParallel1 StandardParallel2 ScaleFactor LatitudeOfOrigin Local ScaleFactor Azimuth LongitudeOfCenter LatitudeOfCenter Loximuthal CentralMeridian CentralParallel Mercator CentralMeridian StandardParallel1 Miller Cylindrical CentralMeridian Mollweide CentralMeridian New Zealand Map Grid LongitudeOfOrigin LatitudeOfOrigin Orthographic LongitudeOfCenter LatitudeOfCenter Plate Carree CentralMeridian Polyconic CentralMeridian LatitudeOfOrigin Quartic Authalic CentralMeridian Rectified Skew Orthomorphic Center ScaleFactor Azimuth LongitudeOfCenter LatitudeOfCenter Rotation Rectified Skew Orthomorphic Natural Origin ScaleFactor Azimuth LongitudeOfCenter LatitudeOfCenter Rotation Robinson CentralMeridian Robinson ARC INFO CentralMeridian Sinusoidal CentralMe
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 北师大版五年级上册数学第三单元 倍数与因数 检测卷(无答案)
- 波形梁销售合同范本
- 网吧消防安装合同范本
- 生鲜超市联营合同范本
- 社区护理老年人护理课件
- 房车租赁 出租合同范本
- 采购无缝文胸合同范本
- 大件设备承运合同范本
- 图文制作合同范本模板
- 楼房建筑施工合同范本
- 旧油罐防腐施工方案
- 急诊与灾难医学课件
- 统编语文五年级上册第一单元作业设计
- 屋顶分布式光伏项目
- 园林绿化工(技师)技能鉴定理论考试题库(含答案)
- 介入科护理常规最终版
- DL∕T 1608-2016 电能质量数据交换格式规范
- 马克思主义与社会科学方法论课后思考题答案全
- 《军事理论》教案第七章 射击与战术训练
- 全国各省(直辖市、自治区)市(自治州、地区)县(县级市)区名称一览表
- 电子产品原理分析与故障检修(第2版)高职全套教学课件
评论
0/150
提交评论