zoukankan      html  css  js  c++  java
  • ArcGIS AO 之投影坐标系的示例,点的投影ProjectPoint

    在Arcgis Java SDK中,有许多例子,对于一个地图来讲,坐标系(空间参考)是非常重要的,他直接决定了一个点的坐标值是什么!所以这个示例是很基础的!特此粘贴

    这个示例就是ProjectPoint 是Geometry中的示例,几何处理。一下省略了Engine的init和关闭,需要Engine和ArcView许可。


      System.out.println("Starting ProjectPoint - An ArcObjects Java SDK Developer Sample");
    // Create a point with Geographic coordinates... Point point = new Point(); point.putCoords(-100.0, 40.0); System.out.println("Original coordinates: " + point.getX() + "," + point.getY()); // Create the SpatialReferenceEnvironment... SpatialReferenceEnvironment spatialReferenceEnvironment = new SpatialReferenceEnvironment(); // Apply the initial spatial reference... ISpatialReference geographicCoordinateSystem = spatialReferenceEnvironment .createGeographicCoordinateSystem(esriSRGeoCSType.esriSRGeoCS_NAD1927); point.setSpatialReferenceByRef(geographicCoordinateSystem); // Create the output projected coordinate system... ISpatialReference projectedCoordinateSystem = spatialReferenceEnvironment .createProjectedCoordinateSystem(esriSRProjCSType.esriSRProjCS_NAD1983UTM_13N); // Create the GeoTransformation... IGeoTransformation iGeoTransformation = (IGeoTransformation) spatialReferenceEnvironment .createGeoTransformation(esriSRGeoTransformationType.esriSRGeoTransformation_NAD1927_To_WGS1984_5); // Project the point... point.projectEx(projectedCoordinateSystem, esriTransformDirection.esriTransformForward, iGeoTransformation, false, 0.0, 0.0); System.out.println("Projected coordinates: " + point.getX() + " , " + point.getY()); System.out.println("Done!");

    比较重要的坐标系就是WGS1984和中国特有的beijing1954和xian1980,在esriSRGeoCSType中没有xian的关键字,有俩GRS1980和OSSN1980不知道是不是

    com.esri.arcgis.geometry.esriSRGeoCSType.esriSRGeoCS_Beijing1954= 4214;
    
    com.esri.arcgis.geometry.esriSRGeoCSType.esriSRGeoCS_WGS1984 =4326;
    
      public static final int esriSRGeoCS_GRS1980 = 4019;
      public static final int esriSRGeoCS_OSSN1980 = 4279;

     在esriSRPrjCSType中也有相关的坐标系的代码。

  • 相关阅读:
    ASSIC码对照表
    IIS注册 net环境
    Remoting1
    WinCE API
    【可下载】C#中关于zip压缩解压帮助类的封装
    【原创,提供下载】winfrom 打印表格,字符串的封装
    一个可编辑div中粘贴内容时过滤掉粘贴内容的一些特殊的样式或者标签
    限制一个文本框只能输入数字以及限制最大只能输入的数字
    文本框中有默认的文字,写获取焦点和失去焦点的文字显示与消失的效果
    鼠标滑过图片变大,移开还原大小的动画效果
  • 原文地址:https://www.cnblogs.com/ayanmw/p/2490389.html
Copyright © 2011-2022 走看看