Multipatch的Z值单位问题(三维坐标系和三维坐标转换,极坐标)

 https://desktop.arcgis.com/zh-cn/arcmap/latest/extensions/3d-analyst/multipatches.htm

为了避免Z值与X,Y值的单位存在冲突,应该将X,Y从地理坐标转到投影坐标,也就是从度分秒转为以米为单位。计算完坐标插值之后,再转为wgs84,可是z值怎么在地理坐标系和投影坐标系之间转化呢?Multipatch可以进行坐标转换吗?三维坐标投影转换参照:threejs坐标转换 三维坐标 三维坐标系(顺便复习一下极坐标和直角坐标)

Z值如果不表明,那么在生成Multipatch的时候是默认Z为度的。。那么Z值在投影坐标系下位置是正确的。生成的Multipatch也是正确的。可是怎么把投影坐标系下生成的Multipatch转到地理坐标系中呢?

原始:(WGS84)

坐标转换:(wgs84 Web Mercator)

        //坐标转换
        private IPoint GetpProjectPoint(IPoint pPoint,bool pBool)
        {
          ISpatialReferenceFactory pSpatialReferenceEnvironemnt=new SpatialReferenceEnvironment();
          ISpatialReference pFromSpatialReference = pSpatialReferenceEnvironemnt.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);//西安80 esriSRGeoCS3Type..esriSRGeoCS_Xian1980
          ISpatialReference pToSpatialReference = pSpatialReferenceEnvironemnt.CreateProjectedCoordinateSystem((int)esriSRProjCS3Type.esriSRProjCS_WGS1984WebMercatorMajorAuxSphere);//西安80 esriSRProjCS4Type.esriSRProjCS_Xian1980_3_Degree_GK_Zone_34
          if(pBool==true)//球面转平面
          {
            IGeometry pGeo=(IGeometry)pPoint;
            pGeo.SpatialReference=pFromSpatialReference;
            pGeo.Project(pToSpatialReference);
            return pPoint;
           }
           else//平面转球面
          {
            IGeometry pGeo=(IGeometry)pPoint;
            pGeo.SpatialReference=pToSpatialReference;
            pGeo.Project(pFromSpatialReference);
           return pPoint;
          }
        }

坐标插值:

转回wgs84:

球极坐标:https://baike.baidu.com/item/%E6%9E%81%E5%9D%90%E6%A0%87/7607962?fr=aladdin

三维直角坐标系和球极坐标之间的转换关系:

球面上的所有点,默认都是高程为0。而假设高程不为0,那么,就出现了另一个半径为ρ+h的新球,

那么,不同的高程就有无数个球,那么对于三维来说最好的坐标系其实是直角坐标系。因为无论是地理坐标系,还是投影坐标系,似乎参考椭球都是唯一的。

 Z值的坐标系和单位怎么设置(垂直坐标系:Vertical Coordinate System)

A vertical coordinate system defines the origin for height or depth values. Like a horizontal coordinate system, most of the information in a vertical coordinate system is not needed unless you want to display or combine a dataset with other data that uses a different vertical coordinate system.

     Perhaps the most important part of a vertical coordinate system is its unit of measure. The unit of measure is always linear (e.g., international feet or meters). Another important part is whether the z values represent heights (elevations) or depths. For each type, the z-axis direction is positive "up" or "down", respectively.

     One z value is shown for the height-based mean sea level system. Any point that falls below the mean sea level line but is referenced to it will have a negative z value. The mean low water system has two z values associated with it. Because the mean low water system is depth-based, the z values are positive. Any point that falls above the mean low water line but is referenced to it will have a negative z value.

 https://desktop.arcgis.com/zh-cn/arcmap/10.6/map/projections/fundamentals-of-vertical-coordinate-systems.htm

不知为何,Z值只有在墨卡托投影下才能正常显示。。。

原文地址:https://www.cnblogs.com/2008nmj/p/14338004.html