public IJob CreateJob(SMapWorkRequest sMapWorkRequest) { IJob result; if (sMapWorkRequest.RequiresQuadPrecision()) { result = new JobForMq(sMapWorkRequest); } else { result = new Job(sMapWorkRequest); } return(result); }
public void TestRequiresQuadPrecision() { string connectionId = "dummy"; int maxIterations = 100; CanvasSize canvasSize = new CanvasSize(1000, 1000); //DPoint leftBot = new DPoint(-0.7764118407199196, 0.13437492059936854); //DPoint rightTop = new DPoint(-0.7764117329761986, 0.13437499747905846); SPoint leftBot = new SPoint("-0.7764118407199196", "0.13437492059936854"); SPoint rightTop = new SPoint("-0.7764118407199300", "0.13437499747905846"); SCoords coords = new SCoords(leftBot, rightTop); MapSection area = new MapSection(new Point(0, 0), canvasSize.GetWholeUnits(Engine.BLOCK_SIZE)); SMapWorkRequest mapWorkRequest = new SMapWorkRequest("FET2", coords, canvasSize, area, maxIterations, connectionId); bool requiresQuadPrecision = mapWorkRequest.RequiresQuadPrecision(); }
public bool RequiresQuadPrecision() => SMapWorkRequest.RequiresQuadPrecision();