|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IESRISpatialReference
Provides access to members that control the import/export operations components of a spatial reference system. This interface has been deprecated and IESRISpatialReferenceGEN should be used.
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]]
If working with a .NET language or Java, use the IESRISpatialReferenceGEN interface.
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 |
---|
int getESRISpatialReferenceSize() throws IOException, AutomationException
Returns the size in bytes required to hold the persistent representation of a coordinate system. A sample string representation is below (reformatted for display).
PROJCS["Porto_Santo_1936_UTM_Zone_28N",
GEOGCS["GCS_Porto_Santo_1936",
DATUM["D_Porto_Santo_1936",
SPHEROID["International_1924",6378388,297]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199432955]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000],
PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",-15],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0],
UNIT["Meter",1]]
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void importFromESRISpatialReference(String str, int[] cBytesRead) throws IOException, AutomationException
Converts a string representation of a coordinate system into a spatial reference object. A sample string representation is below (reformatted for display).
PROJCS["Porto_Santo_1936_UTM_Zone_28N",
GEOGCS["GCS_Porto_Santo_1936",
DATUM["D_Porto_Santo_1936",
SPHEROID["International_1924",6378388,297]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199432955]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000],
PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",-15],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0],
UNIT["Meter",1]]
str
- The str (in)cBytesRead
- The cBytesRead (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void exportToESRISpatialReference(String[] str, int[] cBytesWrote) throws IOException, AutomationException
Converts a spatial reference object into the string representation of a coordinate system. A sample string representation is below (reformatted for display).
PROJCS["Porto_Santo_1936_UTM_Zone_28N",
GEOGCS["GCS_Porto_Santo_1936",
DATUM["D_Porto_Santo_1936",
SPHEROID["International_1924",6378388,297]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199432955]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000],
PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",-15],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0],
UNIT["Meter",1]]
str
- The str (in/out: use single element array)cBytesWrote
- The cBytesWrote (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |