1
// Spatial Index Library
3
// Copyright (C) 2003 Navel Ltd.
5
// This library is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation; either
8
// version 2.1 of the License, or (at your option) any later version.
10
// This library is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// Lesser General Public License for more details.
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with this library; if not, write to the Free Software
17
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
#ifndef __spatialindex_rtree_h
23
#define __spatialindex_rtree_h
25
namespace SpatialIndex
41
enum PersistenObjectIdentifier
43
PersistentIndex = 0x1,
49
ContainmentQuery = 0x1,
50
IntersectionQuery = 0x2
53
class Data : public IData, public Tools::ISerializable
56
Data( unsigned long len, byte* pData, Tools::Geometry::Region& r, long id );
59
virtual Data* clone();
60
virtual long getIdentifier() const;
61
virtual void getShape( IShape** out ) const;
62
virtual void getData( unsigned long& len, byte** data ) const;
63
virtual unsigned long getByteArraySize();
64
virtual void loadFromByteArray( const byte* data );
65
virtual void storeToByteArray( byte** data, unsigned long& len );
68
Tools::Geometry::Region m_region;
70
unsigned long m_dataLength;
74
// MSVC didn't like the difference in parameter names between declaration
76
extern ISpatialIndex* returnRTree( IStorageManager& sm, Tools::PropertySet& ps );
78
extern ISpatialIndex* returnRTree( IStorageManager& in0, Tools::PropertySet& in1 );
80
extern ISpatialIndex* createNewRTree(
83
unsigned long indexCapacity,
84
unsigned long leafCapacity,
85
unsigned long dimension,
89
extern ISpatialIndex* createAndBulkLoadNewRTree(
94
unsigned long indexCapacity,
95
unsigned long leafCapacity,
96
unsigned long dimension,
100
extern ISpatialIndex* loadRTree( IStorageManager& in, long indexIdentifier );
104
#endif /* __spatialindex_rtree_h */