Closed Algunenano closed 6 years ago
I'm pretty sure the "offending" query is generated in camshaft: https://github.com/CartoDB/camshaft/blob/99d6e5d8b341f8eed1b4c4c576b3e305e3ff19f0/lib/node/nodes/buffer.js#L47-L65
though I don't know how hard is to solve these "corner cases" around 180º long. It is kind of a generic problem with geometry types and postgis.
For this very instance the trick may be splitting the geography polygons around 180º before casting back to geometry. Take a look at this post: https://carto.com/blog/jets-and-datelines/
I'm pretty sure the "offending" query is generated in camshaft: https://github.com/CartoDB/camshaft/blob/99d6e5d8b341f8eed1b4c4c576b3e305e3ff19f0/lib/node/nodes/buffer.js#L47-L65 To be honest, I have the very same file open in my IDE but I opened it here by mistake. I'll create it there.
Migrated to https://github.com/CartoDB/camshaft/issues/339
When using Area of Interest analysis with points close to the map margins (~180º longitude) invalid polygons are generated, covering the whole world:
Carto file with an example: carto.zip
The query to generate the analysis was:
An example from that dataset with the issue: Point in the dataset:
Point after buffer (invalid render both in builder and in Qgis):