Showing posts with label Arcobject code. Show all posts
Showing posts with label Arcobject code. Show all posts

Thursday, January 13, 2011

arcobject code for Projecting data from one coordinate system to another

Point point = new Point();point.setX(-100.00);
point.setY(40);
SpatialReferenceEnvironment sRefEnv = new SpatialReferenceEnvironment();
ISpatialReference incomingCoordSystem = sRefEnv.createGeographicCoordinateSystem(esriSRGeoCSType.esriSRGeoCS_NAD1927);
point.setSpatialReferenceByRef(incomingCoordSystem);

ISpatialReference outgoingCoordSystem = sRefEnv.createProjectedCoordinateSystem(esriSRProjCSType.esriSRProjCS_NAD1983UTM_13N);NADCONTransformation datumConversion = new NADCONTransformation(sRefEnv.createGeoTransformation(esriSRGeoTransformation2Type.esriSRGeoTransformation_NAD_1927_TO_NAD_1983_NADCON));
point.projectEx(outgoingCoordSystem, esriTransformDirection.esriTransformForward, datumConversion, false,0,0);

ArcCommunity

About Me

Kanpur/Almora, Uttar Pradesh, India