Erste Wahl für eine solche Transformation ist die Proj4 Projekt. Es sind mehrere Ports verfügbar, z. Java (Java Proj.4), JavaScript (Proj4js), .NET (Proj4Net) usw.
Kommandozeilenwerkzeug cs2cs.exe
verwendet wird Koordinaten zu transformieren, würde der Befehl wie folgt sein:
cs2cs +init=epsg:3034 +to +init=epsg:4326 {name of your text-file containing massive amount of coordinates}
das ist äquivalent zu
cs2cs +proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
+to +proj=longlat +datum=WGS84 +no_defs {name of your text-file containing massive amount of coordinates}
Falls Sie lieber C# meine persönlichen Favoriten DotSpatial.Projections und ProjApi (Datei csharp-4.7.0.zip
)
sind
Beispiel für DotSpatial:
double[] xy = new double[2];
xy[0] = 12345;
xy[1] = 67890;
double[] z = new double[1];
z[0] = 1;
ProjectionInfo pStart = KnownCoordinateSystems.Projected.Europe.ETRS1989LCC;
ProjectionInfo pEnd = KnownCoordinateSystems.Geographic.World.WGS1984;
Reproject.ReprojectPoints(xy, z, pStart, pEnd, 0, 1);
Beispiel mit Proj-API:
var src = new Projection(@"+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"),
var dst = new Projection(@"+proj=longlat +datum=WGS84 +no_defs"))
double[] x = { -116, -117, -118, -119, -120, -121 };
double[] y = { 34, 35, 36, 37, 38, 39 };
double[] z = { 0, 10, 20, 30, 40, 50 };
Projection.Transform(src, dst, x, y);