本文整理汇总了C#中IMathTransform类的典型用法代码示例。如果您正苦于以下问题:C# IMathTransform类的具体用法?C# IMathTransform怎么用?C# IMathTransform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMathTransform类属于命名空间,在下文中一共展示了IMathTransform类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestDirectTransform(d, Sexa2DecimalDegrees(58, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 187742.7, 969521.653, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(56, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 189652.853, 745291.184, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(54, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 191555.55, 521935.9, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(52, 09, 22.178, CardinalPoint.N), Sexa2DecimalDegrees(5, 23, 15.500, CardinalPoint.E), 219843.841, 316827.604, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(50, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 123652.406, 76521.628, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(47, 58, 30.940, CardinalPoint.N), Sexa2DecimalDegrees(3, 18, 49.421, CardinalPoint.E), 71254.553, -148236.592, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(3, 0, 0, CardinalPoint.E), 58108.966, 411155.591, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 192504.921, 410490.433, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(7, 0, 0, CardinalPoint.E), 326870.04, 413445.087, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(9, 0, 0, CardinalPoint.E), 461106.844, 420017.408, 1E-3);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(11, 0, 0, CardinalPoint.E), 595117.95, 430202.63, 1E-3);
TestInverseTransform(i, Sexa2DecimalDegrees(57, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 188698.877, 857277.135, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(55, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 190604.967, 633523.672, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 192504.921, 410490.433, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(51, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 124202.936, 187756.876, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(49, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 123101.889, -34711.068, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 125304.704, 410370.504, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.E), 259697.429, 411515.356, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(8, 0, 0, CardinalPoint.E), 394010.571, 416279.276, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(10, 0, 0, CardinalPoint.E), 528146.69, 424658.807, 1E-6);
ExecuteIterations(d, i, Sexa2DecimalDegrees(58, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E));
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:26,代码来源:Test5103Part1.cs
示例2: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestDirectTransform(d, 64.44444444, 2.958634256, 760724.023, 3457334.864, 1E-3);
TestDirectTransform(d, 62.22222222, 2.958634256, 768397.648, 3230915.06, 1E-3);
TestDirectTransform(d, 60, 2.958634256, 776020.989, 3005978.979, 1E-3);
TestDirectTransform(d, 56.66666667, 1.847523144, 717027.602, 2668679.866, 1E-3);
TestDirectTransform(d, 54.44444444, 1.847523144, 721740.59, 2445932.319, 1E-3);
TestDirectTransform(d, 58.88888889, 0.736412033, 644765.081, 2891102.088, 1E-3);
TestDirectTransform(d, 58.88888889, 2.958634256, 779817.454, 2893959.584, 1E-3);
TestDirectTransform(d, 58.88888889, 5.180856478, 914753.403, 2900252.301, 1E-3);
TestDirectTransform(d, 58.88888889, 7.4030787, 1049485.565, 2909976.163, 1E-3);
TestDirectTransform(d, 58.88888889, 9.625300922, 1183926.705, 2923124.876, 1E-3);
TestInverseTransform(i, 63.33333333, 2.958634256, 764567.882, 3343917.044, 1E-6);
TestInverseTransform(i, 61.11111111, 2.958634256, 772214.859, 3118283.535, 1E-6);
TestInverseTransform(i, 58.88888889, 2.958634256, 779817.454, 2893959.584, 1E-6);
TestInverseTransform(i, 55.55555556, 1.847523144, 719385.487, 2557240.347, 1E-6);
TestInverseTransform(i, 52, 1.847523144, 726915.726, 2201342.518, 1E-6);
TestInverseTransform(i, 58.88888889, 1.847523144, 712300.356, 2892101.266, 1E-6);
TestInverseTransform(i, 58.88888889, 4.069745367, 847305.444, 2896676.742, 1E-6);
TestInverseTransform(i, 58.88888889, 6.291967589, 982150.413, 2904685.68, 1E-6);
TestInverseTransform(i, 58.88888889, 8.514189811, 1116747.958, 2916122.894, 1E-6);
ExecuteIterations(d, i, 64.44444444, 2.958634256);
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:25,代码来源:Test5102Part2.cs
示例3: ExecuteTests
protected void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestGeocentricDirect(d, -1598619.169, 2768889.623, 5500844.468, -1598248.169, 2768777.623, 5501278.468, 1E-3);
TestGeocentricDirect(d, -1598394.169, 2768499.912, 5500065.045, -1598023.169, 2768387.912, 5500499.045, 1E-3);
TestGeocentricDirect(d, 6377563.396, 0, 0, 6377934.396, -112, 434, 1E-3);
TestGeocentricDirect(d, 6374563.396, 0, 0, 6374934.396, -112, 434, 1E-3);
TestGeocentricDirect(d, 6367563.396, 0, 0, 6367934.396, -112, 434, 1E-3);
TestGeocentricDirect(d, -1598394.169, -2768499.912, -5500065.045, -1598023.169, -2768611.912, -5499631.045, 1E-3);
TestGeocentricDirect(d, -1598169.169, -2768110.201, -5499285.622, -1597798.169, -2768222.201, -5498851.622, 1E-3);
TestGeocentricDirect(d, 0, -5783481.614, 2678892.11, 371, -5783593.614, 2679326.11, 1E-3);
TestGeocentricDirect(d, -4087466.478, 2977579.559, -3875891.429, -4087095.478, 2977467.559, -3875457.429, 1E-3);
TestGeocentricDirect(d, -4086290.959, 2976723.233, -3874769.274, -4085919.959, 2976611.233, -3874335.274, 1E-3);
TestGeocentricDirect(d, -4084371.165, 2975324.729, -3872936.631, -4084000.165, 2975212.729, -3872502.631, 1E-3);
TestGeocentricDirect(d, -4079891.647, 2972061.553, -3868660.465, -4079520.647, 2971949.553, -3868226.465, 1E-3);
TestGeocentricDirect(d, -2187707.719, 0, -5970583.093, -2187336.719, -112, -5970149.093, 1E-3);
TestGeocentricInverse(i, -962850.5924, 555799.8517, 6260304.653, -962479.5924, 555687.8517, 6260738.653, 1E-3);
TestGeocentricInverse(i, -962668.0059, 555694.4354, 6259108.961, -962297.0059, 555582.4354, 6259542.961, 1E-3);
TestGeocentricInverse(i, 2763839.405, 4787864.865, 3170034.52, 2764210.405, 4787752.865, 3170468.52, 1E-3);
TestGeocentricInverse(i, 2763757.32, 4787722.688, 3169939.735, 2764128.32, 4787610.688, 3170373.735, 1E-3);
TestGeocentricInverse(i, 2763757.32, -4787498.688, -3170807.735, 2764128.32, -4787610.688, -3170373.735, 1E-3);
TestGeocentricInverse(i, 2763529.349, -4787103.831, -3170544.497, 2763900.349, -4787215.831, -3170110.497, 1E-3);
TestGeocentricInverse(i, 2763509.863, -4787070.081, -3170521.997, 2763880.863, -4787182.081, -3170087.997, 1E-3);
TestGeocentricInverse(i, -962668.0059, -555470.4354, -6259976.961, -962297.0059, -555582.4354, -6259542.961, 1E-3);
TestGeocentricInverse(i, -962521.945, -555386.1071, -6259020.462, -962150.945, -555498.1071, -6258586.462, 1E-3);
TestGeocentricInverse(i, -962169.2951, -555182.5046, -6256711.087, -961798.2951, -555294.5046, -6256277.087, 1E-3);
TestGeocentricInverse(i, -2187707.719, 0, 5970583.093, -2187336.719, -112, 5971017.093, 1E-3);
TestGeocentricInverse(i, -2905069.555, -2904586.555, 4862355.038, -2904698.555, -2904698.555, 4862789.038, 1E-3);
TestGeocentricInverse(i, 6377766, 112, -434, 6378137, 0, 0, 1E-3);
TestGeocentricInverse(i, -2905069.555, 2904810.555, -4863223.038, -2904698.555, 2904698.555, -4862789.038, 1E-3);
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:31,代码来源:Test5211Part1.cs
示例4: TransformBox
/// <summary>
/// Transforms a <see cref="Envelope"/>.
/// </summary>
/// <param name="box">BoundingBox to transform</param>
/// <param name="transform">Math Transform</param>
/// <returns>Transformed object</returns>
public static Envelope TransformBox(Envelope box, IMathTransform transform)
{
if (box == null)
return null;
var corners = new Coordinate[4];
#if PCL
var ll = new Coordinate(box.MinX, box.MinY);
var ur = new Coordinate(box.MaxX, box.MaxY);
var llTrans = transform.Transform(ll);
var urTrans = transform.Transform(ur);
corners[0] = new Coordinate(llTrans.X, llTrans.Y); //lower left
corners[2] = new Coordinate(llTrans.X, urTrans.Y); //upper left
corners[1] = new Coordinate(urTrans.X, urTrans.Y); //upper right
corners[3] = new Coordinate(urTrans.X, llTrans.Y); //lower right
#else
var ll = box.Min().ToDoubleArray();
var ur = box.Max().ToDoubleArray();
var llTrans = transform.Transform(ll);
var urTrans = transform.Transform(ur);
corners[0] = new Coordinate(llTrans[0], llTrans[1]); //lower left
corners[2] = new Coordinate(llTrans[0], urTrans[1]); //upper left
corners[1] = new Coordinate(urTrans[0], urTrans[1]); //upper right
corners[3] = new Coordinate(urTrans[0], llTrans[1]); //lower right
#endif
var result = new Envelope(corners[0]);
for (var i = 1; i < 4; i++)
result.ExpandToInclude(corners[i]);
return result;
}
示例5: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestDirectTransform(d, Sexa2DecimalDegrees(12, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 807919.144, 1329535.334, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(9, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 809334.177, 996918.212, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(6, 52, 42.450, CardinalPoint.N), Sexa2DecimalDegrees(116, 50, 47.588, CardinalPoint.E), 793704.631, 762081.047, 2E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 811930.345, 554475.627, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(3, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 813245.133, 333300.13, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(1, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 814401.375, 111916.452, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(123, 0, 0, CardinalPoint.E), 1475669.281, 673118.573, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(121, 0, 0, CardinalPoint.E), 1254086.173, 669446.249, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(119, 0, 0, CardinalPoint.E), 1032643.312, 666797.354, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 811253.303, 665041.265, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(115, 0, 0, CardinalPoint.E), 589825.706, 664048.715, 1E-2);
TestInverseTransform(i, Sexa2DecimalDegrees(10, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 808784.981, 1107678.473, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(10, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 808784.981, 1107678.473, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(8, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 809939.302, 886240.183, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 811253.303, 665041.265, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 812599.582, 443902.706, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(115, 0, 0, CardinalPoint.E), 590521.147, 442890.861, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(2, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E), 813851.067, 222645.511, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(0, 0, 0.624, CardinalPoint.S), Sexa2DecimalDegrees(109, 41, 8.955, CardinalPoint.E), 0, 0, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(122, 0, 0, CardinalPoint.E), 1364854.862, 671146.254, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(120, 0, 0, CardinalPoint.E), 1143352.598, 668002.074, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(118, 0, 0, CardinalPoint.E), 921947.286, 665815.815, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(116, 0, 0, CardinalPoint.E), 700549.965, 664457.586, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(114, 0, 0, CardinalPoint.E), 479068.802, 663798.63, 1E-6);
ExecuteIterations(d, i, Sexa2DecimalDegrees(12, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(117, 0, 0, CardinalPoint.E));
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:30,代码来源:Test5106Part1.cs
示例6: Transform
private static Coordinate Transform(IMathTransform transform, Coordinate input)
{
var ordinates = transform.Transform(input.ToDoubleArray());
if (ordinates.Length == 2)
return new Coordinate(ordinates[0], ordinates[1]);
return new Coordinate(ordinates[0], ordinates[1], ordinates[2]);
}
示例7: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestDirectTransform(d, Sexa2DecimalDegrees(57, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 131405.466, 1002468.081, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(55, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 130183.562, 779577.697, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 128979.263, 556953.19, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(51, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(4, 00, 00.000, CardinalPoint.E), 57605.946, 335312.662, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(49, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(4, 00, 00.000, CardinalPoint.E), 53412.761, 112842.732, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(4, 00, 00.000, CardinalPoint.E), 61856.776, 557779.118, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(6, 00, 00.000, CardinalPoint.E), 196105.283, 557057.739, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(8, 00, 00.000, CardinalPoint.E), 330331.464, 560058.312, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(10, 00, 00.000, CardinalPoint.E), 464462.348, 566781.236, 1E-2);
TestInverseTransform(i, Sexa2DecimalDegrees(58, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 132023.27, 1114054.872, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(56, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 130792.264, 890981.281, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(54, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 129579.261, 668240.578, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(52, 09, 22.178, CardinalPoint.N), Sexa2DecimalDegrees(5, 23, 15.500, CardinalPoint.E), 155000, 463000, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(50, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(4, 00, 00.000, CardinalPoint.E), 55502.306, 224086.514, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(47, 58, 30.940, CardinalPoint.N), Sexa2DecimalDegrees(3, 18, 49.421, CardinalPoint.E), 0, 0, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(3, 00, 00.000, CardinalPoint.E), -5253.063, 559535.55, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E), 128979.263, 556953.19, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(7, 00, 00.000, CardinalPoint.E), 263225.722, 558092.769, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(9, 00, 00.000, CardinalPoint.E), 397413.385, 562954.436, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(11, 00, 00.000, CardinalPoint.E), 531469.202, 571538.839, 1E-6);
ExecuteIterations(d, i, Sexa2DecimalDegrees(57, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(5, 00, 00.000, CardinalPoint.E));
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:26,代码来源:Test5104Part1.cs
示例8: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestDirectTransform(d, Sexa2DecimalDegrees(58, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 760722.92, 3457368.68, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(56, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 768396.68, 3230944.81, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(54, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 776020.19, 3006003.84, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(51, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 717027.29, 2668695.78, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(49, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 721740.43, 2445941.16, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(3, 0, 0, CardinalPoint.E), 644764.91, 2891124.20, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 779816.75, 2893981.68, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(7, 0, 0, CardinalPoint.E), 914752.17, 2900274.37, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(9, 0, 0, CardinalPoint.E), 1049483.80, 2909998.20, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(11, 0, 0, CardinalPoint.E), 1183924.41, 2923146.86, 1E-2);
TestInverseTransform(i, Sexa2DecimalDegrees(57, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 764566.84, 3343948.93, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(55, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 772213.97, 3118310.95, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E), 779816.75, 2893981.68, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(50, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 719385.25, 2557252.84, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(46, 48, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 726915.75, 2201342.52, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(4, 0, 0, CardinalPoint.E), 712299.92, 2892123.37, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(6, 0, 0, CardinalPoint.E), 847304.47, 2896698.83, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(8, 0, 0, CardinalPoint.E), 982148.91, 2904707.73, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(53, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(10, 0, 0, CardinalPoint.E), 1116745.93, 2916144.90, 1E-6);
ExecuteIterations(d, i, Sexa2DecimalDegrees(58, 0, 0, CardinalPoint.N), Sexa2DecimalDegrees(5, 0, 0, CardinalPoint.E));
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:25,代码来源:Test5102Part1.cs
示例9: Inverse
/// <summary>
/// Creates the inverse transform of this object.
/// </summary>
/// <returns></returns>
/// <remarks>This method may fail if the transform is not one to one. However, all cartographic projections should succeed.</remarks>
public override IMathTransform Inverse()
{
if (this._inverse == null)
{
this._inverse = new DatumTransform(this._ToWgs94, !this._isInverse);
}
return this._inverse;
}
示例10: Inverse
/// <summary>
/// Returns the inverse of this conversion.
/// </summary>
/// <returns>IMathTransform that is the reverse of the current conversion.</returns>
public override IMathTransform Inverse()
{
if (_inverse == null)
{
_inverse = new ConcatenatedTransform(_CoordinateTransformationList);
_inverse.Invert();
}
return _inverse;
}
示例11: TestDirectTransform
protected void TestDirectTransform(IMathTransform t, double original, double transformated, double sigma)
{
double[] transformado = t.Transform(new double[] { original });
Assert.AreNotEqual(transformado[0], double.NaN);
Assert.AreNotEqual(transformado[0], double.PositiveInfinity);
Assert.AreNotEqual(transformado[0], double.NegativeInfinity);
Assert.AreEqual(transformated, transformado[0], sigma);
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:9,代码来源:VerticalCoordinateSystemTestBase.cs
示例12: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
#if _FORMULAS_JHS
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 778711.230, 16661953.040, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(20, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 1023538.687, 12219308.238, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(20, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 1023538.687, 7780691.762, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(40, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 926893.302, 5560253.083, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(80, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 596813.055, 1114251.292, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(136, 00, 00.000, CardinalPoint.E), 221288.770, 3338046.960, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(138, 00, 00.000, CardinalPoint.E), 332705.179, 3344794.516, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(140, 00, 00.000, CardinalPoint.E), 444223.733, 3348167.265, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(142, 00, 00.000, CardinalPoint.E), 555776.267, 3348167.265, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(144, 00, 00.000, CardinalPoint.E), 667294.821, 3344794.516, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 778711.230, 3338046.960, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(148, 00, 00.000, CardinalPoint.E), 889956.701, 3327920.506, 1E-2);
TestInverseTransform(i, Sexa2DecimalDegrees(80, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 596813.055, 18885748.708, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(40, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 926893.302, 14439746.917, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(0, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 1057087.120, 10000000.000, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 778711.230, 3338046.960, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(137, 00, 00.000, CardinalPoint.E), 276979.926, 3341842.798, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(139, 00, 00.000, CardinalPoint.E), 388455.958, 3346902.565, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(141, 00, 00.000, CardinalPoint.E), 500000.000, 3348588.810, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(143, 00, 00.000, CardinalPoint.E), 611544.042, 3346902.565, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(145, 00, 00.000, CardinalPoint.E), 723020.074, 3341842.798, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(147, 00, 00.000, CardinalPoint.E), 834359.668, 3333406.428, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(149, 00, 00.000, CardinalPoint.E), 945493.565, 3321588.377, 1E-6);
#else
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 778711.230, 16661953.041, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(20, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 1023538.687, 12219308.238, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(20, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 1023538.687, 7780691.762, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(40, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 926893.304, 5560253.083, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(80, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 596813.055, 1114251.292, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(136, 00, 00.000, CardinalPoint.E), 221288.770, 3338046.959, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(138, 00, 00.000, CardinalPoint.E), 332705.179, 3344794.516, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(140, 00, 00.000, CardinalPoint.E), 444223.733, 3348167.264, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(142, 00, 00.000, CardinalPoint.E), 555776.267, 3348167.264, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(144, 00, 00.000, CardinalPoint.E), 667294.821, 3344794.516, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 778711.230, 3338046.959, 1E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(148, 00, 00.000, CardinalPoint.E), 889956.700, 3327920.505, 1E-2);
TestInverseTransform(i, Sexa2DecimalDegrees(80, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.001, CardinalPoint.E), 596813.055, 18885748.708, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(40, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 926893.302, 14439746.917, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(0, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E), 1057087.120, 10000000.000, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(146, 00, 00.001, CardinalPoint.E), 778711.230, 3338046.960, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(137, 00, 00.000, CardinalPoint.E), 276979.926, 3341842.798, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(139, 00, 00.000, CardinalPoint.E), 388455.958, 3346902.565, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(141, 00, 00.000, CardinalPoint.E), 500000.000, 3348588.810, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(143, 00, 00.000, CardinalPoint.E), 611544.042, 3346902.565, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(145, 00, 00.000, CardinalPoint.E), 723020.074, 3341842.798, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(147, 00, 00.003, CardinalPoint.E), 834359.668, 3333406.428, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(59, 59, 59.999, CardinalPoint.S), Sexa2DecimalDegrees(149, 00, 00.023, CardinalPoint.E), 945493.565, 3321588.377, 1E-6);
#endif
ExecuteIterations(d, i, Sexa2DecimalDegrees(60, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(146, 00, 00.000, CardinalPoint.E));
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:55,代码来源:Test5101Part3.cs
示例13: ExecuteTests
protected override void ExecuteTests(IMathTransform d)
{
TestDirectTransform(d, 72, -72, 1E-6);
TestDirectTransform(d, 66.67, -66.67, 1E-6);
TestDirectTransform(d, 17, -17, 1E-6);
TestDirectTransform(d, 0, 0, 1E-6);
TestDirectTransform(d, -28, 28, 1E-6);
TestDirectTransform(d, -36, 36, 1E-6);
TestDirectTransform(d, -44.3, 44.3, 1E-6);
TestDirectTransform(d, -210, 210, 1E-6);
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:11,代码来源:Test5210Part9.cs
示例14: TransformPoint
/// <summary>
/// Transforms a <see cref="SharpMap.Geometries.Point"/>.
/// </summary>
/// <param name="p">Point to transform</param>
/// <param name="transform">MathTransform</param>
/// <returns>Transformed Point</returns>
public static Point TransformPoint(Point p, IMathTransform transform)
{
try
{
return new Point(transform.Transform(p.ToDoubleArray()));
}
catch
{
return null;
}
}
示例15: ExecuteTests
protected override void ExecuteTests(IMathTransform d, IMathTransform i)
{
TestDirectTransform(d, Sexa2DecimalDegrees(0, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(51, 00, 00.000, CardinalPoint.E), 0.00, 0.00, 3E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(20, 30, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(54, 00, 00.000, CardinalPoint.E), 1724781.50, 248556.44, 3E-2);
TestDirectTransform(d, Sexa2DecimalDegrees(41, 00, 00.000, CardinalPoint.S), Sexa2DecimalDegrees(67, 00, 00.000, CardinalPoint.E), -3709687.25, 1325634.35, 3E-2);
TestInverseTransform(i, Sexa2DecimalDegrees(42, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(51, 00, 00.000, CardinalPoint.E), 3819897.85, 0.00, 1E-6);
TestInverseTransform(i, Sexa2DecimalDegrees(0, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(57, 00, 00.000, CardinalPoint.E), 0.00, 497112.88, 1E-6);
ExecuteIterations(d, i, Sexa2DecimalDegrees(0, 00, 00.000, CardinalPoint.N), Sexa2DecimalDegrees(51, 00, 00.000, CardinalPoint.E));
}
开发者ID:digi21,项目名称:PruebasUnitariasImplementacionOpenGisCoordinateTransformations,代码行数:11,代码来源:Test5112Part1.cs