using System;using System.Collections.Generic;using System.Linq;using System.Text;using ESRI.ArcGIS.Geometry;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { ISpatialReference incomingCoordSystem = null; ISpatialReference outgoingCoordSystem = null; IGeoTransformation trans = null; IPoint sourceGeom = new PointClass(); SpatialReferenceEnvironmentClass sRefEnv = new SpatialReferenceEnvironmentClass(); try { incomingCoordSystem = sRefEnv.CreateGeographicCoordinateSystem(4314); //DHDN outgoingCoordSystem = sRefEnv.CreateGeographicCoordinateSystem(4326); //WGS84 trans = (IGeoTransformation)sRefEnv.CreateGeoTransformation(108206); } catch (Exception e) { throw e; } sourceGeom.X = 2573637.250571501; sourceGeom.Y = 5718583.437388875; sourceGeom.SpatialReference = incomingCoordSystem; (sourceGeom as IGeometry2).ProjectEx(outgoingCoordSystem, esriTransformDirection.esriTransformForward, trans, false, 0, 0); Console.WriteLine("x=" + sourceGeom.X + " ; y=" + sourceGeom.Y); Console.ReadKey(); } }}
Hello,I'm trying to transform a Point from DHDN to WGS84 using this Code:It seems to work, but the result is:x=-2.7588 ; y=-16.5578I would expect somthing arount:51 ; 7Thanks a lot,Andreas Ruloffsviasecure Deutschland GmbH
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.