1 #ifndef RSPATIALINDEXNAVEL_H
2 #define RSPATIALINDEXNAVEL_H
9 #include "spatialindex/include/SpatialIndex.h"
17 id(id),
found(false) {
22 double x1,
double y1,
double z1,
23 double x2,
double y2,
double z2) {
28 double p1[] = { x1, y1, z1 };
29 double p2[] = { x2, y2, z2 };
31 region = SpatialIndex::Region(p1, p2, 3);
37 double ,
double ,
double ,
38 double ,
double ,
double ) {}
66 RSiRegion(
double x1,
double y1,
double z1,
double x2,
double y2,
78 RSiPoint(
double x,
double y,
double z);
88 class Visitor:
public SpatialIndex::IVisitor {
97 SpatialIndex::IShape* shape;
100 fprintf(stderr,
"error: node has no shape\n");
103 SpatialIndex::Region* region =
104 dynamic_cast<SpatialIndex::Region*
> (shape);
105 if (region == NULL) {
107 "error: node shape in spacial index is not a SpatialIndex::Region\n");
111 region->m_pLow[1], region->m_pLow[2],
112 region->m_pHigh[0], region->m_pHigh[1],
118 qint64 siid = d.getIdentifier();
137 SpatialIndex::IShape* shape;
140 fprintf(stderr,
"error: data node has no shape\n");
143 SpatialIndex::Region* region =
144 dynamic_cast<SpatialIndex::Region*
> (shape);
145 if (region == NULL) {
147 "error: shape in spacial index is not a SpatialIndex::Region\n");
155 region->m_pLow[1], region->m_pLow[2],
156 region->m_pHigh[0], region->m_pHigh[1],
167 void visitData(std::vector<const SpatialIndex::IData*>& v) {
168 std::vector<const SpatialIndex::IData*>::iterator it;
169 for (it = v.begin(); it != v.end(); it++) {
170 printf(
"Visitor::visitData[]: %Ld\n", (*it)->getIdentifier());
175 QMap<int, QSet<int> >&
ids;
186 virtual void clear();
189 double x1,
double y1,
double z1,
190 double x2,
double y2,
double z2);
201 double x1,
double y1,
double z1,
202 double x2,
double y2,
double z2);
205 double x1,
double y1,
double z1,
206 double x2,
double y2,
double z2,
209 double x1,
double y1,
double z1,
210 double x2,
double y2,
double z2,
215 double x,
double y,
double z,
225 const uint8_t* data = NULL);
250 SpatialIndex::ISpatialIndex*
tree;
251 SpatialIndex::IStorageManager*
buff;