libspatialindex API Reference  (git-trunk)
include/spatialindex/TPRTree.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) 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 
31 namespace SpatialIndex
32 {
33  namespace TPRTree
34  {
36  {
37  TPRV_RSTAR = 0x2
38  };
39 
41  {
44  };
45 
47  {
50  };
51 
52  class SIDX_DLL Data : public IData, public Tools::ISerializable
53  {
54  public:
55  Data(uint32_t len, uint8_t* pData, MovingRegion& r, id_type id);
56  ~Data() override;
57 
58  Data* clone() override;
59  id_type getIdentifier() const override;
60  void getShape(IShape** out) const override;
61  void getData(uint32_t& len, uint8_t** data) const override;
62  uint32_t getByteArraySize() override;
63  void loadFromByteArray(const uint8_t* data) override;
64  void storeToByteArray(uint8_t** data, uint32_t& len) override;
65 
68  uint8_t* m_pData;
69  uint32_t m_dataLength;
70  }; // Data
71 
74  IStorageManager& sm,
75  double fillFactor,
76  uint32_t indexCapacity,
77  uint32_t leafCapacity,
78  uint32_t dimension,
79  TPRTreeVariant rv,
80  double horizon,
81  id_type& indexIdentifier
82  );
84  }
85 }
SIDX_DLL ISpatialIndex * createNewTPRTree(IStorageManager &sm, double fillFactor, uint32_t indexCapacity, uint32_t leafCapacity, uint32_t dimension, TPRTreeVariant rv, double horizon, id_type &indexIdentifier)
Definition: TPRTree.cc:146
#define SIDX_DLL
Definition: sidx_export.h:41
int64_t id_type
Definition: SpatialIndex.h:41
SIDX_DLL ISpatialIndex * loadTPRTree(IStorageManager &in, id_type indexIdentifier)
Definition: TPRTree.cc:192
SIDX_DLL ISpatialIndex * returnTPRTree(IStorageManager &ind, Tools::PropertySet &in)
Definition: TPRTree.cc:140