com.esri.arcgis.geometry
Interface ISpatialReferenceFactory2

All Superinterfaces:
ISpatialReferenceFactory, Serializable
All Known Subinterfaces:
ISpatialReferenceFactory3
All Known Implementing Classes:
SpatialReferenceEnvironment

public interface ISpatialReferenceFactory2
extends ISpatialReferenceFactory, Serializable

Provides access to members that create different kinds of spatial reference components.

Superseded By

ISpatialReferenceFactory3

Description

ISpatialReferenceFactory2 extends the ISpatialReferenceFactory interface and provides methods for accessing a variety of predefined geographic (datum) transformations and creating any kind of spatial reference (PCS or GCS) from its factory code.

Remarks

The CreatePredefinedGeographicTransformations and the GetPredefinedGeographicTransformations methods both return an ISet of all the possible geotransformations that ArcObjects can create. The SpatialReferenceEnvironment maintains ownership of the set returned by GetPredefinedGeographicTransformations. Neither this set nor its elements should be modified. The Set and transformation elements returned by CreatePredefinedGeographicTransformations can be modified.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 ISet createPredefinedGeographicTransformations()
          Creates a list of predefined geographic transformations.
 ISpatialReference createSpatialReference(int srID)
          Creates a predefined spatial reference from an srID.
 IGeoTransformationOperationSet getGeoTransformationDefaults()
          Creates a list of default geographic transformations.
 ISet getPredefinedGeographicTransformations()
          Returns a list of predefined geographic transformations.
 
Methods inherited from interface com.esri.arcgis.geometry.ISpatialReferenceFactory
createDatum, createESRISpatialReference, createESRISpatialReferenceFromPRJ, createESRISpatialReferenceFromPRJFile, createGeographicCoordinateSystem, createGeoTransformation, createParameter, createPredefinedAngularUnits, createPredefinedDatums, createPredefinedLinearUnits, createPredefinedPrimeMeridians, createPredefinedProjections, createPredefinedSpheroids, createPrimeMeridian, createProjectedCoordinateSystem, createProjection, createSpheroid, createUnit, exportESRISpatialReferenceToPRJFile
 

Method Detail

createPredefinedGeographicTransformations

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

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

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

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

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

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

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

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.