Take a Set instead of an Iterable since duplicate coordinates will cause errors.