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




geometry
The Geometry to project.
toSpatialReference
SpatialReference to project the Geometry to.
densifyTolerance
Defines the distance (tolerance) between points and is applied on the Geometry before the projection takes place.
accuracy
Determines the amount of generalization of a feature based on the specified distance.
returnEnvelope
True to return the projected Geometry as an envelope.
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 densifyTolerance As Double, _
   ByVal accuracy As Double, _
   ByVal returnEnvelope As Boolean, _
   ByVal connection As IMSServerConnection, _
   ByVal environment As Environment _
) As Geometry
Visual Basic (Usage)Copy Code
Dim geometry As Geometry
Dim toSpatialReference As SpatialReference
Dim densifyTolerance As Double
Dim accuracy As Double
Dim returnEnvelope As Boolean
Dim connection As IMSServerConnection
Dim environment As Environment
Dim value As Geometry
 
value = Projection.Project(geometry, toSpatialReference, densifyTolerance, accuracy, returnEnvelope, connection, environment)
C# 
public static Geometry Project( 
   Geometry geometry,
   SpatialReference toSpatialReference,
   double densifyTolerance,
   double accuracy,
   bool returnEnvelope,
   IMSServerConnection connection,
   Environment environment
)

Parameters

geometry
The Geometry to project.
toSpatialReference
SpatialReference to project the Geometry to.
densifyTolerance
Defines the distance (tolerance) between points and is applied on the Geometry before the projection takes place.
accuracy
Determines the amount of generalization of a feature based on the specified distance.
returnEnvelope
True to return the projected Geometry as an envelope.
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.

Remarks

Accuracy

Points are generalized within a feature based on the distance specified and the resolution of the image. Units are the same as the service. A value of 0 for accuracy returns all points of a feature, whereas higher values return a feature with fewer points thus making the feature more generalized. Note that given a non-zero value used for accuracy, and depending on the geometry layout of features in a layer, polylines or polygons may become self-intersecting. When this happens, the geomtery is invalid, the feature is ignored, and no result is returned for the spatial query. Accuracy cannot be used on a point layer; only polygon and polyline layers are valid.



DensifyTolerance

Defines the distance (tolerance) between points and is applied on the geometry before projecting takes place. The units are the same as the units for the original coordinate system. For example, if the coordinate system is in feet, the densifyTolerance distance is in feet.

The process of data densification adds virtual points to a polygon before it is projected. When a polygon is projected, the line geometry changes. For example, a square in one projection may be trapezoidal in another projection. In some cases, the number of points defining the geometry in the original geometry is not enough to describe the geometry correctly in the new coordinate system.

If the tolerance value is too small, the ArcIMS Spatial Server can slow down considerably. It is better to start with a large value. A guideline is to start with a value about 20 to 30 percent of the distance between the minimum and maximum x-coordinates of the current map extent.

ReturnEnvelope

When returnEnvelope is set to true, geometry is returned as an Envelope. When set to false, the input and output geometry are the same. The exception is when using Envelope as input geometry. In this case, when returnEnvelope is false, then the geometry is returned as a Polygon.

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 Geometry. You may need to cast it to the appropriate type to display or use it. See above on returnEnvelope for whether the returned geometry will be the same as the input type or Envelope.

See Also

© 2010 All Rights Reserved.