open-index/open-npm huggingface dataset:
npm package: @mapcat/vt-pbf
Description: Serialize mapbox vector tiles to binary protobufs in javascript.
Author: Anand Thakker
Latest version: 2.1.3

# vt-pbf [![CircleCI](https://circleci.com/gh/mapbox/vt-pbf.svg?style=svg)](https://circleci.com/gh/mapbox/vt-pbf)

Serialize [Mapbox vector tiles](https://github.com/mapbox/vector-tile-spec) to binary protobufs in javascript.

## Usage

As far as I know, the two places you might get a JS representation of a vector
tile are [geojson-vt](https://github.com/mapbox/geojson-vt) and
[vector-tile-js](https://github.com/mapbox/vector-tile-js).  These both use
slightly different internal representations, so serializing each looks slightly
different:

## From vector-tile-js

```javascript
var vtpbf = require('@mapcat/vt-pbf')
var VectorTile = require('@mapcat/vector-tile').VectorTile

var data = fs.readFileSync(__dirname + '/fixtures/rectangle-1.0.0.pbf')
var tile = new VectorTile(new Pbf(data))
var orig = tile.layers['geojsonLayer'].feature(0).toGeoJSON(0, 0, 1)

var buff = vtpbf(tile)
fs.writeFileSync('my-tile.pbf', buff)
```

## From geojson-vt

```javascript
var vtpbf = require('@mapcat/vt-pbf')
var geojsonVt = require('geojson-vt')

var orig = JSON.parse(fs.readFileSync(__dirname + '/fixtures/rectangle.geojson'))
var tileindex = geojsonVt(orig)
var tile = tileindex.getTile(1, 0, 0)

// pass in an object mapping layername -> tile object
var buff = vtpbf.fromGeojsonVt({ 'geojsonLayer': tile })
fs.writeFileSync('my-tile.pbf', buff)
```
npm package: @mapcatch/text2polygon
Description: ```js const { loadFont, text2PolygonFeature } = require("@mapcatch/text2polygon") const path = require('path')
Author: songshiwang
Latest version: 0.0.3

### 使用方法

```js
const { loadFont, text2PolygonFeature } = require("@mapcatch/text2polygon")
const path = require('path')

loadFont(path.join(__dirname, './微软雅黑.ttf')).then(font => {
    const res = text2PolygonFeature(font, '欧 洲小镇', [114.3642124, 30.512943])
    console.log(JSON.stringify(res))
})
```
npm package: @mapcatch/ui
Description: 图知云系列产品公共组件
Author: wanyanyan
Latest version: 1.3.14

# CatchUI

图知云系列产品公共组件

## 快速开始

安装

```bash
yarn add @mapcatch/ui
```

使用

```js
import CatchUI from '@mapcatch/ui';

import '@mapcatch/ui/dist/styles/catchui.css'

const app = createApp(App);

app.use(CatchUI);
app.mount("#app");
```

## 开发测试

安装依赖

```bash
yarn
```

启动测试页面（文档页面）

```bash
yarn dev
```

打包

```
yarn build
```

打包文档

```bash
yarn build-doc
```
npm package: @mapcatch/util
Description: Mapcatch系列产品的公共函数、js工具以及相关的配置信息。
Author: wanyanyan
Latest version: 2.2.15

# catchUtil
  Mapcatch系列产品的公共函数、js工具以及相关的配置信息。

## 使用方法

### cdn引入
```html
<script src="//unpkg.com/@mapcatch/util@latest/dist/catchUtil.min.js"></script>

<script>
// 解析jpg中的exif信息
catchUtil.getPhotoTags(file).then(info => {
  console.log(info)
})
// 生成随机Id
catchUtil.generateId()
</script>

```

### 通过npm安装
```
npm install @mapcatch/util
```

```js
import {getPhotoTags, generateId} from '@mapcatch/util'

// 解析jpg中的exif信息
getPhotoTags(file).then(info => {
  console.log(info)
})
// 生成随机Id
generateId()
```
## 文档
更多文档查看[在线文档](./docs/Catolog.md)

## 开发
```bash
yarn

yarn build
```
npm package: @mapcomponents/cra-template
Description: An easy way to create a Mapcomponents Maplibre Map-app!
Latest version: 0.1.13

# Mapcomponents Template

An easy way to create a Mapcomponents Maplibre Map-app!

## Getting started

1. Run ```npx create-react-app {myAppName} --template @mapcomponents/cra-template```
2. ```cd``` into your project
3. Install all dependencies ```yarn``` 
4. Start the development server ```yarn start``` 


## Create a build

Creates an nginx container image that serves an optimized production build 

```docker build .```

Start the image serving on host port 80

```docker run -p 80:80 {image_hash}```

### Happy Coding!
npm package: @mapcomponents/deck-gl
Description: A custom `useDeckGl` hook and components showing the usage of deckGL within [@mapcomponents/react-maplibre](https://www.npmjs.com/package/@mapcomponents/react-maplibre)
Latest version: 1.8.10

# DeckGl Components

A custom `useDeckGl` hook and components showing the usage of deckGL within [@mapcomponents/react-maplibre](https://www.npmjs.com/package/@mapcomponents/react-maplibre)
npm package: @mapcomponents/ra-geospatial
Description: <img src="https://avatars.githubusercontent.com/u/64851912" alt="MapComponents logo" width="80"/>
Latest version: 1.8.10

<img src="https://avatars.githubusercontent.com/u/64851912" alt="MapComponents logo" width="80"/>

# @mapcomponents/ra-geospatial

[![npm version](https://badge.fury.io/js/@mapcomponents%2Fra-geospatial.svg)](https://badge.fury.io/js/@mapcomponents%2Fra-geospatial) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![downloads](https://img.shields.io/npm/dt/@mapcomponents%2Fra-geospatial.svg) ![downloads](https://img.shields.io/npm/dm/@mapcomponents%2Fra-geospatial.svg)

Input and view components to work with geospatial data in react admin. This package is based on @mapcomponents/react-maplibre and uses MapLibre-gl to display geospatial data on a map.

![RaGeospatialInput & RaGeospatialShow](https://github.com/mapcomponents/ra-geospatial/blob/main/assets/ra_geospatial_screenshots.png?raw=true)

RaGeospatialInput & RaGeospatialShow used to edit a polygon geometry in a react-admin application.

## Demos

- [react admin & mapcomponents Demo](https://cioddi.github.io/mc-react-admin-apps/react-admin-demo)
- [webGIS Demo (embeddedMap: false)](https://cioddi.github.io/mc-react-admin-apps/webgis-demo)

## Installation

```bash
yarn add @mapcomponents/ra-geospatial
```

## Exports

### RaGeospatialInput

Input component to edit or create geospatial data.

### RaGeospatialShow

Show component to display geospatial data.

#### Props

- **embeddedMap**: boolean (default: false) - If true, the map will be embedded in the component. If false, the component will not create it's own MapContext and add a MapLibreMap component but instead expect a MapContext and a MapLibreMap component to be present in the parent component.

## Examples

```JSX
import {
  RaGeospatialInput,
  RaGeospatialShow,
} from "@mapcomponents/ra-geospatial";

export const PoiEdit = () => (
  <Edit>
    <SimpleForm>
      <TextInput source="title" />
      <TextInput source="geom" />
      <RaGeospatialInput source="geom" />
    </SimpleForm>
  </Edit>
);
export const PoiCreate = () => (
  <Create>
    <SimpleForm>
      <TextInput source="title" />
      <TextInput source="geom" />
      <RaGeospatialInput source="geom" />
    </SimpleForm>
  </Create>
);

export const PoiShow = () => (
  <Show>
    <SimpleShowLayout>
      <TextField source="id" />
      <TextField source="title" />
      <RaGeospatialShow source="geom" />
    </SimpleShowLayout>
  </Show>
);
```
npm package: @mapcomponents/react-core
Description: A React component library for declarative web map application development.
Latest version: 0.1.7

<img src="https://avatars.githubusercontent.com/u/64851912" alt="MapComponents logo" width="200"/>

# [MapComponents Core](https://mapcomponents.org/)

A React component library for declarative web map application development.


[![npm version](https://badge.fury.io/js/@mapcomponents%2Freact-core.svg)](https://badge.fury.io/js/@mapcomponents%2Freact-core) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![downloads](https://img.shields.io/npm/dt/@mapcomponents%2Freact-core.svg) ![downloads](https://img.shields.io/npm/dm/@mapcomponents%2Freact-core.svg)

## Usage / Installation

1. ```yarn add @mapcomponents/react-core``` to install and add this package as a dependency to your projects package.json

## Available Scripts

### `yarn build`

Build esm and csm packages and save them to ```./dist```.

### `yarn test` or `yarn test --coverage --watchall=false`

Run tests and watch & rerun tests for affected components if the filesystem changes.

## Components

### MapComponentsProvider

MapComponentsProvider must be imported and wrapped around all MapComponents.

MapComponentsProvider requires exactly one use of the MapLibreMap or OpenLayersMap components somewhere down the component tree that will create a map engine instance and register it to MapContext (using ```mapContext.registerMap()```).

### MapContext

The MapContext component can be used to access the registered map eninge instances from components located in the component tree somewhere below MapComponentsProvider.
Import the useContext hook from React and the MapContext component from react-map-components-core (both named exports).

```js
import { useContext } from "react";
import { MapContext } from "react-map-components-core";
```
In the body of your function component add the following:
```js
const mapContext = useContext(MapContext);
```
You can now retrieve map engine instances using `mapContext.getMap(mapId)`
npm package: @mapcomponents/three
Description: This library provides React components to easily integrate [Three.js](https://threejs.org/) 3D content into [MapLibre GL JS](https://maplibre.org/) maps using [@mapcomponents/react-maplibre](https://github.com/mapcomponents/react-map-components-maplibre).
Latest version: 1.8.10

# @mapcomponents/three

This library provides React components to easily integrate [Three.js](https://threejs.org/) 3D content into [MapLibre GL JS](https://maplibre.org/) maps using [@mapcomponents/react-maplibre](https://github.com/mapcomponents/react-map-components-maplibre).

## Installation

Install the package and its peer dependencies:

```bash
npm install @mapcomponents/three @mapcomponents/react-maplibre
```

## Getting Started

To use `@mapcomponents/three`, you need to wrap your 3D layers with the `ThreeProvider` component. This provider initializes the Three.js scene, camera, and renderer, and registers a custom layer within the MapLibre map.

### Basic Usage

Here is a simple example of how to render a 3D model on a map:

```tsx
import React from 'react';
import { MapComponentsProvider, MapLibreMap } from '@mapcomponents/react-maplibre';
import { ThreeProvider, MlThreeModelLayer } from '@mapcomponents/three';

const App = () => {
  return (
    <MapComponentsProvider>
      <ThreeProvider id="three-scene-1">
        <MapLibreMap
          options={{
            style: 'https://demotiles.maplibre.org/style.json',
            center: [13.404954, 52.520008],
            zoom: 15,
            pitch: 60
          }}
        />
      
        <MlThreeModelLayer
          url="https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Binary/Duck.glb"
          mapPosition={[13.404954, 52.520008]}
          scale={10}
        />
      </ThreeProvider>
    </MapComponentsProvider>
  );
};

export default App;
```

## Running unit tests

Run `nx test @mapcomponents/three` to execute the unit tests via [Vitest](https://vitest.dev/).
npm package: @mapctx/sync-engine
Description: Sync TASKS.md with GitHub Issues and Projects v2
Latest version: 0.0.4

# @mapctx/sync-engine (alpha)

Standalone npm package + CLI to sync local `TASKS.md` with GitHub Issues and GitHub Projects (v2).

Status: alpha. APIs, config keys, and sync behavior may change before `1.0.0`.

Detailed operational guide: `DOCUMENTATION.md`.

## Install

```bash
npm install @mapctx/sync-engine
```

Run with npx:

```bash
npx --yes --package @mapctx/sync-engine mapcs status
```

Release/maintainer process: see `MAINTAINERS.md`.

## Use as library

```ts
import { planCommand, pullCommand, pushCommand, statusCommand, validateCommand } from '@mapctx/sync-engine';

statusCommand({ configPath: 'mapcs.dev.json' });
validateCommand({ configPath: 'mapcs.dev.json' });
planCommand({ configPath: 'mapcs.dev.json' });
```

## CLI commands

- `mapcs status`
- `mapcs validate`
- `mapcs plan`
- `mapcs pull`
- `mapcs push`
- `mapcs bootstrap --from <local|github>`
- `mapcs reconcile <task-id>`
- `mapcs reconcile --list`

Common flags:

- `--dry-run`
- `--force`
- `--json`
- `--mermaid` (for `mapcs plan`)
- `--accept <local|remote>`
- `--config <path>`
- `--tasks-file <path>`

## Important files

- Main config: `mapcs.config.json`
- Config template: `mapcs.config.example.json`
- Local sync state: `.mapcs/state.json`
- Conflict artifacts: `.mapcs/conflicts/<task-id>.reconcile.md`

## ID generation

When importing remote issues (`bootstrap --from github`), new local IDs can follow a preferred prefix:

```json
{
  "idGeneration": {
    "preferredPrefix": "E"
  }
}
```

If omitted, the engine infers the dominant existing prefix (e.g. `T`, `E`, `EPIC`) and continues that sequence.

## Daily flow

```bash
mapcs pull
mapcs status
mapcs push
```

Safety rule: always run `pull` before `push` in the same session.

## Bootstrap

Local-first (`TASKS.md` -> GitHub):

```bash
mapcs bootstrap --from local --dry-run --confirm
mapcs bootstrap --from local --confirm
```

Remote-first (GitHub -> `TASKS.md`):

```bash
mapcs bootstrap --from github --dry-run
mapcs bootstrap --from github
```

## Reconciliation

```bash
mapcs reconcile --list
mapcs reconcile T-002
mapcs reconcile T-002 --accept local
mapcs reconcile T-002 --accept remote
mapcs push
```

## GitHub auth scopes

To sync Issues and Projects v2, your `gh` token needs:

- `repo`
- `read:project`
- `project`

Refresh scopes:

```bash
gh auth refresh -h github.com -s repo,read:project,project
gh auth status
```

## Dev quickstart

From `packages/sync-engine/`:

```bash
npm install
npm run build
node dist/cli.js status --config mapcs.dev.json
node dist/cli.js pull --dry-run --config mapcs.dev.json
node dist/cli.js push --dry-run --config mapcs.dev.json
```