1 /***************************************************************************
2   qgsgenericspatialindex.h
3   ------------------------
4   Date                 : December 2019
5   Copyright            : (C) 2019 by Nyall Dawson
6   Email                : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  *                                                                         *
9  *   This program is free software; you can redistribute it and/or modify  *
10  *   it under the terms of the GNU General Public License as published by  *
11  *   the Free Software Foundation; either version 2 of the License, or     *
12  *   (at your option) any later version.                                   *
13  *                                                                         *
14  ***************************************************************************/
15 
16 #ifndef QGSSPATIALINDEXUTILS_H
17 #define QGSSPATIALINDEXUTILS_H
18 
19 #include "qgis_core.h"
20 #define SIP_NO_FILE
21 
22 class QgsRectangle;
23 
24 ///@cond PRIVATE
25 // forward declaration
26 namespace SpatialIndex
27 {
28   class IStorageManager;
29   class ISpatialIndex;
30   class Region;
31   class Point;
32 
33   namespace StorageManager
34   {
35     class IBuffer;
36   }
37 }
38 ///@endcond
39 
40 /**
41  * \ingroup core
42  * \class QgsSpatialIndexUtils
43  *
44  * \brief Contains utility functions for working with spatial indexes.
45  *
46  * \note Not available in Python bindings.
47  * \since QGIS 3.12
48  */
49 class CORE_EXPORT QgsSpatialIndexUtils
50 {
51   public:
52 
53     /**
54      * Converts a QGIS \a rectangle to a SpatialIndex region.
55      */
56     static SpatialIndex::Region rectangleToRegion( const QgsRectangle &rectangle );
57 
58 };
59 
60 #endif // QGSSPATIALINDEXUTILS_H
61