from pathlib import Path


def find_root_dir() -> Path:
    """Find root geoparquet directory

    This is a more robust approach than assuming __file__ refers to a specific place
    """
    folder = Path(__file__).resolve()

    while folder.name != "geoparquet":
        if folder == Path("/"):
            raise ValueError("Could not find geoparquet folder")

        folder = folder.parent

    return folder