Use GeoJSON instead of GeoDjango's GEOS bindings
Same as #460 (closed), but instead of trying to use Shapely, let's just use the technique we already use for the corpus export and the worker cache: ST_AsGeoJSON(element.polygon)::json->'coordinates'
returns a list of coordinates just like what the API can return. It is also possible to send GeoJSON: ST_GeomFromGeoJSON('{"type": "LineString", "coordinates": […]}')
. This is cursed, but I wonder if this could actually be faster than GeoDjango's bindings. This could be combined with Shapely, for example to reorder polygons properly. This would avoid most of the issues I had when trying to use Shapely in #460 (closed).
Edited by Erwan Rouchet