com.esri.arcgis.geometry
Interface IESRISpatialReferenceGEN

All Superinterfaces:
Serializable
All Known Implementing Classes:
AngularUnit, Datum, GeographicCoordinateSystem, LinearUnit, Parameter, PrimeMeridian, ProjectedCoordinateSystem, Projection, Spheroid, UnknownCoordinateSystem, VerticalCoordinateSystem, VerticalDatum

public interface IESRISpatialReferenceGEN
extends Serializable

Provides access to members that generate well known string (WKS) representations of spatial reference objects. IESRISpatialReference has been deprecated and IESRISpatialReferenceGEN should be used.

Description

This interface can be used by developers who are familiar with the Projection Engine format for persisting string representations of these components. The ESRISpatialReferenceSize property returns the number of bytes required to hold the projection engine string representation of object implementing this interface. This number is guaranteed to be large enough but may be larger than needed. The number returned from ExportToESRISpatialReference is the exact number of bytes used in the buffer to hold the string. The example code, which demonstrates how to use this method, expects that a valid SpatialReference object has already been created.

The ImportFromESRISpatialReference method defines a spatial reference from its Projection Engine string representation. If you open up a PRJ file in Notepad that contains the string description of a ProjectedCoordinateSystem, you will see something like (but as a single line):


PROJCS["Test",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984", 

SPHEROID["WGS_1984",6378137,298.257223]],PRIMEM["Greenwich",0], 

UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"], 

PARAMETER["false_easting",1000000],UNIT["Foot",0.3048]] 


Remarks

If working with a .NET language or Java, use this interface rather than IESRISpatialReference.

Product Availability

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


Method Summary
 void exportToESRISpatialReference(String[] str, int[] cBytesWrote)
          Exports this spatial reference component to a buffer.
 int getESRISpatialReferenceSize()
          The number of bytes required to hold the persistant representation of this spatial reference component.
 void importFromESRISpatialReference(String str, int[] cBytesRead)
          Defines this spatial reference component from the specified ESRISpatialReference buffer.
 

Method Detail

getESRISpatialReferenceSize

int getESRISpatialReferenceSize()
                                throws IOException,
                                       AutomationException
The number of bytes required to hold the persistant representation of this spatial reference component.

Product Availability

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

Returns:
The cBytes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

importFromESRISpatialReference

void importFromESRISpatialReference(String str,
                                    int[] cBytesRead)
                                    throws IOException,
                                           AutomationException
Defines this spatial reference component from the specified ESRISpatialReference buffer.

Product Availability

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

Parameters:
str - The str (in)
cBytesRead - The cBytesRead (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportToESRISpatialReference

void exportToESRISpatialReference(String[] str,
                                  int[] cBytesWrote)
                                  throws IOException,
                                         AutomationException
Exports this spatial reference component to a buffer.

Product Availability

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

Parameters:
str - The str (out: use single element array)
cBytesWrote - The cBytesWrote (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.