GEOS 3.11.1
HilbertEncoder.h
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
23namespace geos {
24namespace geom {
25class Coordinate;
26class Geometry;
27class Envelope;
28}
29}
30
31namespace geos {
32namespace shape { // geos.shape
33namespace fractal { // geos.shape.fractal
34
35
36class GEOS_DLL HilbertEncoder {
37
38public:
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
44private:
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
Basic namespace for all GEOS functionalities.
Definition: geos.h:39