15 #ifndef GEOS_INDEX_STRTREE_ABSTRACTSTRTREE_H 16 #define GEOS_INDEX_STRTREE_ABSTRACTSTRTREE_H 77 assert(t == item_is_geometry);
83 assert(t == item_is_list);
94 class ItemsList :
public std::vector<ItemsListItem> {
156 BoundableList* boundablesOfALevel,
159 std::unique_ptr<BoundableList> sortBoundablesY(
const BoundableList* input);
161 bool remove(
const void* searchBounds,
AbstractNode& node,
void* item);
186 virtual bool intersects(
const void* aBounds,
187 const void* bBounds) = 0;
204 virtual std::unique_ptr<BoundableList> createParentBoundables(
205 BoundableList* childBoundables,
int newLevel);
210 assert(!nodeList->empty());
223 virtual void insert(
const void* bounds,
void* item);
226 void query(
const void* searchBounds, std::vector<void*>& foundItems);
229 void query(
const void* searchBounds,
ItemVisitor& visitor);
234 bool remove(
const void* itemEnv,
void* item);
236 std::unique_ptr<BoundableList> boundablesAtLevel(
int level);
259 itemBoundables(new BoundableList()),
261 nodeCapacity(newNodeCapacity)
263 assert(newNodeCapacity > 1);
276 virtual void build();
287 virtual void query(
const void* searchBounds,
const AbstractNode* node, std::vector<void*>* matches);
301 virtual void boundablesAtLevel(
int level,
AbstractNode* top,
302 BoundableList* boundables);
326 #endif // GEOS_INDEX_STRTREE_ABSTRACTSTRTREE_H virtual std::size_t getNodeCapacity()
Returns the maximum number of child nodes that a node may have.
virtual AbstractNode * lastNode(BoundableList *nodeList)
Base class for STRtree and SIRtree.
static void delete_item(ItemsListItem &item)
void push_back(void *item)
AbstractSTRtree(std::size_t newNodeCapacity)
Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have...
void * get_geometry() const
ItemsListItem(void *item_)
std::vector< ItemsListItem > base_type
A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have diff...
A visitor for items in an index.
union geos::index::strtree::ItemsListItem::@8 item
Basic namespace for all GEOS functionalities.
ItemsListItem(ItemsList *item_)
std::vector< AbstractNode * > * nodes
ItemsList * get_itemslist() const
BoundableList * itemBoundables
std::vector< Boundable * > BoundableList
A list of boundables. TODO: use a list.
virtual AbstractNode * getRoot()
void push_back_owned(ItemsList *itemList)