GEOS  3.9.1dev
HilbertEncoder.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************/
14 
15 
16 #pragma once
17 
18 #include <geos/export.h>
19 #include <string>
20 #include <vector>
21 
22 // Forward declarations
23 namespace geos {
24 namespace geom {
25 class Coordinate;
26 class Geometry;
27 class Envelope;
28 }
29 }
30 
31 namespace geos {
32 namespace shape { // geos.shape
33 namespace fractal { // geos.shape.fractal
34 
35 
37 
38 public:
39 
40  HilbertEncoder(uint32_t p_level, geom::Envelope& extent);
41  uint32_t encode(const geom::Envelope* env);
42  static void sort(std::vector<geom::Geometry*>& geoms);
43 
44 private:
45 
46  uint32_t level;
47  double minx;
48  double miny;
49  double strideX;
50  double strideY;
51 
52 };
53 
54 
55 } // namespace geos.shape.fractal
56 } // namespace geos.shape
57 } // namespace geos
58 
59 
60 
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
#define GEOS_DLL
Definition: export.h:28
Basic namespace for all GEOS functionalities.