raise RuntimeError if invalid geometry