Converting between high and low precision spatial references
The following code example shows how to convert between high and low precision spatial references:
[Java]
static void lowHighConversion_Example(IFeatureClass pre92FeatureClass)throws
Exception{
IGeoDataset pre92GeoDataset = (IGeoDataset)pre92FeatureClass;
ISpatialReference pre92SpatialReference = pre92GeoDataset.getSpatialReference();
double falseX[] = new double[1];
double falseY[] = new double[1];
double xyUnits[] = new double[1];
pre92SpatialReference.getFalseOriginAndUnits(falseX, falseY, xyUnits);
System.out.println("Low precision coordinate grid definition:\n" + "false x: " +
falseX[0] + ", false y: " + falseY[0] + ", scale factor: " + xyUnits[0]);
ISpatialReferenceFactory3 spatialReferenceFactory = new
SpatialReferenceEnvironment();
ISpatialReference spatialReference92 =
spatialReferenceFactory.constructHighPrecisionSpatialReference
(pre92SpatialReference, - 1, - 1, - 1);
spatialReference92.getFalseOriginAndUnits(falseX, falseY, xyUnits);
System.out.println("high precision coordinate grid definition:\n" + "false x: "
+ falseX[0] + ", false y: " + falseY[0] + ", scale factor: " + xyUnits[0]);
}
See Also:
How to construct a high or low precision spatial referenceDevelopment licensing | Deployment licensing |
---|---|
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |
Engine Developer Kit | Engine Runtime |