ISpatialReference3 Interface

Provides access to additional members that associate a spatial reference with a vertical coordinate system.

When To Use

Use ISpatialReference3 to work with the vertical coordinate system part of a spatial reference.

Members

Name Description
Read-only property Abbreviation The abbreviated name of this spatial reference component.
Read-only property Alias The alias of this spatial reference component.
Method ApplyPrecision Applies the measure and z value precisions.
Method ApplyXYPrecision Applies the XY precision.
Method Changed Notify this object that some of its parts have changed (parameter values, z unit, etc.).
Read-only property FactoryCode The factory code (WKID) of the spatial reference.
Method GetDomain The XY domain extent.
Method GetFalseOriginAndUnits Get the false origin and units.
Method GetMDomain The measure domain extent.
Method GetMFalseOriginAndUnits Get the measure false origin and units.
Method GetZDomain The Z domain extent.
Method GetZFalseOriginAndUnits Get the Z false origin and units.
Method HasMPrecision Returns true when m-value precision information has been defined.
Method HasXYPrecision Returns true when (x,y) precision information has been defined.
Method HasZPrecision Returns true when z-value precision information has been defined.
Method IsMPrecisionEqual Returns true if the measure precisions of the two spatial references are the same.
Method IsPrecisionEqual Returns TRUE when the precision information for the two spatial references is the same.
Method IsXYPrecisionEqual Returns true if the XY precisions of the two spatial references are the same.
Method IsZPrecisionEqual Returns true if the Z precisions of the two spatial references are the same.
Read-only property Name The name of this spatial reference component.
Read-only property PrecisionExImpl An opaque reference to the precision information (including z/m awareness) implementation for this spatial reference.
Read-only property PrecisionImpl An opaque reference to the precision information implementation for this spatial reference.
Method ProjectionHint Projection hint for speeding up projections.
Read-only property Remarks The comment string of this spatial reference component.
Method SetDomain The XY domain extent.
Method SetFalseOriginAndUnits Set the false origin and units.
Method SetMDomain The measure domain extent.
Method SetMFalseOriginAndUnits Set the measure false origin and units.
Method SetZDomain The Z domain extent.
Method SetZFalseOriginAndUnits Set the Z false origin and units.
Read-only property SpatialReferenceImpl SpatialReferenceImpl.
Read/write property VerticalCoordinateSystem The VCS associated with this spatial reference.
Read/write property ZCoordinateUnit The unit for the Z coordinate.

ISpatialReference3.ProjectionHint Method

Projection hint for speeding up projections.

Public Sub ProjectionHint ( _
    ByVal Geometry As IGeometry, _
    ByVal targetSR As ISpatialReference, _
    ByRef Direction As esriTransformDirection, _
    ByRef pXForm As ITransformation, _
    ByRef ProjectionHint As Integer _
)
public void ProjectionHint (
    IGeometry Geometry,
    ISpatialReference targetSR,
    ref esriTransformDirection Direction,
    ref ITransformation pXForm,
    ref int ProjectionHint
);

Description

Each geographic or projected coordinate system has a horizon. The horizon defines the mathematical limits of the coordinate system. As an example, transverse Mercator is limited to longitude values that are within +/-45 degrees of the central meridian. Most projection workflows are local. That is, all geometries of a feature class are within the horizons of the input and output coordinate systems. The process of checking whether a geometry is within, crosses, or is outside a horizon takes time. You can use the projectionhint method to calculate whether the envelope or bounding geometry of a feature class is within the applicable horizons. If it is, you can add a flag to the ProjectEx5 method to omit horizon checking.

You can also have the projectionhint method check for a geographic (datum) transformation. In the SpatialReferenceEnvironment, the GeoTransformationOperationSet stores active transformations. Normally, none are loaded by default, but if you've loaded several transformations previously, you can use projection hint to return the appropriate one and in which direction to apply it for this projection operation.

The projectionhint values are:

  esriProjectionHintNoHorizonCheck        =  0,
  esriProjectionHintCheckPCSHorizon       =  1,
  esriProjectionHintCheckGCSHorizon       =  2,
  esriProjectionHintFindGeoTransformation =  4,
  esriProjectionHintDefault               =  7,
  esriProjectionHintExplore               =  8,
  esriProjectionHintDoNotProject          = 16  // useful for isEqualNoName

ISpatialReference3.VerticalCoordinateSystem Property

The VCS associated with this spatial reference.

Public Property VerticalCoordinateSystem As IVerticalCoordinateSystem
public IVerticalCoordinateSystem VerticalCoordinateSystem {get; set;}

Description

ISpatialReferenceFactory3 srf3 = new SpatialReferenceEnvironmentClass();

            IVerticalCoordinateSystem vcs1, vcs2;

            vcs1 = srf3.CreateVerticalCoordinateSystem(5702);//NGVD_1929

            vcs2 = srf3.CreateVerticalCoordinateSystem(5703);//NAVD_1988

            ISpatialReference sr1, sr2;

            sr1 = srf3.CreateSpatialReference(4269);//GCS_North_American_1983

            ((ISpatialReference3)sr1).VerticalCoordinateSystem = vcs1;

            sr2 = srf3.CreateSpatialReference(5070);//NAD_1983_Contiguous_USA_Albers

            ((ISpatialReference3)sr2).VerticalCoordinateSystem = vcs2;

            IProjectedCoordinateSystem pcs2 = (IProjectedCoordinateSystem)sr2;

            IGeographicCoordinateSystem gcs1 = (IGeographicCoordinateSystem)sr1;

            IGeographicCoordinateSystem gcs2 = pcs2.GeographicCoordinateSystem;

            IHVCompositeDatumTransformationEditor edit = new HVCompositeDatumTransformationEditorClass();

            IHVDatumTransformation hvdt;

            edit.SetSpatialReferences(gcs1, gcs2);

            hvdt = edit.CreateHVDatumTransformation(110011);//PE_VT_NGVD29_TO_NAVD88_NAD83_ECW

            edit.Add(hvdt, esriTransformDirection.esriTransformForward);

            IHVCompositeDatumTransformation hvcdt = edit.CreateNew();

            ITransformation transform = (ITransformation)hvcdt;

            IPoint pnt = new PointClass();

            pnt.SpatialReference = sr1;

            pnt.PutCoords(4, 3);

            ((IZAware)pnt).ZAware = true;

            pnt.Z = 5;

            ((IGeometry5)pnt).ProjectEx5(sr2, esriTransformDirection.esriTransformForward, transform, false, 0, 0, ((int)esriProjectionHint.esriProjectionHintDefault) & ((int)esriProjectionHint.esriProjectionHintFindGeoTransformation));

            double x, y, z;

            pnt.QueryCoords(out x, out y);//10421841.071915826, 3982079.5947264349

            z = pnt.Z;//1.5240030480060962

Inherited Interfaces

Interfaces Description
ISpatialReference2 Provides access to additional members that control a SpatialReference.
ISpatialReference Provides access to members that control a SpatialReference.
ISpatialReferenceInfo Provides access to members that control the properties common to all components of a spatial reference system.

Classes that implement ISpatialReference3

Classes Description
GeographicCoordinateSystem Creates a geographic coordinate system.
ProjectedCoordinateSystem Creates a projected coordinate system.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.