QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
TPRTree.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) 2003, 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
29#pragma once
30
31namespace SpatialIndex
32{
33 namespace TPRTree
34 {
36 {
37 TPRV_RSTAR = 0x2
38 };
39
45
51
52 class SIDX_DLL Data : public IData, public Tools::ISerializable
53 {
54 public:
55 Data(uint32_t len, byte* pData, MovingRegion& r, id_type id);
56 virtual ~Data();
57
58 virtual Data* clone();
59 virtual id_type getIdentifier() const;
60 virtual void getShape(IShape** out) const;
61 virtual void getData(uint32_t& len, byte** data) const;
62 virtual uint32_t getByteArraySize();
63 virtual void loadFromByteArray(const byte* data);
64 virtual void storeToByteArray(byte** data, uint32_t& len);
65
68 byte* m_pData;
69 uint32_t m_dataLength;
70 }; // Data
71
75 double fillFactor,
76 uint32_t indexCapacity,
77 uint32_t leafCapacity,
78 uint32_t dimension,
80 double horizon,
81 id_type& indexIdentifier
82 );
84 }
85}
Definition SpatialIndex.h:127
Definition SpatialIndex.h:68
Definition SpatialIndex.h:192
Definition SpatialIndex.h:156
Definition MovingRegion.h:33
Definition TPRTree.h:53
byte * m_pData
Definition TPRTree.h:68
virtual void getData(uint32_t &len, byte **data) const
id_type m_id
Definition TPRTree.h:66
uint32_t m_dataLength
Definition TPRTree.h:69
Data(uint32_t len, byte *pData, MovingRegion &r, id_type id)
virtual id_type getIdentifier() const
virtual void getShape(IShape **out) const
virtual void storeToByteArray(byte **data, uint32_t &len)
virtual void loadFromByteArray(const byte *data)
MovingRegion m_region
Definition TPRTree.h:67
virtual uint32_t getByteArraySize()
Definition TPRTree.h:39
Definition Tools.h:225
Definition Tools.h:308
SIDX_DLL ISpatialIndex * loadTPRTree(IStorageManager &in, id_type indexIdentifier)
PersistenObjectIdentifier
Definition TPRTree.h:41
@ PersistentLeaf
Definition TPRTree.h:43
@ PersistentIndex
Definition TPRTree.h:42
SIDX_DLL ISpatialIndex * createNewTPRTree(IStorageManager &sm, double fillFactor, uint32_t indexCapacity, uint32_t leafCapacity, uint32_t dimension, TPRTreeVariant rv, double horizon, id_type &indexIdentifier)
TPRTreeVariant
Definition TPRTree.h:36
@ TPRV_RSTAR
Definition TPRTree.h:37
RangeQueryType
Definition TPRTree.h:47
@ IntersectionQuery
Definition TPRTree.h:49
@ ContainmentQuery
Definition TPRTree.h:48
SIDX_DLL ISpatialIndex * returnTPRTree(IStorageManager &ind, Tools::PropertySet &in)
Definition CustomStorage.h:34
int64_t id_type
Definition SpatialIndex.h:43
#define SIDX_DLL
Definition sidx_export.h:41