getcentroids can return output in two formats: list of lists and list of tuples.