0dce0b9a5b
getCentroid should just return the first point if a linear ring only has less than three components (r=@tschaub)