public void Single_Transform_Proj_XY(TestAttribute ta, object setup, ref double x, ref double y) { ICoordinateTransformation t = GetTransformation(false); for (int i = 0; i < ta.PerPoint; ++i) { t.Transform(p.X, p.Y, out x, out y); } }
public void Bulk_Transform_Point(System.Windows.Point[][] xy, bool bProj, TestAttribute ta, object setup, ref double x, ref double y) { int j = random.Next(xy[0].Length); ICoordinateTransformation t = GetTransformation(!bProj); for (int i = 0; i < ta.PerPoint / xy[0].Length; ++i) { xy[1] = t.Transform(xy[0]); x = xy[1][j].X; y = xy[1][j].Y; } }
public void Bulk_Transform_XY(double[][] xy, bool bProj, TestAttribute ta, object setup, ref double x, ref double y) { int j = random.Next(xy[0].Length); ICoordinateTransformation t = GetTransformation(!bProj); for (int i = 0; i < ta.PerPoint / xy[0].Length; ++i) { t.Transform(xy[0], xy[1], xy[2], xy[3]); x = xy[2][j]; y = xy[3][j]; } }
public void Single_Transform_Proj_Point(TestAttribute ta, object setup, ref double x, ref double y) { ICoordinateTransformation t = GetTransformation(false); System.Windows.Point pOut = new System.Windows.Point(); for (int i = 0; i < ta.PerPoint; ++i) { pOut = t.Transform(p); } x = pOut.X; y = pOut.Y; }
public bool Single_Direct(TestAttribute ta, object setup, ref double x, ref double y) { ICoordinateTransformation t = GetTransformation(true); for (int i = 0; i < ta.PerPoint; ++i) { x = p.X; y = p.Y; double?z; t.Transform(x, y, null, out x, out y, out z); } return(true); }
public void Bulk_100000_Direct_XY(TestAttribute ta, object setup, ref double x, ref double y) { double[][] xy = bulk_XY_100000; int j = random.Next(xy[0].Length); ICoordinateTransformation t = GetTransformation(true); for (int i = 0; i < ta.PerPoint / xy[0].Length; ++i) { t.Transform(xy[0], xy[1], null, xy[2], xy[3], null); x = xy[2][j]; y = xy[3][j]; } }
private void Run(System.Reflection.MethodInfo mi, TestAttribute ta) { proj4Transformation.Transform(new Location()); try { double x = 0, y = 0; object[] args = new object[] { ta, null, x, y }; HiResTimer timer = new HiResTimer(); bool bSucceeded = ta.Enabled; if (bSucceeded) { try { mi.Invoke(this, args); } catch { bSucceeded = false; } } double d = timer.Elapsed; if (ta.Enabled) { Console.WriteLine("{0}: {1} after {2:0}ms ({3:0}ns per point), x={4:0}, y={5:0}", ta.TestName, bSucceeded ? "succeeded" : "FAILED", d, 1000000.0 * d / ta.PerPoint, args[2], args[3]); } } catch (Exception ex) { Console.WriteLine("Test \"" + mi.Name + "\" failed with " + ex.GetType().FullName + ": " + ex.Message); Console.WriteLine(ex.StackTrace.ToString()); } }
public void Bulk_100000_Transform_Proj_Enum(TestAttribute ta, object setup, ref double x, ref double y) { Bulk_Transform_Enum(bulk_100000, true, true, ta, setup, ref x, ref y); }
public void Bulk_100000_Transform_Direct_Enum(TestAttribute ta, object setup, ref double x, ref double y) { Bulk_Transform_Enum(bulk_100000, false, false, ta, setup, ref x, ref y); }
public void Bulk_Transform_Enum(System.Windows.Point[][] xy, bool test, bool bProj, TestAttribute ta, object setup, ref double x, ref double y) { Console.WriteLine("--- WARNING --- Bulk_Transform_Enum has been rewritten, name is misleading ---"); int j = random.Next(xy[0].Length); List <Test> _test = new List <Test>(); for (int i = 0; i < xy[0].Length; i++) { _test.Add(new Test { p = xy[0][i] }); } ICoordinateTransformation t = GetTransformation(!bProj); t.Transform <Test>(_test, u => u.p, (u, v) => u.p = v); for (int i = 0; i < ta.PerPoint / xy[0].Length; ++i) { t.Transform(xy[0], xy[1]); x = xy[1][j].X; y = xy[1][j].Y; } }