This document is archived and information here might be outdated.  Recommended version.


IPRJSpatialReference.ExportSpatialReferenceToPRJ Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPRJSpatialReference Interface > IPRJSpatialReference.ExportSpatialReferenceToPRJ Method
ArcGIS Developer Help

IPRJSpatialReference.ExportSpatialReferenceToPRJ Method

Exports the spatial reference to a buffer.

[Visual Basic .NET]
Public Sub ExportSpatialReferenceToPRJ ( _
    ByVal str As IntPtr, _
    ByRef cBytesWrote As Integer _
)
[C#]
public void ExportSpatialReferenceToPRJ (
    IntPtr str,
    ref int cBytesWrote
);
[C++]
HRESULT ExportSpatialReferenceToPRJ(
  BSTR str,
  System.Int32* cBytesWrote
);
[C++]
Parameters
str [in, out]

str is a parameter of type BSTR cBytesWrote [out]
cBytesWrote is a parameter of type long*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Converts a spatial reference object into a PRJ file. A PRJ file stores the coordinate system information for a coverage, GRID, or TIN.

A sample representation (reformatted for display) is below.

Projection    UTM   
Zone          10  
Datum         NAD83     
Zunits        NO     
Units         METERS     
Spheroid      GRS1980     
Xshift        0.0000000000     
Yshift        0.0000000000  
Parameters    

If the spatial reference cannot be represented with the workstation PRJ format, E_SPATIALREFERENCE_CANTDEFINESR is returned.

Errors Returned

E_SPATIALREFERENCE_CANTDEFINESR

See Also

IPRJSpatialReference Interface