How to use the rtree.RTree function in Rtree

To help you get started, we’ve selected a few Rtree examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngageoint / state-of-the-data / state-of-the-data-for-desktop / src / geodataset / index / si.py View on Github external
from rtree import RTreeError
from rtree import RTree
class SpatialIndex(RTree):
    """
    A simple wrapper around rtree's RTree Index
    """

    def __init__(self, *args):
        RTree.__init__(self, *args)

    @property
    def size(self):
        return len(self.count)

    @property
    def is_empty(self):
        if len(self.count) > 1:
            return False
        return self.size < 1