QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RTree.h
Go to the documentation of this file.
1/******************************************************************************
2 * Project: libspatialindex - A C++ library for spatial indexing
3 * Author: Marios Hadjieleftheriou, [email protected]
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
30namespace SpatialIndex
31{
32 namespace RTree
33 {
40
42 {
43 BLM_STR = 0x0
44 };
45
51
57
58 class SIDX_DLL Data : public IData, public Tools::ISerializable
59 {
60 public:
61 Data(uint32_t len, byte* pData, Region& r, id_type id);
62 virtual ~Data();
63
64 virtual Data* clone();
65 virtual id_type getIdentifier() const;
66 virtual void getShape(IShape** out) const;
67 virtual void getData(uint32_t& len, byte** data) const;
68 virtual uint32_t getByteArraySize();
69 virtual void loadFromByteArray(const byte* data);
70 virtual void storeToByteArray(byte** data, uint32_t& len);
71
74 byte* m_pData;
75 uint32_t m_dataLength;
76 }; // Data
77
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,
92 double fillFactor,
93 uint32_t indexCapacity,
94 uint32_t leafCapacity,
95 uint32_t dimension,
96 RTreeVariant rv,
97 id_type& indexIdentifier
98 );
101 IDataStream& stream,
102 IStorageManager& sm,
104 id_type& indexIdentifier
105 );
107 }
108}
Definition SpatialIndex.h:127
Definition SpatialIndex.h:134
Definition SpatialIndex.h:68
Definition SpatialIndex.h:192
Definition SpatialIndex.h:156
Definition RTree.h:59
virtual Data * clone()
byte * m_pData
Definition RTree.h:74
virtual uint32_t getByteArraySize()
Region m_region
Definition RTree.h:73
virtual void loadFromByteArray(const byte *data)
uint32_t m_dataLength
Definition RTree.h:75
virtual void getShape(IShape **out) const
virtual void getData(uint32_t &len, byte **data) const
Data(uint32_t len, byte *pData, Region &r, id_type id)
virtual void storeToByteArray(byte **data, uint32_t &len)
id_type m_id
Definition RTree.h:72
virtual id_type getIdentifier() const
Definition RTree.h:39
Definition Region.h:33
Definition Tools.h:225
Definition Tools.h:308
SIDX_DLL ISpatialIndex * createNewRTree(IStorageManager &sm, double fillFactor, uint32_t indexCapacity, uint32_t leafCapacity, uint32_t dimension, RTreeVariant rv, id_type &indexIdentifier)
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)
RTreeVariant
Definition RTree.h:35
@ RV_LINEAR
Definition RTree.h:36
@ RV_RSTAR
Definition RTree.h:38
@ RV_QUADRATIC
Definition RTree.h:37
SIDX_DLL ISpatialIndex * returnRTree(IStorageManager &ind, Tools::PropertySet &in)
RangeQueryType
Definition RTree.h:53
@ ContainmentQuery
Definition RTree.h:54
@ IntersectionQuery
Definition RTree.h:55
SIDX_DLL ISpatialIndex * loadRTree(IStorageManager &in, id_type indexIdentifier)
BulkLoadMethod
Definition RTree.h:42
@ BLM_STR
Definition RTree.h:43
PersistenObjectIdentifier
Definition RTree.h:47
@ PersistentLeaf
Definition RTree.h:49
@ PersistentIndex
Definition RTree.h:48
Definition CustomStorage.h:34
int64_t id_type
Definition SpatialIndex.h:43
#define SIDX_DLL
Definition sidx_export.h:41