まず選択がProj4プロジェクトです。利用可能ないくつかのポートがあります。
などのJava(
Java Proj.4)は、JavaScript(
Proj4js)、.NET(
Proj4Net)へのコマンドラインツール
cs2cs.exe
が座標を変換するために使用され、コマンドは次のようになります:
cs2cs +init=epsg:3034 +to +init=epsg:4326 {name of your text-file containing massive amount of coordinates}
ありますあなたがC#の私の個人的なお気に入りはDotSpatial.ProjectionsとProjApi(ファイルcsharp-4.7.0.zip
)
です好む場合
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}
に相当
DotSpatialの例:メニュープロジェクト-APIと
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);
例:
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);