geojson circles, supported or not?

As the accepted answer explains, circles are not supported in the GeoJson spec.

Most map implementations will, however, let you create circles, but in case this doesn't work for you (eg. you need to store it in a database and query it), the solution is to create a polygon that roughly approximates a circle (imagine a polygon with 32+ edges).

I wrote a module that does this. You can use it like this:

const circleToPolygon = require('circle-to-polygon');

const coordinates = [-27.4575887, -58.99029]; //[lon, lat]
const radius = 100;                           // in meters
const numberOfEdges = 32;                     //optional that defaults to 32

let polygon = circleToPolygon(coordinates, radius, numberOfEdges);

To clarify why circles are not supported, it has to do with the curvature of the earth. Because the earth is not a perfect sphere, if you were to draw a circular shape on it, it wouldn't be a perfect circle either. However, the solution above works for most scenarios in which you don't require critical precision.


When I look up the specs of GeoJson I see that circles are supported

They aren't. Seems you managed to find some fake or incorrect specs. Go to geojson.org to find the specs, there's nothing about circles.