This document is archived and information here might be outdated.  Recommended version.


ISpatialReference.SetFalseOriginAndUnits Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

ISpatialReference.SetFalseOriginAndUnits Method

Set the false origin and units.

[Visual Basic .NET]
Public Sub SetFalseOriginAndUnits ( _
    ByVal falseX As Double, _
    ByVal falseY As Double, _
    ByVal xyUnits As Double _
)
[C#]
public void SetFalseOriginAndUnits (
    double falseX,
    double falseY,
    double xyUnits
);
[C++]
HRESULT SetFalseOriginAndUnits(
  double falseX,
  double falseY,
  double xyUnits
);
[C++]

Parameters falseX falseX is a parameter of type double falseY falseY is a parameter of type double xyUnits xyUnits is a parameter of type double

Product Availability

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

Description

An alternative to the SetDomain method. The falseX and falseY values correspond to the minimum X and minimum Y values of the XY domain. The xyUnits, also referred to as the scale factor, is the is the inverse of the resolution (which is also referred to as the precision).

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
 

Remarks

When creating a new spatial reference with a projected or geographic coordinate system, the recommended method for defining the XY Domain is ISpatialReferenceResolution::ConstructFromHorizon

[C#]     //This code example shows how to set the false origin and units
    private void SetSpatialReferenceProperties(IFeatureClass featureClass)
    {
        IGeoDataset geoDataset=featureClass as IGeoDataset;
        //get access to SpatialReference through IGeoDataset
        ISpatialReference spatialReference=geoDataset.SpatialReference;
        //set the false origin and units for the coverage where the
        //falseX, falseY, and xyUnits numeric expressions are double
        spatialReference.SetFalseOriginAndUnits(475006.096654, 3759312.190404, 124999.999883);
    }

See Also

ISpatialReference Interface | ISpatialReferenceResolution Interface

.NET Samples

RSS weather GraphicTracker (Code Files: RSSWeather) | RSS weather layer (Code Files: RSSWeatherLayerClass) | Clonable object (Code Files: TestClass)