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




geometries
The GeometryCollection to project.
toSpatialReference
SpatialReference to project the Geometries to.
connection
IMSServerConnection for the projection request.
environment
Environment for the projection request.
Projects a collection of Geometries.

Syntax

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

Parameters

geometries
The GeometryCollection to project.
toSpatialReference
SpatialReference to project the Geometries to.
connection
IMSServerConnection for the projection request.
environment
Environment for the projection request.

Return Value

The projected Geometries. Cast items to the appropriate geometry type to use.

Remarks

The SpatialReference of each geometry object in the input geometry collection must all be the same, or an exception will be thrown.

Environment

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 GeometryCollection. You may need to cast collection objects to the appropriate type in order to display or use them. If the input geometry item 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.