# shapesToGeoJson

The shapes as a GeoJSON `FeatureCollection`, one feature each, with the
shape's id, its name, its type and its area and length where they apply.
A circle also carries `radius_m` and its `centre`, to two and six decimals,
or exactly where its outline needed more than six decimals (a circle a few
centimetres across). Only [`exportableShapes`](https://docs.mapcairn.com/api/core/exportableShapes.md) are included.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { shapesToGeoJson } from "@mapcairn/core";
 
function shapesToGeoJson(shapes: readonly DrawShape[]): FeatureCollection;
```

## Description

The numbers are the shape's own: `JSON.stringify` writes one under 1e-6 in
exponent notation, so write the file with [`shapesToGeoJsonText`](https://docs.mapcairn.com/api/core/shapesToGeoJsonText.md).

## Parameters

- `shapes` (`readonly DrawShape[]`)

## Returns

`FeatureCollection`

## See also

- [`DrawShape`](https://docs.mapcairn.com/api/core/DrawShape.md)

Source: [packages/core/src/draw/export.ts:200](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/draw/export.ts#L200)
