# ShapeImport

What a file held: a refusal of the whole file, or the shapes that can be
drawn with a count of those skipped for each reason and of the polygons
whose holes were left out. A `wkt-unreadable` refusal, given when not one
geometry in WKT text could be used (text in an SRID other than 4326
included), also carries the `detail` the WKT reader gave for the first
fault: what was wrong, and where, as a message to format.

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

## Signature

```ts
import type { ShapeImport } from "@mapcairn/core";
 
type ShapeImport = {
    readonly ok: false;
    readonly refusal: ShapeImportRefusal;
    readonly detail?: Message;
} | {
    readonly ok: true;
    readonly shapes: readonly DrawShapeInput[];
    readonly skipped: Readonly<Partial<Record<ShapeImportSkip, number>>>;
    readonly holesDropped: number;
};
```

## See also

- [`ShapeImportRefusal`](https://docs.mapcairn.com/api/core/ShapeImportRefusal.md)
- [`Message`](https://docs.mapcairn.com/api/core/Message-typealias.md)
- [`DrawShapeInput`](https://docs.mapcairn.com/api/core/DrawShapeInput.md)
- [`ShapeImportSkip`](https://docs.mapcairn.com/api/core/ShapeImportSkip.md)

Source: [packages/core/src/draw/import.ts:90](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/draw/import.ts#L90)
