libspatialindex API Reference  (git-trunk)
include/spatialindex/RTree.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Project: libspatialindex - A C++ library for spatial indexing
3  * Author: Marios Hadjieleftheriou, mhadji@gmail.com
4  ******************************************************************************
5  * Copyright (c) 2004, Marios Hadjieleftheriou
6  *
7  * All rights reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  * DEALINGS IN THE SOFTWARE.
26 ******************************************************************************/
27 
28 #pragma once
29 
30 namespace SpatialIndex
31 {
32  namespace RTree
33  {
35  {
36  RV_LINEAR = 0x0,
38  RV_RSTAR
39  };
40 
42  {
43  BLM_STR = 0x0
44  };
45 
47  {
49  PersistentLeaf = 0x2
50  };
51 
53  {
55  IntersectionQuery = 0x2
56  };
57 
58  class SIDX_DLL Data : public IData, public Tools::ISerializable
59  {
60  public:
61  Data(uint32_t len, uint8_t* pData, Region& r, id_type id);
62  ~Data() override;
63 
64  Data* clone() override;
65  id_type getIdentifier() const override;
66  void getShape(IShape** out) const override;
67  void getData(uint32_t& len, uint8_t** data) const override;
68  uint32_t getByteArraySize() override;
69  void loadFromByteArray(const uint8_t* data) override;
70  void storeToByteArray(uint8_t** data, uint32_t& len) override;
71 
74  uint8_t* m_pData;
75  uint32_t m_dataLength;
76  }; // Data
77 
80  IStorageManager& sm,
81  double fillFactor,
82  uint32_t indexCapacity,
83  uint32_t leafCapacity,
84  uint32_t dimension,
85  RTreeVariant rv,
86  id_type& indexIdentifier
87  );
90  IDataStream& stream,
91  IStorageManager& sm,
92  double fillFactor,
93  uint32_t indexCapacity,
94  uint32_t leafCapacity,
95  uint32_t dimension,
96  RTreeVariant rv,
97  id_type& indexIdentifier
98  );
100  BulkLoadMethod m,
101  IDataStream& stream,
102  IStorageManager& sm,
103  Tools::PropertySet& ps,
104  id_type& indexIdentifier
105  );
106  SIDX_DLL ISpatialIndex* loadRTree(IStorageManager& in, id_type indexIdentifier);
107  }
108 }
SIDX_DLL ISpatialIndex * loadRTree(IStorageManager &in, id_type indexIdentifier)
Definition: RTree.cc:346
SIDX_DLL ISpatialIndex * createAndBulkLoadNewRTree(BulkLoadMethod m, IDataStream &stream, IStorageManager &sm, double fillFactor, uint32_t indexCapacity, uint32_t leafCapacity, uint32_t dimension, RTreeVariant rv, id_type &indexIdentifier)
Definition: RTree.cc:190
SIDX_DLL ISpatialIndex * returnRTree(IStorageManager &ind, Tools::PropertySet &in)
Definition: RTree.cc:143
SIDX_DLL ISpatialIndex * createNewRTree(IStorageManager &sm, double fillFactor, uint32_t indexCapacity, uint32_t leafCapacity, uint32_t dimension, RTreeVariant rv, id_type &indexIdentifier)
Definition: RTree.cc:149
int64_t id_type
Definition: SpatialIndex.h:41
#define SIDX_DLL
Definition: sidx_export.h:41