Better error handling in getPolygon. Star thinking about 'offending point' concept.