检查图层当中是否存在高程基准(C++)ArcObject

bool ArcmapLayer::checkExistVerticalSystem()  //检查该图层是否存在高程基准
{
	IGeoDatasetPtr ipGeoDataset = getFeatureClass();
	ISpatialReferencePtr  ipSpatialRefrence;
	ipGeoDataset->get_SpatialReference(&ipSpatialRefrence);
		ISpatialReference3Ptr iSpatialRefer = ipSpatialRefrence;
		IVerticalCoordinateSystemPtr ipVerticalCoordinate;
		iSpatialRefer->get_VerticalCoordinateSystem(&ipVerticalCoordinate);
		if (ipVerticalCoordinate == nullptr)
		{
			return false;
		}
		else
		{
			return true;
	    }
}

 

你可能感兴趣的:(C++)