/* Copyright (C) 2013 * swift project Community / Contributors * * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, * including this file, may be copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE file. */ #ifndef BLACKMISC_GEO_GEODESICGRID_H #define BLACKMISC_GEO_GEODESICGRID_H //! \file #include "blackmisc/math/mathutils.h" #include "coordinategeodetic.h" #include "blackmisc/range.h" #include "blackmisc/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