ESRI.ArcGIS.ADF.IMS
Project(Geometry,SpatialReference,IMSServerConnection,Environment) Method
See Also 
ESRI.ArcGIS.ADF.IMS.Projection Namespace > Projection Class > Project Method : Project(Geometry,SpatialReference,IMSServerConnection,Environment) Method




geometry
The Geometry to project.
toSpatialReference
SpatialReference to project the Geometry to.
connection
IMSServerConnection for the projection request.
environment
The Environment for the request, which provides culture information.
Projects a Geometry to a new SpatialReference.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Project( _
   ByVal geometry As Geometry, _
   ByVal toSpatialReference As SpatialReference, _
   ByVal connection As IMSServerConnection, _
   ByVal environment As Environment _
) As Geometry
Visual Basic (Usage)Copy Code
Dim geometry As Geometry
Dim toSpatialReference As SpatialReference
Dim connection As IMSServerConnection
Dim environment As Environment
Dim value As Geometry
 
value = Projection.Project(geometry, toSpatialReference, connection, environment)
C# 
public static Geometry Project( 
   Geometry geometry,
   SpatialReference toSpatialReference,
   IMSServerConnection connection,
   Environment environment
)

Parameters

geometry
The Geometry to project.
toSpatialReference
SpatialReference to project the Geometry to.
connection
IMSServerConnection for the projection request.
environment
The Environment for the request, which provides culture information.

Return Value

The new projected Geometry. Cast to the appropriate geometry type to use.

Example

For an example, see the Projection overview.

Remarks

The Environment parameter is used to determine the culture information for writing out the geometry in the request. An Environment object may be constructed by reading the machine information, which loads the current culture information from the server.

Returned Geometry

The returned value will be a Geometry object. You may need to cast the object to the appropriate type in order to display or use it. If the input geometry is Point, Multipoint, Polyline and Polygon, the result will be the same type. If the input geometry is Envelope, the returned will be Polygon. This polygon may not have a rectangular shape due to projection. If an Envelope is desired as the output, use one of the Projection methods that accepts the returnEnvelope parameter.

See Also

© 2010 All Rights Reserved.