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#include <cstdint>
22
23// Forward declarations
24namespace geos {
25namespace geom {
26class Coordinate;
27class Geometry;
28class Envelope;
29}
30}
31
32namespace geos {
33namespace shape { // geos.shape
34namespace fractal { // geos.shape.fractal
35
36
37class GEOS_DLL HilbertEncoder {
38
39public:
40
41 HilbertEncoder(uint32_t p_level, geom::Envelope& extent);
42 uint32_t encode(const geom::Envelope* env);
43 static void sort(std::vector<geom::Geometry*>& geoms);
44
45private:
46
47 uint32_t level;
48 double minx;
49 double miny;
50 double strideX;
51 double strideY;
52
53};
54
55
56} // namespace geos.shape.fractal
57} // namespace geos.shape
58} // namespace geos
59
60
61
Basic namespace for all GEOS functionalities.
Definition: geos.h:39