IPRJSpatialReference Interface

Provides access to members that control the import/export operations components of a spatial reference system. IPRJSpatialReference is same as IPRJSpatialReferenceGEN.

Members

Name Description
Method ExportSpatialReferenceToPRJ Exports the spatial reference to a buffer.
Method ImportSpatialReferenceFromPRJ Defines the spatial reference from the specified ESRISpatialReference buffer.
Read-only property PRJSpatialReferenceSize The number of bytes required to hold the persistant representation of the spatial reference.

IPRJSpatialReference.ExportSpatialReferenceToPRJ Method

Exports the spatial reference to a buffer.

Public Sub ExportSpatialReferenceToPRJ ( _
    ByRef str As String, _
    ByRef cBytesWrote As Integer _
)
public void ExportSpatialReferenceToPRJ (
    ref string str,
    ref int cBytesWrote
);

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    

Errors Returned

E_SPATIALREFERENCE_CANTDEFINESR

IPRJSpatialReference.ImportSpatialReferenceFromPRJ Method

Defines the spatial reference from the specified ESRISpatialReference buffer.

Public Sub ImportSpatialReferenceFromPRJ ( _
    ByVal str As String, _
    ByRef cBytesRead As Integer _
)
public void ImportSpatialReferenceFromPRJ (
    string str,
    ref int cBytesRead
);

Description

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

A sample represetation (reformatted for display) is below.

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

Remarks

Not implemented for the GeographicCoordinateSystem or ProjectedCoordinateSystem coclasses. Use the ISpatialReferenceFactory:CreateESRISpatialReferenceFromPRJ method instead.

IPRJSpatialReference.PRJSpatialReferenceSize Property

The number of bytes required to hold the persistant representation of the spatial reference.

Public ReadOnly Property PRJSpatialReferenceSize As Integer
public int PRJSpatialReferenceSize {get;}

Description

Returns the size in bytes needed for a string representation of a PRJ file. A sample represetation (reformatted for display) is below.

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

Classes that implement IPRJSpatialReference

Classes Description
GeographicCoordinateSystem Creates a geographic coordinate system.
ProjectedCoordinateSystem Creates a projected coordinate system.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.