Open matthewbenstead opened 6 years ago
Confusingly, there are actually only two points in this polygon. WKT, the format the PDP and climate explorer polygons are expressed in, requires restating the first point to "close" the polygon; the first and last points are always identical in a WKT polygon.
Possibly the front end needs to check whether a polygon has more than two points and alert the user if so, instead of sending a two-point "polygon" to the backend.
Good catch! I totally missed that.
I was able to reproduce this error by clicking the draw polygon button, clicking on one point, and double-clicking on another to make a two-point polygon. While it should be pretty obvious to the user what's gone wrong when this occurs, it might be worth fixing on the basis of how dramatic it looks - a two point polygon causes the vector map to fail to load:
A popup error box that says "You must select at least three points" and clearing the polygon before passing it off to any code that will try to extract the space it represents should be a pretty straightforward fix.
I observed a handful of HTTP 500's on August 24th. Some of the HTTP requests are:
They occurred around August 24th 2018 05:11.
The requests in the front-end and back-end both gave similar error. Front end:
Same error in the back-end:
The error seemed unusual given there appeared to be 3 points in the polygon.