Interface IProximityOperator3D

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to members that find the 3D distance between two geometries with Zs.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("97E08CF7-7A24-4290-BA8A-ACEDB753B42C")]
public interface IProximityOperator3D

Remarks

These methods are intended to be called against top-level geometries only (Point, Multipoint, Polyline, Polygon, Envelope, MultiPatch). To call a method against a Segment/Path or Ring, first add the part to a Polyline or Polygon container, respectively, and then call the appropriate method against the container.

These methods treat MultiPatch geometries as shell representations, where the interior is not considered part of the geometry. Consequently, a point situated inside a MultiPatch that does not touch one of its surfaces will be classified as disjoint from that MultiPatch.

Methods

QueryNearestPoint3D(IPoint, esriSegmentExtension, IPoint)

Copies into 'nearest' a point on this geometry nearest to the input point.

void QueryNearestPoint3D(IPoint pInP, esriSegmentExtension extension, IPoint pNearest)

Parameters

pInP IPoint
extension esriSegmentExtension
pNearest IPoint

Remarks

If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

[C#]

QueryNearestPoint3D graphic example.

public static void QueryNearestPoint3D()
{
  IGeometry pointGeometry = GetPointGeometry();
  IGeometry envelopeGeometry = GetEnvelopeGeometry();
  IProximityOperator3D proximityOperator3D = envelopeGeometry as IProximityOperator3D;
  IPoint nearestPoint3D = new PointClass();
  proximityOperator3D.QueryNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension, nearestPoint3D);
  //nearestPoint3D = (5.393, -0.583, -6.043)
}








ReturnDistance3D(IGeometry)

Returns the minimal distance between two geometries.

double ReturnDistance3D(IGeometry pOther)

Parameters

pOther IGeometry

Returns

double

ReturnNearestPoint3D(IPoint, esriSegmentExtension)

Creates and returns a point on this geometry nearest to the input point.

IPoint ReturnNearestPoint3D(IPoint pInP, esriSegmentExtension extension)

Parameters

pInP IPoint
extension esriSegmentExtension

Returns

IPoint

Remarks

If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

[C#]

 

        public static void ReturnNearestPoint3D()

        {

IGeometry

pointGeometry = GetPointGeometry();

IGeometry envelopeGeometry = GetEnvelopeGeometry();


IProximityOperator3D

 proximityOperator3D = envelopeGeometry as IProximityOperator3D;

IPoint nearestPoint3D = proximityOperator3D.ReturnNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension);


               //nearestPoint3D = (5.393, -0.583, -6.043)


        }