This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryServer Interface > IGeometryServer.Project Method (ArcObjects .NET 10.4 SDK) |
Projects an array of geometries from their current spatial reference (pInSR) to a destination spatial reference (pOutSR). The projection process can optionally include a datum transformation if the source and destination SRs have different GCSs.
[Visual Basic .NET] Public Function Project ( _ ByVal pInSR As ISpatialReference, _ ByVal pOutSR As ISpatialReference, _ ByVal xFormDir As esriTransformDirection, _ ByVal pXForm As ITransformation, _ ByVal pExtent As IEnvelope, _ ByVal pInGeometries As IGeometryArray _ ) As IGeometryArray
[C#] public IGeometryArray Project ( ISpatialReference pInSR, ISpatialReference pOutSR, esriTransformDirection xFormDir, ITransformation pXForm, IEnvelope pExtent, IGeometryArray pInGeometries );
[C++]
HRESULT Project(
ISpatialReference* pInSR,
ISpatialReference* pOutSR,
esriTransformDirection xFormDir,
ITransformation* pXForm,
IEnvelope* pExtent,
IGeometryArray* pInGeometries,
IGeometryArray** ppProjectedGeometries
);
[C++]
Parameters pInSR
pInSR is a parameter of type ISpatialReference pOutSR
pOutSR is a parameter of type ISpatialReference xFormDir
xFormDir is a parameter of type esriTransformDirection pXForm
pXForm is a parameter of type ITransformation pExtent
pExtent is a parameter of type IEnvelope pInGeometries
pInGeometries is a parameter of type IGeometryArray ppProjectedGeometries [out, retval]
ppProjectedGeometries is a parameter of type IGeometryArray
The Project method applies the projection pOutSR to a copy of each element of pInGeometries and places the results in ppProjectedGeometries. All input geometries are assumed to be in the spatial reference pInSR, which cannot be nil. The input geometries are not modified. The array can contain mixed top-level geometry types (specifically points, multipoints, polylines and polygons). The array can also contain envelopes. pXForm and pExtent are optional. If pXForm is specified, then it is an instance of a GeoTransformation subclass (see EDN for details on datum transformations), and xFormDir must also be specified (esriTransformForward
, esriTransformReverse
). If pExtent is specified, then all input geometries are then assumed to be contained in it, and an attempt will be made to optimize the projection operation by checking if that extent is completely contained in the projection's horizon.
The SpatialReference property for all returned geometries 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 pXForm is not specified and the datums of the specified spatial references are not the same, then a search is made through a set of default datum transformations (a.k.a geographic transformations) . Currently, the following transformations, identified by name and WKID, 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=1170
� esriSRGeoTransformation_NAD1927_To_WGS1984_4
, forward and reverse, WKID=1173
Refer to FindSRByWKID for a discussion on how to create the different kinds of spatial reference systems that can be used with this method. In addition, Well Known Identifiers (WKIDs) for available geotransformations are listed in the following enumerations:
esriSRGeoTransformation2Type
esriSRGeoTransformation3Type
esriSRGeoTransformationType
Refer to GeometryServer for additional details on how the input spatial reference is interpreted.