com.esri.arcgis.geometry
Interface ISpatialReference

All Superinterfaces:
ISpatialReferenceInfo, java.io.Serializable
All Known Subinterfaces:
IGeographicCoordinateSystem, IGeographicCoordinateSystem2, IProjectedCoordinateSystem, IProjectedCoordinateSystem2, IProjectedCoordinateSystem3, IProjectedCoordinateSystem4, IProjectedCoordinateSystem5, ISpatialReference2, ISpatialReference3, IUnknownCoordinateSystem
All Known Implementing Classes:
GeographicCoordinateSystem, IGeographicCoordinateSystem2Proxy, IGeographicCoordinateSystemProxy, IProjectedCoordinateSystem2Proxy, IProjectedCoordinateSystem3Proxy, IProjectedCoordinateSystem4Proxy, IProjectedCoordinateSystem5Proxy, IProjectedCoordinateSystemProxy, ISpatialReference2Proxy, ISpatialReference3Proxy, ISpatialReferenceProxy, IUnknownCoordinateSystemProxy, ProjectedCoordinateSystem, UnknownCoordinateSystem

public interface ISpatialReference
extends ISpatialReferenceInfo, java.io.Serializable

Provides access to members that control a SpatialReference.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void changed()
          Notify this object that some of its parts have changed (parameter values, z unit, etc.).
 void getDomain(double[] xMin, double[] xMax, double[] yMin, double[] yMax)
          The XY domain extent.
 void getFalseOriginAndUnits(double[] falseX, double[] falseY, double[] xyUnits)
          Get the false origin and units.
 void getMDomain(double[] outMMin, double[] outMMax)
          The measure domain extent.
 void getMFalseOriginAndUnits(double[] falseM, double[] mUnits)
          Get the measure false origin and units.
 ILinearUnit getZCoordinateUnit()
          The unit for the Z coordinate.
 void getZDomain(double[] outZMin, double[] outZMax)
          The Z domain extent.
 void getZFalseOriginAndUnits(double[] falseZ, double[] zUnits)
          Get the Z false origin and units.
 boolean hasMPrecision()
          Returns true when m-value precision information has been defined.
 boolean hasXYPrecision()
          Returns true when (x,y) precision information has been defined.
 boolean hasZPrecision()
          Returns true when z-value precision information has been defined.
 void isPrecisionEqual(ISpatialReference otherSR, boolean[] isPrecisionEqual)
          Returns TRUE when the precision information for the two spatial references is the same.
 void setDomain(double xMin, double xMax, double yMin, double yMax)
          The XY domain extent.
 void setFalseOriginAndUnits(double falseX, double falseY, double xyUnits)
          Set the false origin and units.
 void setMDomain(double inMMin, double inMMax)
          The measure domain extent.
 void setMFalseOriginAndUnits(double falseM, double mUnits)
          Set the measure false origin and units.
 void setZCoordinateUnit(ILinearUnit zunit)
          The unit for the Z coordinate.
 void setZDomain(double inZMin, double inZMax)
          The Z domain extent.
 void setZFalseOriginAndUnits(double falseZ, double zUnits)
          Set the Z false origin and units.
 
Methods inherited from interface com.esri.arcgis.geometry.ISpatialReferenceInfo
getAbbreviation, getAlias, getFactoryCode, getName, getRemarks
 

Method Detail

hasXYPrecision

public boolean hasXYPrecision()
                       throws java.io.IOException,
                              AutomationException
Returns true when (x,y) precision information has been defined.

Supported Platforms

Windows, Solaris, Linux

Returns:
The hasXYPrecision
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasZPrecision

public boolean hasZPrecision()
                      throws java.io.IOException,
                             AutomationException
Returns true when z-value precision information has been defined.

Supported Platforms

Windows, Solaris, Linux

Returns:
The hasZPrecision
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasMPrecision

public boolean hasMPrecision()
                      throws java.io.IOException,
                             AutomationException
Returns true when m-value precision information has been defined.

Supported Platforms

Windows, Solaris, Linux

Returns:
The hasMPrecision
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isPrecisionEqual

public void isPrecisionEqual(ISpatialReference otherSR,
                             boolean[] isPrecisionEqual)
                      throws java.io.IOException,
                             AutomationException
Returns TRUE when the precision information for the two spatial references is the same.

Supported Platforms

Windows, Solaris, Linux

Remarks

The IClone::IsEqual method implementation for spatial references only compares the coordinate system (projection information) portion of the spatial reference. If, in addition, you need to verify that the coordinate grid portions of the spatial references are equal, apply this method after IsEqual. The XY, Z, or M domain and resolution (precision) values, as well as the XY, Z and M cluster tolerances are compared.

Parameters:
otherSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
isPrecisionEqual - The isPrecisionEqual (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFalseOriginAndUnits

public void setFalseOriginAndUnits(double falseX,
                                   double falseY,
                                   double xyUnits)
                            throws java.io.IOException,
                                   AutomationException
Set the false origin and units.

Parameters:
falseX - The falseX (in)
falseY - The falseY (in)
xyUnits - The xyUnits (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setZFalseOriginAndUnits

public void setZFalseOriginAndUnits(double falseZ,
                                    double zUnits)
                             throws java.io.IOException,
                                    AutomationException
Set the Z false origin and units.

Parameters:
falseZ - The falseZ (in)
zUnits - The zUnits (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMFalseOriginAndUnits

public void setMFalseOriginAndUnits(double falseM,
                                    double mUnits)
                             throws java.io.IOException,
                                    AutomationException
Set the measure false origin and units.

Parameters:
falseM - The falseM (in)
mUnits - The mUnits (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFalseOriginAndUnits

public void getFalseOriginAndUnits(double[] falseX,
                                   double[] falseY,
                                   double[] xyUnits)
                            throws java.io.IOException,
                                   AutomationException
Get the false origin and units.

Supported Platforms

Windows, Solaris, Linux

Description

An alternative method to the GetDomain method. The falseX and falseY values correspond to the minimum X and minimum Y values of the XY domain. The xyUnits is the same as the precision or scale value. The inverse of the xyUnits defines the resolution of the data stored in the geodatabase. The resolution is used to snap data when it is stored in the geodatabase.

The falseX, falseY, and xyUnits use the same unit of measure as the coordinate system.

Sample values if data is based on a geographic coordinate system are:

falseX = -180
falseY = -90
xyUnits = 1000000

Sample values if data is based on a projected coordinate system are:

 
falseX = 200000
falseY = 4000000
xyUnits = 100

In the first example, the data is using a geographic coordinate system so the falseX and falseY values are in degrees. The inverse of the xyUnits is 0.000001 degrees.

In the second example, the data is using a projected coordinate system. Let us assume that the unit of measure is meters. The smallest coordinates values that a feature can have is x = 200000 meters and Y = 4000000 meters. The inverse of the xyUnits is 0.01 (meters) which means data will be snapped to the closest centimeter when it is stored.

Remarks

Use this function to retrieve the following information about the spatial reference of the geometry:

falseX: XMin of the domain.

falseY: YMin of the domain.

XYUnits: Precision of the domain.

Parameters:
falseX - The falseX (out: use single element array)
falseY - The falseY (out: use single element array)
xyUnits - The xyUnits (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZFalseOriginAndUnits

public void getZFalseOriginAndUnits(double[] falseZ,
                                    double[] zUnits)
                             throws java.io.IOException,
                                    AutomationException
Get the Z false origin and units.

Supported Platforms

Windows, Solaris, Linux

Description

An alternative method to the GetZDomain method. The falseZ value corresponds to the minimum Z value of the Z domain. The zUnits is the same as the precision or scale value. The inverse of the zUnits defines the resolution of the z data stored in the geodatabase. The resolution is used to snap data when it is stored in the geodatabase.

Parameters:
falseZ - The falseZ (out: use single element array)
zUnits - The zUnits (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISpatialReferenceResolution

getMFalseOriginAndUnits

public void getMFalseOriginAndUnits(double[] falseM,
                                    double[] mUnits)
                             throws java.io.IOException,
                                    AutomationException
Get the measure false origin and units.

Supported Platforms

Windows, Solaris, Linux

Description

An alternative method to the GetMDomain method. The falseM value corresponds to the minimum measure value of the measure domain. The mUnits is the same as the precision or scale value. The inverse of the mUnits defines the resolution of the measure data stored in the geodatabase. The resolution is used to snap data when it is stored in the geodatabase.

Parameters:
falseM - The falseM (out: use single element array)
mUnits - The mUnits (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDomain

public void getDomain(double[] xMin,
                      double[] xMax,
                      double[] yMin,
                      double[] yMax)
               throws java.io.IOException,
                      AutomationException
The XY domain extent.

Supported Platforms

Windows, Solaris, Linux

Description

An alternative method to the GetFalseOriginAndUnits method. Returns the minimum and maximum allowed X and Y values for a spatial reference. Use GetFalseOriginAndUnits to obtain the allowed precision (1/resolution) value.

Remarks

The GetDomain and SetDomain methods are used to set and get the square domain extent of a coordinate system. The domain extent is different than the valid area of a coordinate system. The domain extent is an arbitrary square used to delimit valid coordinates for a spatial reference system and determine their resolution. It is possible that the domain extent is larger than the usable area of a coordinate system (a UTM zone, for example). A small domain extent gives you finer resolution coordinates over a smaller area. A larger domain extent lets you represent features over a larger geographic area but with coarser resolution.

Parameters:
xMin - The xMin (out: use single element array)
xMax - The xMax (out: use single element array)
yMin - The yMin (out: use single element array)
yMax - The yMax (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDomain

public void setDomain(double xMin,
                      double xMax,
                      double yMin,
                      double yMax)
               throws java.io.IOException,
                      AutomationException
The XY domain extent.

Parameters:
xMin - The xMin (in)
xMax - The xMax (in)
yMin - The yMin (in)
yMax - The yMax (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZDomain

public void getZDomain(double[] outZMin,
                       double[] outZMax)
                throws java.io.IOException,
                       AutomationException
The Z domain extent.

Supported Platforms

Windows, Solaris, Linux

Description

An alternative method to the GetZFalseOriginAndUnits method. Returns the minimum and maximum allowed Z values for a spatial reference. Use GetZFalseOriginAndUnits to obtain the Z precision (1/resolution) value.

Parameters:
outZMin - The outZMin (out: use single element array)
outZMax - The outZMax (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setZDomain

public void setZDomain(double inZMin,
                       double inZMax)
                throws java.io.IOException,
                       AutomationException
The Z domain extent.

Parameters:
inZMin - The inZMin (in)
inZMax - The inZMax (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMDomain

public void getMDomain(double[] outMMin,
                       double[] outMMax)
                throws java.io.IOException,
                       AutomationException
The measure domain extent.

Supported Platforms

Windows, Solaris, Linux

Description

An alternative method to the GetMFalseOriginAndUnits method. Returns the minimum and maximum allowed measure values for a spatial reference. Use GetMFalseOriginAndUnits to obtain the M precision (1/resolution) value.

Parameters:
outMMin - The outMMin (out: use single element array)
outMMax - The outMMax (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMDomain

public void setMDomain(double inMMin,
                       double inMMax)
                throws java.io.IOException,
                       AutomationException
The measure domain extent.

Parameters:
inMMin - The inMMin (in)
inMMax - The inMMax (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZCoordinateUnit

public ILinearUnit getZCoordinateUnit()
                               throws java.io.IOException,
                                      AutomationException
The unit for the Z coordinate.

Supported Platforms

Windows, Solaris, Linux

Remarks

ISpatialReference::ZCoordinateUnit should no longer be used in favor of ISpatialReference3::VerticalCoordinateSystem 

There is now an entire Vertical Coordinate System available for your convenience. Using ISpatialReference3::VerticalCoordinateSystem has several benefits including allowing the user to choose a datum, positive or negative direction for the values of Z, and a vertical shift to the Z values.

 

Returns:
A reference to a com.esri.arcgis.geometry.ILinearUnit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setZCoordinateUnit

public void setZCoordinateUnit(ILinearUnit zunit)
                        throws java.io.IOException,
                               AutomationException
The unit for the Z coordinate.

Supported Platforms

Windows, Solaris, Linux

Parameters:
zunit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

changed

public void changed()
             throws java.io.IOException,
                    AutomationException
Notify this object that some of its parts have changed (parameter values, z unit, etc.).

Supported Platforms

Windows, Solaris, Linux

Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.