turf.circle
What is turf.circle?
turf.circle returns a regular Polygon Feature approximating a circle around a centre Point at a given radius. Because GeoJSON has no true circle primitive, the result is a many-sided polygon — configurable via steps.
turf.circle(center, radius, options?) → Feature<Polygon>Options include:
steps— number of vertices around the circle (default64)units—'kilometers'(default),'meters','miles','nauticalmiles','radians','degrees'properties— output feature properties
When would you use turf.circle?
Use turf.circle for any "radius around a point" visualisation — a geofence, delivery range, Wi-Fi coverage, or event exclusion zone. It is faster than turf.buffer for a single point input and produces cleaner regular geometry.
In Node.js, turf.circle is handy for generating a test corpus of polygons, producing static geofence layers, or building catchment polygons around warehouse locations. On MapLibre, output can be fed straight into a fill layer.
undefinedFAQs
Is the output a true circle?
It is a regular polygon with steps vertices. 64 steps is typically indistinguishable from a circle at screen resolution; increase to 128–256 for ultra-smooth rendering at deep zoom levels.
How does it differ from turf.buffer?
For a single point, turf.circle is the specialised (and faster) option. turf.buffer is more general — it handles lines, polygons, or multi-features. Use circle when you know your input is a single centre point.
How do I install just circle?
npm install @turf/circle. It depends on @turf/destination and @turf/helpers.
Why do my circles look elliptical on the map?
Web Mercator stretches away from the equator. A geodetically-correct circle at high latitude renders as an ellipse in Mercator. That is expected and a projection artefact — the underlying polygon is accurate on the ground.