{
// Note: Needs QueuedTask to run
// Note: Needs 3d Analyst license to run
{
ArcGIS.Core.Geometry.Geometry output = null;
// interpolate z values for a geometry
if (tinLayer.CanInterpolateShape(polyline))
output = tinLayer.InterpolateShape(polyline, SurfaceInterpolationMethod.NaturalNeighbor);
if (output != null)
{
// process the output
}
// densify the shape before interpolating
if (tinLayer.CanInterpolateShape(polygon))
output = tinLayer.InterpolateShape(polygon, SurfaceInterpolationMethod.Linear, 0.01, 0);
if (output != null)
{
// process the output
}
}
}