1
/******************************************************************************
2
* Project: libspatialindex - A C++ library for spatial indexing
3
* Author: Marios Hadjieleftheriou, mhadji@gmail.com
4
******************************************************************************
5
* Copyright (c) 2004, Marios Hadjieleftheriou
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:
16
* The above copyright notice and this permission notice shall be included
17
* in all copies or substantial portions of the Software.
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
******************************************************************************/
30
namespace SpatialIndex
34
SIDX_DLL enum RTreeVariant
41
SIDX_DLL enum BulkLoadMethod
46
SIDX_DLL enum PersistenObjectIdentifier
48
PersistentIndex = 0x1,
52
SIDX_DLL enum RangeQueryType
54
ContainmentQuery = 0x1,
55
IntersectionQuery = 0x2
58
class SIDX_DLL Data : public IData, public Tools::ISerializable
61
Data(uint32_t len, byte* pData, Region& r, id_type id);
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);
75
uint32_t m_dataLength;
78
SIDX_DLL ISpatialIndex* returnRTree(IStorageManager& ind, Tools::PropertySet& in);
79
SIDX_DLL ISpatialIndex* createNewRTree(
82
uint32_t indexCapacity,
83
uint32_t leafCapacity,
86
id_type& indexIdentifier
88
SIDX_DLL ISpatialIndex* createAndBulkLoadNewRTree(
93
uint32_t indexCapacity,
94
uint32_t leafCapacity,
97
id_type& indexIdentifier
99
SIDX_DLL ISpatialIndex* createAndBulkLoadNewRTree(
103
Tools::PropertySet& ps,
104
id_type& indexIdentifier
106
SIDX_DLL ISpatialIndex* loadRTree(IStorageManager& in, id_type indexIdentifier);