public void Test_SubGrid_GetWorldOrigin() { ISubGrid leafSubgrid = null; SubGridTree tree = new SubGridTree(SubGridTreeConsts.SubGridTreeLevels, 1.0, new SubGridFactory <NodeSubGrid, LeafSubGrid>()); leafSubgrid = new SubGrid(tree, null, SubGridTreeConsts.SubGridTreeLevels); double WorldOriginX, WorldOriginY; leafSubgrid.CalculateWorldOrigin(out WorldOriginX, out WorldOriginY); // World origin of leaf subgrid is the extreme origin of the overmapped world coordinate system (cell coordinate system * cell size) // as the cell origin position is 0, 0 in the cell address space for a newly created subgrid // The leaf So, both X and Y origin values Assert.Equal(WorldOriginX, WorldOriginY); Assert.Equal(WorldOriginX, (-tree.IndexOriginOffset * tree.CellSize)); }