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);

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

ArcCommunity

About Me

Kanpur/Almora, Uttar Pradesh, India