public SurfaceZsResult GetZs( Geometry geometry )
Public Overloads Function GetZs( _ ByVal geometry As Geometry _ ) As SurfaceZsResult
Parameters
- geometry
public SurfaceZsResult GetZs( Geometry geometry )
Public Overloads Function GetZs( _ ByVal geometry As Geometry _ ) As SurfaceZsResult
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault(); await QueuedTask.Run(() => { if (tinLayer.CanGetZs()) { // get z value for a mapPoint var zResult = tinLayer.GetZs(mapPoint); if (zResult.Status == SurfaceZsResultStatus.Ok) { // cast to a mapPoint var mapPointZ = surfaceZResult.Geometry as MapPoint; var z = mapPointZ.Z; } // get z values for a polyline zResult = tinLayer.GetZs(polyline); if (zResult.Status == SurfaceZsResultStatus.Ok) { // cast to a mapPoint var polylineZ = surfaceZResult.Geometry as Polyline; } } });
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault(); await QueuedTask.Run(() => { if (tinLayer.CanGetZs()) { // get z value for a mapPoint var zResult = tinLayer.GetZs(mapPoint); if (zResult.Status == SurfaceZsResultStatus.Ok) { // cast to a mapPoint var mapPointZ = zResult.Geometry as MapPoint; var z = mapPointZ.Z; } // get z values for a polyline zResult = tinLayer.GetZs(polyline); if (zResult.Status == SurfaceZsResultStatus.Ok) { // cast to a Polyline var polylineZ = zResult.Geometry as Polyline; } } });
Target Platforms: Windows 11, Windows 10