/* Copyright (C) 2013 VATSIM Community / contributors * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef BLACKMISC_GEODESICGRID_H #define BLACKMISC_GEODESICGRID_H //! \file #include "mathematics.h" #include "coordinategeodetic.h" #include "range.h" #include "iterator.h" #include #include namespace BlackMisc { namespace Geo { // Compute the integer log2(X) of an integer X at compile time //! \private template struct LogBase2 : std::conditional> 1), LogBase2> 1), Count + 1>, std::integral_constant>::type {}; /*! * Associative container for efficiently storing and retreiving elements at points on the Earth's surface. * Works by dividing the surface of the Earth into 2N^2 triangular tiles of 21600/N nautical miles each. * Each element is inserted according to which tile it falls within, and elements can later be retrieved by * pointing to specific tiles. */ template class CGeodesicGrid { public: //! Iterator typedef typename QMultiMap::const_iterator const_iterator; //! Constructor //@{ CGeodesicGrid() {} template