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中也有相关的坐标系的代码。

  • 相关阅读:
    MySql 插入(insert)性能测试 zt 武胜
    mysql日期 武胜
    Some Useful Extension Methods On IList<T> zt 武胜
    SQL语句 武胜
    MySql bulk load zt 武胜
    C# 结构体初始化 武胜
    备忘 武胜
    C# 批量插入Mysql zt 武胜
    Use C# to get JSON Data from the Web and Map it to .NET Class => Made Easy! 转 武胜
    开发例子 转http://www.google.com.hk/search?newwindow=1&safe=strict&client=firefoxa&hs=Gzw&rls=org.mozilla%3AzhCN%3Aofficial&q=%E5%8D%83%E5%8F%91&oq=%E5% 武胜
  • 原文地址:https://www.cnblogs.com/ayanmw/p/2490389.html
Copyright © 2011-2022 走看看