def assert_indexed(func): 
    """
    Decorator to ensure surface has been indexed prior to calling function. 
    """
    def asserted(self, *args, **kwargs):
        if self.indexed is None: 
            raise RuntimeError("Surface must be indexed before calling ",
                                func.__name__)
        return func(self, *args, **kwargs)
    return asserted