This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometry5 Interface > IGeometry5.Project5 Method (ArcObjects .NET 10.4 SDK) |
Same as Project, but with additional parameter projectionHint.
[Visual Basic .NET] Public Sub Project5 ( _ ByVal newSpatialReference As ISpatialReference, _ ByVal ProjectionHint As Integer _ )
[C#] public void Project5 ( ISpatialReference newSpatialReference, int ProjectionHint );
[C++]
HRESULT Project5(
ISpatialReference* newSpatialReference,
long ProjectionHint
);
[C++]
Parameters newSpatialReference
newSpatialReference is a parameter of type ISpatialReference ProjectionHint ProjectionHint is a parameter of type long
To Project, the geometry needs to have a Spatial Reference set, and not have an UnknownCoordinateSystem. The new spatial reference system passed to the method defines the output coordinate system. If either spatial reference is Unknown, the coordinates are not changed. The Z and measure values are not changed by the Project method.
A geometry is not densified before it is projected. This can lead to the output geometries not reflecting the 'true' shape in the new coordinate system. A straight line in one coordinate system is not necessarily a straight line in a different coordinate system. Use IGeometry2::ProjectEx if you want to densify the geometries while they are projected.
The projectionHint parameter contains information about whether a geometry will cross the coordinate system horizons. If it doesn't, parts of the code that check this and intersect the geometry with the horizons can be omitted. This can dramatically improve performance. Use ISpatialReference3::ProjectionHint to initialize this parameter.