# shapeGeometry

The GeoJSON geometry of a shape, or null when it is not valid. A circle is
a polygon of 72 positions; coordinates are `[longitude, latitude]` rounded
to six decimals (about 10 cm), or to the fewest more, up to ten, at which a
small shape that six decimals would fold in on itself is valid again, as a
circle with a radius of a metre or two is. A shape that not even ten
decimals keep valid is written unrounded.

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

## Signature

```ts
import { shapeGeometry } from "@mapcairn/core";
 
function shapeGeometry(shape: DrawShape): Geometry | null;
```

## Parameters

- `shape` (`DrawShape`)

## Returns

`Geometry | null`

## See also

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

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