com.esri.arcgis.geometry
Class Datum

java.lang.Object
  extended by com.esri.arcgis.geometry.Datum
All Implemented Interfaces:
IDatum, IDatumEdit, IESRISpatialReference, IESRISpatialReferenceGEN, IESRISpatialReferenceGEN2, IHVDatum, ISpatialReferenceAuthority, ISpatialReferenceInfo, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, ISupportErrorInfo, Externalizable, Serializable

public class Datum
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IESRISpatialReferenceGEN, IESRISpatialReferenceGEN2, IHVDatum, IDatum, IDatumEdit, ISpatialReferenceInfo, IClone, IPersist, IPersistStream, IESRISpatialReference, ISupportErrorInfo, ISpatialReferenceAuthority, Externalizable

Creates a datum.

Remarks

The IClone::IsIdentical method is not implemented.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
Datum()
          Constructs a Datum using ArcGIS Engine.
Datum(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Datum theDatum = (Datum) obj;
 
Method Summary
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 void define(Object name, Object alias, Object abbreviation, Object remarks, Object spheroid)
          Defines the properties of a horizontal datum.
 void define(String authorityName, int authorityCode, String authorityVersion)
          Defines the authority-related metadata properties for this spatial reference object.
 void defineEx(String name, String alias, String abbreviation, String remarks, ISpheroid spheroid)
          Defines the properties of a horizontal datum.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 void exportToESRISpatialReference(String[] str, int[] cBytesWrote)
          Exports this spatial reference component to a buffer.
 void exportToESRISpatialReference2(String[] str, int[] cBytesWrote)
          Exports this spatial reference component to a buffer.
 String getAbbreviation()
          The abbreviated name of this spatial reference component.
 String getAlias()
          The alias of this spatial reference component.
 String getAuthorityName()
          The name of the defining authority for this object.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 int getCode()
          The code identifying this object relative to its authority.
 int getESRISpatialReferenceSize()
          The number of bytes required to hold the persistant representation of this spatial reference component.
 int getFactoryCode()
          The factory code (WKID) of the spatial reference.
 String getName()
          The name of this spatial reference component.
 String getRemarks()
          The comment string of this spatial reference component.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 ISpheroid getSpheroid()
          The spheroid of this horizontal datum.
 String getVersion()
          The version of this spatial reference object.
 int hashCode()
          the hashcode for this object
 void importFromESRISpatialReference(String str, int[] cBytesRead)
          Defines this spatial reference component from the specified ESRISpatialReference buffer.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

Datum

public Datum()
      throws IOException,
             UnknownHostException
Constructs a Datum using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

Datum

public Datum(Object obj)
      throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Datum theDatum = (Datum) obj;

Construct a Datum using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to Datum.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getESRISpatialReferenceSize

public 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.

Specified by:
getESRISpatialReferenceSize in interface IESRISpatialReference
Specified by:
getESRISpatialReferenceSize in interface IESRISpatialReferenceGEN
Specified by:
getESRISpatialReferenceSize in interface IESRISpatialReferenceGEN2
Returns:
The cBytes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

importFromESRISpatialReference

public 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.

Specified by:
importFromESRISpatialReference in interface IESRISpatialReference
Specified by:
importFromESRISpatialReference in interface IESRISpatialReferenceGEN
Specified by:
importFromESRISpatialReference in interface IESRISpatialReferenceGEN2
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

public 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.

Specified by:
exportToESRISpatialReference in interface IESRISpatialReference
Specified by:
exportToESRISpatialReference in interface IESRISpatialReferenceGEN
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.

exportToESRISpatialReference2

public void exportToESRISpatialReference2(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.

Specified by:
exportToESRISpatialReference2 in interface IESRISpatialReferenceGEN2
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.

getSpheroid

public ISpheroid getSpheroid()
                      throws IOException,
                             AutomationException
The spheroid of this horizontal datum.

Description

Returns the spheroid upon which the datum is based.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSpheroid in interface IDatum
Returns:
A reference to a com.esri.arcgis.geometry.ISpheroid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of this spatial reference component.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface ISpatialReferenceInfo
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAlias

public String getAlias()
                throws IOException,
                       AutomationException
The alias of this spatial reference component.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAlias in interface ISpatialReferenceInfo
Returns:
The alias
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAbbreviation

public String getAbbreviation()
                       throws IOException,
                              AutomationException
The abbreviated name of this spatial reference component.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAbbreviation in interface ISpatialReferenceInfo
Returns:
The abbreviation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRemarks

public String getRemarks()
                  throws IOException,
                         AutomationException
The comment string of this spatial reference component.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRemarks in interface ISpatialReferenceInfo
Returns:
The remarks
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFactoryCode

public int getFactoryCode()
                   throws IOException,
                          AutomationException
The factory code (WKID) of the spatial reference.

Remarks

The factory code is an integer identifier that is unique by projection engine object type, such as a projected coordinate system. You can use a factory code in the ISpatialReferenceFactory::CreateProjectedCoordinateSystem method for example. If you create a custom projected coordinate system, the factory code is zero.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFactoryCode in interface ISpatialReferenceInfo
Returns:
The code
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineEx

public void defineEx(String name,
                     String alias,
                     String abbreviation,
                     String remarks,
                     ISpheroid spheroid)
              throws IOException,
                     AutomationException
Defines the properties of a horizontal datum.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
defineEx in interface IDatumEdit
Parameters:
name - The name (in)
alias - The alias (in)
abbreviation - The abbreviation (in)
remarks - The remarks (in)
spheroid - A reference to a com.esri.arcgis.geometry.ISpheroid (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

define

public void define(Object name,
                   Object alias,
                   Object abbreviation,
                   Object remarks,
                   Object spheroid)
            throws IOException,
                   AutomationException
Defines the properties of a horizontal datum.

Description

The properties of a datum that you need to set include the name and a spheroid.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
define in interface IDatumEdit
Parameters:
name - A Variant (in, optional, pass null if not required)
alias - A Variant (in, optional, pass null if not required)
abbreviation - A Variant (in, optional, pass null if not required)
remarks - A Variant (in, optional, pass null if not required)
spheroid - A Variant (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

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

Specified by:
esri_clone in interface IClone
Returns:
A reference to a com.esri.arcgis.system.IClone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
assign in interface IClone
Parameters:
src - A reference to a com.esri.arcgis.system.IClone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAuthorityName

public String getAuthorityName()
                        throws IOException,
                               AutomationException
The name of the defining authority for this object.

Product Availability

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

Specified by:
getAuthorityName in interface ISpatialReferenceAuthority
Returns:
The pAuthName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVersion

public String getVersion()
                  throws IOException,
                         AutomationException
The version of this spatial reference object.

Product Availability

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

Specified by:
getVersion in interface ISpatialReferenceAuthority
Returns:
The pVersion
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCode

public int getCode()
            throws IOException,
                   AutomationException
The code identifying this object relative to its authority. For the EPSG authority, this will initially be the WKID (factory code).

Product Availability

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

Specified by:
getCode in interface ISpatialReferenceAuthority
Returns:
The pAuthCode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

define

public void define(String authorityName,
                   int authorityCode,
                   String authorityVersion)
            throws IOException,
                   AutomationException
Defines the authority-related metadata properties for this spatial reference object.

Product Availability

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

Specified by:
define in interface ISpatialReferenceAuthority
Parameters:
authorityName - The authorityName (in)
authorityCode - The authorityCode (in)
authorityVersion - The authorityVersion (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException