Provides access to members that generate well known string representations for spatial reference objects. The strings include authority metadata.
Description
This interface is new at ArcGIS 9.3.
Members
Name | Description | |
---|---|---|
ESRISpatialReferenceSize | The number of bytes required to hold the persistant representation of this spatial reference component. | |
ExportToESRISpatialReference2 | Exports this spatial reference component to a buffer. | |
ImportFromESRISpatialReference | Defines this spatial reference component from the specified ESRISpatialReference buffer. |
IESRISpatialReferenceGEN2.ESRISpatialReferenceSize Property
The number of bytes required to hold the persistant representation of this spatial reference component.
Public ReadOnly Property ESRISpatialReferenceSize As Integer
public int ESRISpatialReferenceSize {get;}
IESRISpatialReferenceGEN2.ExportToESRISpatialReference2 Method
Exports this spatial reference component to a buffer.
Public Sub ExportToESRISpatialReference2 ( _
ByRef str As String, _
ByRef cBytesWrote As Integer _
)
public void ExportToESRISpatialReference2 (
ref string str,
ref int cBytesWrote
);
public void ExportToESRISpatialReference(ISpatialReference spatialReference)
{
int bytes = 0;
string buffer = null;
IESRISpatialReferenceGEN2 parameterExport = spatialReference as IESRISpatialReferenceGEN2;
parameterExport.ExportToESRISpatialReference2(out buffer, out bytes);
}
Public Sub ExportToESRISpatialReference(ByVal spatialReference As ISpatialReference)
Dim bytes As Long = Nothing
Dim buffer As String = Nothing
Dim projectedCoordinateSystem As ISpatialReference = spatialReference
Dim parameterExport As IESRISpatialReferenceGEN2 = projectedCoordinateSystem
parameterExport.ExportToESRISpatialReference2(buffer, bytes)
End Sub
IESRISpatialReferenceGEN2.ImportFromESRISpatialReference Method
Defines this spatial reference component from the specified ESRISpatialReference buffer.
Public Sub ImportFromESRISpatialReference ( _
ByVal str As String, _
ByRef cBytesRead As Integer _
)
public void ImportFromESRISpatialReference (
string str,
ref int cBytesRead
);
Classes that implement IESRISpatialReferenceGEN2
Classes | Description |
---|---|
AngularUnit | Creates a angular unit of measure. |
Datum | Creates a datum. |
GeographicCoordinateSystem | Creates a geographic coordinate system. |
LinearUnit | Creates a linear unit of measure. |
Parameter | Creates a parameter. |
PrimeMeridian | Creates a prime meridian. |
ProjectedCoordinateSystem | Creates a projected coordinate system. |
Projection | Creates a map projection. |
Spheroid | Creates a spheroid. |
VerticalCoordinateSystem | Creates a vertical coordinate system. |
VerticalDatum | Creates a vertical datum. |
Private Shared Sub CreateCustomUnit()
Dim linearUnitImport As IESRISpatialReferenceGEN2
linearUnitImport = New LinearUnit()
Dim cBytesRead As Long
linearUnitImport.ImportFromESRISpatialReference("UNIT[""MyUnit"", 0.5, AUTHORITY[""MyAuthority"", 200000]]", cBytesRead)
Dim lu As ILinearUnit
lu = linearUnitImport
MsgBox(lu.MetersPerUnit)
End Sub