Geometry Service Project method

Projects an array of geometries from their current spatial reference to a destination spatial reference.  

 

Project(SpatialReference InSpatialReference, SpatialReference OutSpatialReference, boolean TransformForward, GeoTransformation  Transformation, Envelope Extent, Geometry[] InGeometryArray)

 

Parameter

Description

InSpatialReference

SpatialReference of the geometries in the InGeometryArray. The current spatial reference. Cannot be null.

 

OutSpatialReference

SpatialReference of the geometry returned from the project operation.  The destination spatial reference.  Cannot be null.

 

TransformForward

A boolean indicating whether to transform forward (true) or not (false).  Optional.
 

Transformation

An instance of a GeoTransformation must also specify forward or reverse.  Optional.  For a list of valid WKID codes for transformations, see the discussion Finding a Well-Known ID.

 

Extent

An extent Envelope which will optimize the projection operation by checking if the Envelope is completely contained in the horizon.  Optional.
 

InGeometryArray

The array of Geometry to be buffered by each distance in the array Distances. All geometries are assumed to be in the coordinate system InSpatialReference.
 

 

Return Value

 

An array of Geometry (Geometry[]).

 

Remarks

 

The Project method applies the projection OutSpatialReference to a copy of each element of InGeometryArray and places the result in an output Geometry array.  All inputs are assumed to be in the spatial reference InSpatialReference.  The input geometries are not modified.  The input array can contain mixed top-level geometry types.

The SpatialReference property for all returned geometry will be null.  It is the consumers responsibility to assign the spatial reference to each geometry returned, if desired.  In this case, the spatial reference is assumed to be the output spatial reference defined for the Project operation.  
 

If Transformation is not specified, a search is made through a set of default GeoTransformations. Currently, the following transformations are in that set:
 

esriSRGeoTransformation_NAD_1927_TO_NAD_1983_NADCON, forward and reverse, WKID=1241

esriSRGeoTransformation_NAD1983_To_WGS1984_1, forward and reverse, WKID=1188

esriSRGeoTransformation_NAD1927_To_WGS1984_4, forward and reverse, WKID=1173

For a complete list of EPSG or ESRI WKIDs for spatial references and transformations, see the discussion Finding a Well-Known ID
 

 

Examples

C#

VB.NET

Java