com.esri.arcgis.geometry
Class Datum

java.lang.Object
  extended bycom.esri.arcgis.geometry.Datum
All Implemented Interfaces:
IClone, IDatum, IDatumEdit, IESRISpatialReference, IESRISpatialReferenceGEN, IHVDatum, IPersist, IPersistStream, ISpatialReferenceInfo, ISupportErrorInfo, java.io.Serializable

public class Datum
extends java.lang.Object
implements IESRISpatialReferenceGEN, IHVDatum, IDatum, IDatumEdit, ISpatialReferenceInfo, IClone, IPersist, IPersistStream, IESRISpatialReference, ISupportErrorInfo

Creates a datum.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Remarks

The IClone::IsIdentical method is not implemented.

See Also:
Serialized Form

Constructor Summary
Datum()
          Constructs a Datum using ArcGIS Engine.
Datum(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 void define(java.lang.Object name, java.lang.Object alias, java.lang.Object abbreviation, java.lang.Object remarks, java.lang.Object spheroid)
          Defines the properties of a horizontal datum.
 void defineEx(java.lang.String name, java.lang.String alias, java.lang.String abbreviation, java.lang.String remarks, ISpheroid spheroid)
          Defines the properties of a horizontal datum.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 void exportToESRISpatialReference(java.lang.String[] str, int[] cBytesWrote)
          Exports this spatial reference component to a buffer.
 java.lang.String getAbbreviation()
          The abbreviated name of this spatial reference component.
 java.lang.String getAlias()
          The alias of this spatial reference component.
 IClone getAsIClone()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IDatum getAsIDatum()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IDatumEdit getAsIDatumEdit()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IESRISpatialReference getAsIESRISpatialReference()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IESRISpatialReferenceGEN getAsIESRISpatialReferenceGEN()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IHVDatum getAsIHVDatum()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IPersist getAsIPersist()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IPersistStream getAsIPersistStream()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ISpatialReferenceInfo getAsISpatialReferenceInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ISupportErrorInfo getAsISupportErrorInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 void getClassID(GUID[] pClassID)
          Supported Platforms
static java.lang.String getClsid()
           
 int getESRISpatialReferenceSize()
          The number of bytes required to hold the persistant representation of this spatial reference component.
 int getFactoryCode()
          The factory code of the spatial reference.
 java.lang.String getName()
          The name of this spatial reference component.
 java.lang.String getRemarks()
          The comment string of this spatial reference component.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          Supported Platforms
 ISpheroid getSpheroid()
          The spheroid of this horizontal datum.
 int hashCode()
          the hashcode for this object
 void importFromESRISpatialReference(java.lang.String str, int[] cBytesRead)
          Defines this spatial reference component from the specified ESRISpatialReference buffer.
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 void isDirty()
          Supported Platforms
 boolean isEqual(IClone other)
          Returns TRUE when the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Returns TRUE when the receiver and other are the same object.
 void load(IStream pstm)
          Supported Platforms
 void save(IStream pstm, int fClearDirty)
          Supported Platforms
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Datum

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

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

Datum

public Datum(java.lang.Object obj)
      throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

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.
Datum theDatum = (Datum) obj;

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

getClsid

public static java.lang.String getClsid()

getAsIESRISpatialReferenceGEN

public IESRISpatialReferenceGEN getAsIESRISpatialReferenceGEN()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIHVDatum

public IHVDatum getAsIHVDatum()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIDatum

public IDatum getAsIDatum()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIDatumEdit

public IDatumEdit getAsIDatumEdit()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsISpatialReferenceInfo

public ISpatialReferenceInfo getAsISpatialReferenceInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIClone

public IClone getAsIClone()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIPersist

public IPersist getAsIPersist()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIPersistStream

public IPersistStream getAsIPersistStream()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIESRISpatialReference

public IESRISpatialReference getAsIESRISpatialReference()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsISupportErrorInfo

public ISupportErrorInfo getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


getESRISpatialReferenceSize

public int getESRISpatialReferenceSize()
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: IESRISpatialReferenceGEN
The number of bytes required to hold the persistant representation of this spatial reference component.

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

importFromESRISpatialReference

public void importFromESRISpatialReference(java.lang.String str,
                                           int[] cBytesRead)
                                    throws java.io.IOException,
                                           AutomationException
Description copied from interface: IESRISpatialReferenceGEN
Defines this spatial reference component from the specified ESRISpatialReference buffer.

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

exportToESRISpatialReference

public void exportToESRISpatialReference(java.lang.String[] str,
                                         int[] cBytesWrote)
                                  throws java.io.IOException,
                                         AutomationException
Description copied from interface: IESRISpatialReferenceGEN
Exports this spatial reference component to a buffer.

Specified by:
exportToESRISpatialReference in interface IESRISpatialReferenceGEN
Parameters:
str - The str (out: use single element array)
cBytesWrote - The cBytesWrote (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpheroid

public ISpheroid getSpheroid()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IDatum
The spheroid of this horizontal datum.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the spheroid upon which the datum is based.

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

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: ISpatialReferenceInfo
The name of this spatial reference component.

Supported Platforms

Windows, Solaris, Linux

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

getAlias

public java.lang.String getAlias()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: ISpatialReferenceInfo
The alias of this spatial reference component.

Supported Platforms

Windows, Solaris, Linux

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

getAbbreviation

public java.lang.String getAbbreviation()
                                 throws java.io.IOException,
                                        AutomationException
Description copied from interface: ISpatialReferenceInfo
The abbreviated name of this spatial reference component.

Supported Platforms

Windows, Solaris, Linux

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

getRemarks

public java.lang.String getRemarks()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: ISpatialReferenceInfo
The comment string of this spatial reference component.

Supported Platforms

Windows, Solaris, Linux

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

getFactoryCode

public int getFactoryCode()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ISpatialReferenceInfo
The factory code of the spatial reference.

Supported Platforms

Windows, Solaris, Linux

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.

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

defineEx

public void defineEx(java.lang.String name,
                     java.lang.String alias,
                     java.lang.String abbreviation,
                     java.lang.String remarks,
                     ISpheroid spheroid)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IDatumEdit
Defines the properties of a horizontal datum.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

define

public void define(java.lang.Object name,
                   java.lang.Object alias,
                   java.lang.Object abbreviation,
                   java.lang.Object remarks,
                   java.lang.Object spheroid)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IDatumEdit
Defines the properties of a horizontal datum.

Supported Platforms

Windows, Solaris, Linux

Description

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

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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IClone
Clones the receiver and assigns the result to *clone.

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

assign

public void assign(IClone src)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IClone
Assigns the properties of src to the receiver.

Supported Platforms

Windows, Solaris, Linux

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.

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

isEqual

public boolean isEqual(IClone other)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IClone
Returns TRUE when the receiver and other have the same properties.

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

isIdentical

public boolean isIdentical(IClone other)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IClone
Returns TRUE when the receiver and other are the same object.

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

getClassID

public void getClassID(GUID[] pClassID)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPersist

Supported Platforms

Windows, Solaris, Linux

Description

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

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

isDirty

public void isDirty()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

load

public void load(IStream pstm)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

save

public void save(IStream pstm,
                 int fClearDirty)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: ISupportErrorInfo

Supported Platforms

Windows, Solaris, Linux

Description

Indicates whether the interface supports IErrorInfo.

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