# @zhujianshi/radar-echo-utils

> Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth i

Latest version **0.0.3** (published 2023-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zhujianshi/radar-echo-utils
pnpm add @zhujianshi/radar-echo-utils
yarn add @zhujianshi/radar-echo-utils
bun add @zhujianshi/radar-echo-utils
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-03-31 |
| First published | 2022-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 45 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | “ncqwer” |
| Maintainers | zhujianshi |

## Links

- npm: https://www.npmjs.com/package/@zhujianshi/radar-echo-utils
- Repository: https://github.com/ncqwer/zjs
- Homepage: https://github.com/ncqwer/zjs#readme
- Issues: https://github.com/ncqwer/zjs/issues
- npm.io page: https://npm.io/package/@zhujianshi/radar-echo-utils

## Recent versions

- 0.0.3 (latest) — 2023-03-31
- 0.0.2 — 2022-03-23

## README

# `@zhujianshi/radar-echo-utils`

> 通过解析micaps的雷达拼图数据文件，来生成对应的png图像。

## Usage

```ts
import { parseBuffer, nomalizeBlocks, createMosaic } from '@zhujianshi/radar-echo-utils';

const { infos, min_value, max_value, rows, cols } = normalizeBlocks(
	...buffers.map(parseBuffer)
);
const scale = scaleLinear()
	.domain([min_value, max_value])
	.range(["blue", "red"]);
const buffer = createMosaic({
	ignore: (v) => false,
	iterpolation: (v) => {
		const color = Color(scale(v));
		return color.rgb().array();
	},
	rows,
	cols,
	backgroundColor: [0, 0, 0, 255],
})(...infos.map((info) => info.forEach));

const pngUrl = buffer2png(buffer,rows,cols);

```

---
_Source: https://npm.io/package/@zhujianshi/radar-echo-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
