Implemented spatial ranking (#141)