com.esri.arcgis.geometry
Class SpatialReferenceEnvironment

java.lang.Object
  extended by com.esri.arcgis.geometry.SpatialReferenceEnvironment
All Implemented Interfaces:
IClassFactory, ISpatialReferenceFactory, ISpatialReferenceFactory2, ISpatialReferenceFactory3, ISpatialReferenceSingletonManager, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class SpatialReferenceEnvironment
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISpatialReferenceFactory, ISpatialReferenceFactory2, ISpatialReferenceFactory3, ISpatialReferenceSingletonManager, IClassFactory, ISupportErrorInfo

Creates various spatial reference objects.

Description

SpatialReferenceEnvironment is a singleton object. However, if you are working in a multi-threaded environment, each thread will have its own SpatialReferenceEnvironment. You should not pass information between the threads.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
SpatialReferenceEnvironment()
          Constructs a SpatialReferenceEnvironment using ArcGIS Engine.
SpatialReferenceEnvironment(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SpatialReferenceEnvironment theSpatialReferenceEnvironment = (SpatialReferenceEnvironment) obj;
 
Method Summary
 void commitIdentity(int[] ppInOutCoordSys)
          Ensures that no copy of pCS exists in the system.
 ISpatialReference constructHighPrecisionSpatialReference(ISpatialReference inSR, int xyDoubler, int zDoubler, int mDoubler)
          Constructs a high precision spatial reference based on an existing spatial reference.
 ISpatialReference constructLowPrecisionSpatialReference(boolean bMatchPrecision, ISpatialReference inSR, IEnvelope dataExtent)
          Construct a low precision spatial reference with the same scale factor as the high precision input, but with a different domain extent.
 IDatum createDatum(int datumType)
          Creates a predefined datum.
 void createESRISpatialReference(String spatRefInfo, ISpatialReference[] spatialReference, int[] cBytesRead)
          Creates a spatial reference system and defines it from the specified ESRISpatialReference buffer.
 ISpatialReference createESRISpatialReferenceFromPRJ(String prj)
          Creates a spatial reference from a PRJ string.
 ISpatialReference createESRISpatialReferenceFromPRJFile(String prjFile)
          Creates a spatial reference from a PRJ file.
 void createESRISpatialReferenceInfo(String spatRefInfo, ISpatialReferenceInfo[] spatialReference, int[] cBytesRead)
          Creates a spatial reference system and defines it from the specified ESRISpatialReference buffer.
 ISpatialReferenceInfo createESRISpatialReferenceInfoFromPRJ(String prj)
          Creates a spatial reference from a PRJ string.
 ISpatialReferenceInfo createESRISpatialReferenceInfoFromPRJFile(String prjFile)
          Creates a spatial reference from a PRJ file.
 IGeographicCoordinateSystem createGeographicCoordinateSystem(int gcsType)
          Creates a predefined geographic coordinate system.
 ITransformation createGeoTransformation(int gTransformationType)
          Creates a predefined transformation between geographic coordinate systems.
 void createOwnedCS(int[] ppInOutCoordSys)
          Replaces ppInOutCoordSys with an exact, deep copy.
 IParameter createParameter(int parameterType)
          Creates a predefined parameter.
 ISet createPredefinedAngularUnits()
          Creates a list of predefined angular units.
 ISet createPredefinedDatums()
          Creates a list of a list of predefined datums.
 ISet createPredefinedGeographicTransformations()
          Creates a list of predefined geographic transformations.
 ISet createPredefinedLinearUnits()
          Creates a list of predefined linear units.
 ISet createPredefinedPrimeMeridians()
          Creates a list of predefined prime meridians.
 ISet createPredefinedProjections()
          Creates a list of predefined projections.
 ISet createPredefinedSpheroids()
          Creates a list of predefined spheroids.
 ISet createPredefinedVerticalCoordinateSystems()
          Creates a list of predefined vertical coordinate systems.
 ISet createPredefinedVerticalDatums()
          Creates a list of predefined vertical datums.
 IPrimeMeridian createPrimeMeridian(int primeMeridianType)
          Creates a predefined prime meridian.
 IProjectedCoordinateSystem createProjectedCoordinateSystem(int pcsType)
          Creates a predefined projected coordinate system.
 IProjection createProjection(int projectionType)
          Creates a predefined projection.
 ISpatialReference createSpatialReference(int srID)
          Creates a predefined spatial reference from an srID.
 ISpheroid createSpheroid(int spheroidType)
          Creates a predefined spheroid.
 IUnit createUnit(int unitType)
          Creates a predefined unit of measure.
 IVerticalCoordinateSystem createVerticalCoordinateSystem(int vcsID)
          Creates a predefined vertical coordinate system from an enumeration or ID code.
 IVerticalCoordinateSystem createVerticalCoordinateSystemFromESRISpatialReference(String srInfo)
          Creates a vertical coordinate system from its string format.
 IVerticalDatum createVerticalDatum(int vdID)
          Creates a predefined vertical datum from an enumeration or ID code.
 boolean equals(Object o)
          Compare this object with another
 void exportESRISpatialReferenceInfoToPRJFile(String prjFile, ISpatialReferenceInfo spatialReference)
          Exports a spatial reference to a PRJ file.
 void exportESRISpatialReferenceToPRJFile(String prjFile, ISpatialReference spatialReference)
          Exports a spatial reference to a PRJ file.
 void findFactoryCS(int factoryCSCode, int[] ppOutCoordSys)
          Finds or manufactures a pre-defined coordinate system.
static String getClsid()
          getClsid.
 IGeoTransformationOperationSet getGeoTransformationDefaults()
          Creates a list of default geographic transformations.
 ISet getPredefinedGeographicTransformations()
          Returns a list of predefined geographic transformations.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void releaseCoordSys(int pInCoordSys)
          Decrements the ref count of the extended coord sys and possibly removes it.
 void remoteCreateInstance(GUID riid, Object[] ppvObject)
          remoteCreateInstance
 void remoteLockServer(int fLock)
          remoteLockServer
 
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

SpatialReferenceEnvironment

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

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

SpatialReferenceEnvironment

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

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

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

createESRISpatialReference

public void createESRISpatialReference(String spatRefInfo,
                                       ISpatialReference[] spatialReference,
                                       int[] cBytesRead)
                                throws IOException,
                                       AutomationException
Creates a spatial reference system and defines it from the specified ESRISpatialReference buffer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createESRISpatialReference in interface ISpatialReferenceFactory
Parameters:
spatRefInfo - The spatRefInfo (in)
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (out: use single element array)
cBytesRead - The cBytesRead (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createESRISpatialReferenceFromPRJ

public ISpatialReference createESRISpatialReferenceFromPRJ(String prj)
                                                    throws IOException,
                                                           AutomationException
Creates a spatial reference from a PRJ string.

Description

Not implemented for GeographicCoordinateSystem and ProjectedCoordinateSystem. Use the CreateESRISpatialReference or CreateESRISpatialReferenceFromPRJFile methods instead.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createESRISpatialReferenceFromPRJ in interface ISpatialReferenceFactory
Parameters:
prj - The prj (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createESRISpatialReferenceFromPRJFile

public ISpatialReference createESRISpatialReferenceFromPRJFile(String prjFile)
                                                        throws IOException,
                                                               AutomationException
Creates a spatial reference from a PRJ file.

Remarks

Both old style (workstation) and new style (arcview) prj files can be used with this method to create spatial reference system objects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createESRISpatialReferenceFromPRJFile in interface ISpatialReferenceFactory
Parameters:
prjFile - The prjFile (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportESRISpatialReferenceToPRJFile

public void exportESRISpatialReferenceToPRJFile(String prjFile,
                                                ISpatialReference spatialReference)
                                         throws IOException,
                                                AutomationException
Exports a spatial reference to a PRJ file.

Description

ExportESRISpatialReferenceToPRJFile converts an ArcGIS style spatial reference into an ArcInfo workstation-style PRJ definition.

Here's an example workstation PRJ file.

Projection    UTM

Units         Meters

Datum         WGS84

Spheroid      WGS84

Zone          10

Parameters

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
exportESRISpatialReferenceToPRJFile in interface ISpatialReferenceFactory
Parameters:
prjFile - The prjFile (in)
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createUnit

public IUnit createUnit(int unitType)
                 throws IOException,
                        AutomationException
Creates a predefined unit of measure.

Description

Use an element from the esriSRUnitType or esriSRUnit2Type enumerations as the unitType to create a particular predefined unit of measure.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createUnit in interface ISpatialReferenceFactory
Parameters:
unitType - The unitType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IUnit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRUnit2Type, esriSRUnitType

createSpheroid

public ISpheroid createSpheroid(int spheroidType)
                         throws IOException,
                                AutomationException
Creates a predefined spheroid.

Description

Use an element from the esriSRSpheroidType or esriSRSpheroid2Type enumerations as the spheroidType to create a particular predefined spheroid.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createSpheroid in interface ISpatialReferenceFactory
Parameters:
spheroidType - The spheroidType (in)
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.
See Also:
esriSRSpheroid2Type, esriSRSpheroidType

createDatum

public IDatum createDatum(int datumType)
                   throws IOException,
                          AutomationException
Creates a predefined datum.

Description

Use an element from the esriSRDatumType, esriSRDatum2Type, or esriSRDatum3Type enumerations as the datumType to create a particular predefined horizontal datum.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createDatum in interface ISpatialReferenceFactory
Parameters:
datumType - The datumType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IDatum
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRDatumType, esriSRDatum2Type, esriSRDatum3Type

createPrimeMeridian

public IPrimeMeridian createPrimeMeridian(int primeMeridianType)
                                   throws IOException,
                                          AutomationException
Creates a predefined prime meridian.

Description

Use an element from the esriSRPrimeMType or esriSRPrimeM2Type enumerations as the primeMeridianType to create a particular predefined prime meridian.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createPrimeMeridian in interface ISpatialReferenceFactory
Parameters:
primeMeridianType - The primeMeridianType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPrimeMeridian
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createProjection

public IProjection createProjection(int projectionType)
                             throws IOException,
                                    AutomationException
Creates a predefined projection.

Description

Use an element from the esriSRProjectionType, esriSRProjection2Type, esriSRProjection3Type, or esriSRProjection4Type enumerations as the projectionType to create a particular predefined map projection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createProjection in interface ISpatialReferenceFactory
Parameters:
projectionType - The projectionType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IProjection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRProjection2Type, esriSRProjection3Type, esriSRProjection4Type, esriSRProjectionType

createParameter

public IParameter createParameter(int parameterType)
                           throws IOException,
                                  AutomationException
Creates a predefined parameter.

Description

Use an element from the esriSRParameterType, esriSRParameter2Type, esriSRParameter3Type, or esriSRParameter4Type enumerations as the ParameterType to create a particular predefined parameter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createParameter in interface ISpatialReferenceFactory
Parameters:
parameterType - The parameterType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IParameter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRParameter2Type, esriSRParameter3Type, esriSRParameter4Type, esriSRParameterType

createProjectedCoordinateSystem

public IProjectedCoordinateSystem createProjectedCoordinateSystem(int pcsType)
                                                           throws IOException,
                                                                  AutomationException
Creates a predefined projected coordinate system.

Description

Use an element from the esriSRProjCSType, esriSRProjCS2Type, esriSRProjCS3Type, or esriSRProjCS4Type enumerations as the pcsType to create a particular predefined projected coordinate system.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createProjectedCoordinateSystem in interface ISpatialReferenceFactory
Parameters:
pcsType - The pcsType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IProjectedCoordinateSystem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRProjCSType, esriSRProjCS2Type, esriSRProjCS3Type, esriSRProjCS4Type

createGeographicCoordinateSystem

public IGeographicCoordinateSystem createGeographicCoordinateSystem(int gcsType)
                                                             throws IOException,
                                                                    AutomationException
Creates a predefined geographic coordinate system.

Description

Use an element from the esriSRGeoCSType, esriSRGeoCS2Type, or esriSRGeoCS3Type enumerations as the gcsType to create a particular predefined geographic coordinate system.

Remarks

The example code shows how to create an object that represents the WGS 1984 geographic coordinate system.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createGeographicCoordinateSystem in interface ISpatialReferenceFactory
Parameters:
gcsType - The gcsType (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeographicCoordinateSystem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRGeoCSType, esriSRGeoCS2Type, esriSRGeoCS3Type

createGeoTransformation

public ITransformation createGeoTransformation(int gTransformationType)
                                        throws IOException,
                                               AutomationException
Creates a predefined transformation between geographic coordinate systems.

Description

Use an element from the esriSRGeoTransformationType, esriSRGeoTransformation2Type, or esriSRGeoTransformation3Type enumerations as the gTransformationType to create a particular predefined geographic (datum) transformation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createGeoTransformation in interface ISpatialReferenceFactory
Parameters:
gTransformationType - The gTransformationType (in)
Returns:
A reference to a com.esri.arcgis.geometry.ITransformation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSRGeoTransformationType, esriSRGeoTransformation2Type, esriSRGeoTransformation3Type

createPredefinedProjections

public ISet createPredefinedProjections()
                                 throws IOException,
                                        AutomationException
Creates a list of predefined projections.

Description

Create a set of all predefined map projection objects.

Remarks

A Projection object encapsulates the mathematics needed to convert geographic coordinates between two different coordinate systems. A projection is a component of a projected coordinate system and is not usually used directly. Rather, a projected cooordinate system is defined and used to project cooordinates.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createPredefinedLinearUnits

public ISet createPredefinedLinearUnits()
                                 throws IOException,
                                        AutomationException
Creates a list of predefined linear units.

Description

Returns a list of all predefined linear units. The list has two columns: the factory code and the name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createPredefinedDatums

public ISet createPredefinedDatums()
                            throws IOException,
                                   AutomationException
Creates a list of a list of predefined datums.

Description

Returns a list of all predefined horizontal datums. The list has two columns: the factory code and the name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createPredefinedAngularUnits

public ISet createPredefinedAngularUnits()
                                  throws IOException,
                                         AutomationException
Creates a list of predefined angular units.

Description

Returns a list of all predefined angular units. The list has two columns: the factory code and the name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createPredefinedPrimeMeridians

public ISet createPredefinedPrimeMeridians()
                                    throws IOException,
                                           AutomationException
Creates a list of predefined prime meridians.

Description

Returns a list of all predefined prime meridians. The list has two columns: the factory code and the name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createPredefinedSpheroids

public ISet createPredefinedSpheroids()
                               throws IOException,
                                      AutomationException
Creates a list of predefined spheroids.

Description

Returns a list of all predefined spheroids. The list has two columns: the factory code and the name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createPredefinedGeographicTransformations

public ISet createPredefinedGeographicTransformations()
                                               throws IOException,
                                                      AutomationException
Creates a list of predefined geographic transformations.

Description

Returns a list of all predefined geographic (datum) transformations. The list has two columns: the factory code and the name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createSpatialReference

public ISpatialReference createSpatialReference(int srID)
                                         throws IOException,
                                                AutomationException
Creates a predefined spatial reference from an srID.

Description

Use a srID from the esriSRProjCSType or esriSRGeoCSType enumerations to create a particular predefined spatial reference.

Remarks

The CreateSpatialReference method creates a valid SpatialReference, either a projected or geographic coordinate system, depending on the supplied FactoryCode (here called an srID). The method returns an ISpatialReference. The example code illustrates how to test for what type of SpatialReference has been created. This method will raise an error (E_INVALIDARG) if the FactoryCode number supplied is not valid.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createSpatialReference in interface ISpatialReferenceFactory2
Parameters:
srID - The srID (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeoTransformationDefaults

public IGeoTransformationOperationSet getGeoTransformationDefaults()
                                                            throws IOException,
                                                                   AutomationException
Creates a list of default geographic transformations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPredefinedGeographicTransformations

public ISet getPredefinedGeographicTransformations()
                                            throws IOException,
                                                   AutomationException
Returns a list of predefined geographic transformations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createVerticalCoordinateSystem

public IVerticalCoordinateSystem createVerticalCoordinateSystem(int vcsID)
                                                         throws IOException,
                                                                AutomationException
Creates a predefined vertical coordinate system from an enumeration or ID code.

Description

Use an element from the esriSRVerticalCSType enumeration as the VerticalCSType to create a particular predefined vertical coordinate system.

Product Availability

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

Specified by:
createVerticalCoordinateSystem in interface ISpatialReferenceFactory3
Parameters:
vcsID - The vcsID (in)
Returns:
A reference to a com.esri.arcgis.geometry.IVerticalCoordinateSystem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createVerticalDatum

public IVerticalDatum createVerticalDatum(int vdID)
                                   throws IOException,
                                          AutomationException
Creates a predefined vertical datum from an enumeration or ID code.

Description

Use an element from the esriSRVerticalDatumType enumeration as the vdID to create a particular predefined vertical datum.

Product Availability

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

Specified by:
createVerticalDatum in interface ISpatialReferenceFactory3
Parameters:
vdID - The vdID (in)
Returns:
A reference to a com.esri.arcgis.geometry.IVerticalDatum
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createPredefinedVerticalDatums

public ISet createPredefinedVerticalDatums()
                                    throws IOException,
                                           AutomationException
Creates a list of predefined vertical datums.

Description

Returns a list of all predefined vertical datums. The list has two columns: the factory code and the name.

Product Availability

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

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

createPredefinedVerticalCoordinateSystems

public ISet createPredefinedVerticalCoordinateSystems()
                                               throws IOException,
                                                      AutomationException
Creates a list of predefined vertical coordinate systems.

Description

Returns a list of all predefined vertical coordinate systems. The list has two columns: the factory code and the name.

Product Availability

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

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

createVerticalCoordinateSystemFromESRISpatialReference

public IVerticalCoordinateSystem createVerticalCoordinateSystemFromESRISpatialReference(String srInfo)
                                                                                 throws IOException,
                                                                                        AutomationException
Creates a vertical coordinate system from its string format.

Description

Creates a vertical coordinate system object from the well-known text (WKT) version of a spatial reference. An example of a WKT string that contains geographic and vertical coordinate systems is below. The string is broken into several lines to make it easier to read.

GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
VERTCS["NAVD_1988",VDATUM["North_American_Vertical_Datum_1988"],
PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],
UNIT["Meter",1.0]]
 

Product Availability

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

Specified by:
createVerticalCoordinateSystemFromESRISpatialReference in interface ISpatialReferenceFactory3
Parameters:
srInfo - The srInfo (in)
Returns:
A reference to a com.esri.arcgis.geometry.IVerticalCoordinateSystem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createESRISpatialReferenceInfo

public void createESRISpatialReferenceInfo(String spatRefInfo,
                                           ISpatialReferenceInfo[] spatialReference,
                                           int[] cBytesRead)
                                    throws IOException,
                                           AutomationException
Creates a spatial reference system and defines it from the specified ESRISpatialReference buffer.

Description

CreateESRISpatialReferenceInfo creates a spatial reference from the well-known text (WKT) version. Below is an example of a WKT string, broken into several lines to make it easier to read.

GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",

  SPHEROID["Clarke_1866",6378206.4,294.9786982]],

  PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],

VERTCS["NAVD_1988",VDATUM["North_American_Vertical_Datum_1988"],

  PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],

  UNIT["Meter",1.0]]

Product Availability

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

Specified by:
createESRISpatialReferenceInfo in interface ISpatialReferenceFactory3
Parameters:
spatRefInfo - The spatRefInfo (in)
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReferenceInfo (out: use single element array)
cBytesRead - The cBytesRead (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createESRISpatialReferenceInfoFromPRJ

public ISpatialReferenceInfo createESRISpatialReferenceInfoFromPRJ(String prj)
                                                            throws IOException,
                                                                   AutomationException
Creates a spatial reference from a PRJ string.

Description

CreateESRISpatialReferenceInfoFromPRJ creates a spatial reference from an ArcInfo workstation version of a coordinate system definition. This type of definition is used for coverages, TINs, and GRIDs. If you pass in a Projection Engine-style string instead, "the input is not a workstation prj file" error message is returned. The Projection Engine format is used by shapefiles, geodatabases, and raster formats other than GRIDs.

An ArcInfo workstation file might look like:

Projection GEOGRAPHIC

Units DEGREES

Datum WGS84

Spheroid WGS84

Parameters

Use CreateESRISpatialReferenceInfoFromPRJFile if you want to create a spatial reference from a Projection Engine-style string.

Product Availability

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

Specified by:
createESRISpatialReferenceInfoFromPRJ in interface ISpatialReferenceFactory3
Parameters:
prj - The prj (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReferenceInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createESRISpatialReferenceInfoFromPRJFile

public ISpatialReferenceInfo createESRISpatialReferenceInfoFromPRJFile(String prjFile)
                                                                throws IOException,
                                                                       AutomationException
Creates a spatial reference from a PRJ file.

Description

Creates a spatial reference from a file that contains the well-known text version. Below is an example of a WKT version that contains both geographic and vertical coordinate systems. WKT is always a single line, but the sample is broken into several lines to make it easier to read.

GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
VERTCS["NAVD_1988",VDATUM["North_American_Vertical_Datum_1988"],
PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],
UNIT["Meter",1.0]]

Product Availability

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

Specified by:
createESRISpatialReferenceInfoFromPRJFile in interface ISpatialReferenceFactory3
Parameters:
prjFile - The prjFile (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReferenceInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportESRISpatialReferenceInfoToPRJFile

public void exportESRISpatialReferenceInfoToPRJFile(String prjFile,
                                                    ISpatialReferenceInfo spatialReference)
                                             throws IOException,
                                                    AutomationException
Exports a spatial reference to a PRJ file.

Description

Creates a well-known text version of a spatial reference and writes the information to a file. Below is an example of a WKT version that contains both geographic and vertical coordinate systems. WKT is always a single line, but the sample is broken into several lines to make it easier to read.

GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
VERTCS["NAVD_1988",VDATUM["North_American_Vertical_Datum_1988"],
PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],
UNIT["Meter",1.0]]

Product Availability

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

Specified by:
exportESRISpatialReferenceInfoToPRJFile in interface ISpatialReferenceFactory3
Parameters:
prjFile - The prjFile (in)
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReferenceInfo (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constructHighPrecisionSpatialReference

public ISpatialReference constructHighPrecisionSpatialReference(ISpatialReference inSR,
                                                                int xyDoubler,
                                                                int zDoubler,
                                                                int mDoubler)
                                                         throws IOException,
                                                                AutomationException
Constructs a high precision spatial reference based on an existing spatial reference. xy/z/mDoubler is the number of times the respective precision is to be doubled. A value of zero will find the maximum doubling for that precision.

Remarks

ConstructHighPrecisionSpatialReference creates a high precision copy of an existing low precision spatial reference. It is used when the new high precision spatial reference grid must “mesh” with the existing low precision grid. Each point of the old grid is also a point of the new grid.

The doubler parameters are exponents of powers of 2. For example, if the xyDoubler = 2, then the XY grid resolution of the output spatial reference is 4 times the input grid resolution (16 new grid cells cover 1 old grid cell). The grid also is translated so it remains centered about its current location. If a doubler parameter is -1, then the closest legal resolution to the default that covers the input XY domain and the coordinate system's horizon is chosen. If the doubler parameter is -2, the smallest possible legal resolution that covers the input XY domain and the coordinate system's horizon is chosen. In these cases, the highest exponent is chosen that will produce an output grid that both contains all the grid points defined by the input grid and covers the horizon of the input spatial reference. A doubler value of zero will maintain the existing resolution of the low precision spatial reference. It is an error to specify a doubler parameter that will result in a grid smaller than the corresponding input grid.

For ProjectedCoordinateSystems or GeographicCoordinateSystems the minimum values of the domain extent are defined just outside the envelope defined by the coordinate system's horizon.

Product Availability

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

Specified by:
constructHighPrecisionSpatialReference in interface ISpatialReferenceFactory3
Parameters:
inSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
xyDoubler - The xyDoubler (in)
zDoubler - The zDoubler (in)
mDoubler - The mDoubler (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constructLowPrecisionSpatialReference

public ISpatialReference constructLowPrecisionSpatialReference(boolean bMatchPrecision,
                                                               ISpatialReference inSR,
                                                               IEnvelope dataExtent)
                                                        throws IOException,
                                                               AutomationException
Construct a low precision spatial reference with the same scale factor as the high precision input, but with a different domain extent. If the calculated domain extent cannot cover the specified data extent, an error is returned.

Remarks

ConstructLowPrecisionSpatialReference creates a low precision copy of an existing high precision spatial reference.

Product Availability

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

Specified by:
constructLowPrecisionSpatialReference in interface ISpatialReferenceFactory3
Parameters:
bMatchPrecision - The bMatchPrecision (in)
inSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
dataExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createOwnedCS

public void createOwnedCS(int[] ppInOutCoordSys)
                   throws IOException,
                          AutomationException
Replaces ppInOutCoordSys with an exact, deep copy.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createOwnedCS in interface ISpatialReferenceSingletonManager
Parameters:
ppInOutCoordSys - The ppInOutCoordSys (A COM typedef) (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

commitIdentity

public void commitIdentity(int[] ppInOutCoordSys)
                    throws IOException,
                           AutomationException
Ensures that no copy of pCS exists in the system.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
commitIdentity in interface ISpatialReferenceSingletonManager
Parameters:
ppInOutCoordSys - The ppInOutCoordSys (A COM typedef) (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findFactoryCS

public void findFactoryCS(int factoryCSCode,
                          int[] ppOutCoordSys)
                   throws IOException,
                          AutomationException
Finds or manufactures a pre-defined coordinate system.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findFactoryCS in interface ISpatialReferenceSingletonManager
Parameters:
factoryCSCode - The factoryCSCode (in)
ppOutCoordSys - The ppOutCoordSys (A COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

releaseCoordSys

public void releaseCoordSys(int pInCoordSys)
                     throws IOException,
                            AutomationException
Decrements the ref count of the extended coord sys and possibly removes it.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
releaseCoordSys in interface ISpatialReferenceSingletonManager
Parameters:
pInCoordSys - The pInCoordSys (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remoteCreateInstance

public void remoteCreateInstance(GUID riid,
                                 Object[] ppvObject)
                          throws IOException,
                                 AutomationException
remoteCreateInstance

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
remoteCreateInstance in interface IClassFactory
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppvObject - A reference to another Object (IUnknown) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remoteLockServer

public void remoteLockServer(int fLock)
                      throws IOException,
                             AutomationException
remoteLockServer

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
remoteLockServer in interface IClassFactory
Parameters:
fLock - The fLock (in)
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.