# validateShape

Whether a shape could be finished as it stands, and if not, why.

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

## Signature

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

## Parameters

- `shape` (`DrawShape`)

## Returns

`DrawIssue | null`: `null` when the shape is valid. A line needs two different
 positions, a polygon three that are not on one line and whose edges do
 not cross or touch, and a circle a radius above zero and within
 [`MAX_CIRCLE_RADIUS_METRES`](https://docs.mapcairn.com/api/core/MAX_CIRCLE_RADIUS_METRES.md). Lines may cross themselves.

## See also

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

Source: [packages/core/src/draw/shape.ts:108](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/draw/shape.ts#L108)
