# mapboxed

> Generate assembled mapbox tiles.

Latest version **0.0.7** (published 2021-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install mapboxed
pnpm add mapboxed
yarn add mapboxed
bun add mapboxed
```

Provides the command `mapboxed`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2021-05-11 |
| First published | 2020-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 (+28 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Daniel Kao |
| Maintainers | dkao |

## Links

- npm: https://www.npmjs.com/package/mapboxed
- Repository: https://github.com/dkaoster/mapboxed
- Homepage: https://github.com/dkaoster/mapboxed#readme
- Issues: https://github.com/dkaoster/mapboxed/issues
- npm.io page: https://npm.io/package/mapboxed

## Dependencies (10)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [axios](https://npm.io/package/axios.md) ^0.21.0
- [sharp](https://npm.io/package/sharp.md) ^0.26.3
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [readline](https://npm.io/package/readline.md) ^1.3.0
- [commander](https://npm.io/package/commander.md) ^6.2.1
- [cli-progress](https://npm.io/package/cli-progress.md) ^3.8.2
- [dist-exiftool](https://npm.io/package/dist-exiftool.md) ^10.53.0
- [node-exiftool](https://npm.io/package/node-exiftool.md) ^2.3.0
- [promise-queue](https://npm.io/package/promise-queue.md) ^2.2.5

## Recent versions

- 0.0.7 (latest) — 2021-05-11
- 0.0.6 — 2021-03-10
- 0.0.5 — 2021-02-14
- 0.0.4 — 2020-12-31
- 0.0.3 — 2020-12-23
- 0.0.2 — 2020-12-23
- 0.0.1 — 2020-12-21
- 0.0.0 — 2020-12-20

## README

# Mapboxed
Generate assembled mapbox tilesets.

## CLI Usage

```
Usage: mapboxed [options]

Downloads tiles from mapbox and stitches them together into one image file

Options:
  -V, --version              output the version number
  -z, --zoom <zoom>          zoom level
  -l, --location <location>  string query specifying the location of interest
  -x1 <x1>                   left longitude boundary
  -x2 <x2>                   right longitude boundary
  -y1 <y1>                   top latitude boundary
  -y2 <y2>                   bottom latitude boundary
  -o, --outfile <outfile>    output filename (default: "mapboxed.jpg")
  -t, --tileset <tileset>    mapbox tileset id (default: "mapbox.satellite")
  -k, --key <token>          mapbox token (will override read from MAPBOX_TOKEN 
                             environment variable)
  -f, --format <format>      image format to download (jpg90 | jpg80 | jpg70 | 
                             png256 | png128 | png64 | png32 | png) (default: "jpg90")
  -p, --parallel <parallel>  Number of parallel connection to make to mapbox (default: "5")
  -r, --res2x                fetch @2x size resolution
  -s, --silent               do not confirm download size
  -c, --cache                keep and read from temp tile files in .mapboxed
  -h, --help                 display help for command
```

The output file stitches together the tiles specified by the parameters given. Note that if the coordinate boundaries specified in the arguments do not fall precisely on a tile boundary, mapboxed will output a file up to the nearest tile still containing your entire coordinate boundaries. This final boundary is written to the image's metadata in the description field as a serialized array in the form of `[lng1, lat1, lng2, lat2]`.

## Examples
with [npm version 5.2.0 or up](https://github.com/npm/npm/releases/tag/v5.2.0), directly run the following commands in the terminal, no extra installation necessary. (Note: you will need a [mapbox access token](https://account.mapbox.com/) to be set with the environment variable `MAPBOX_TOKEN` or passed in with `-k`)

```
npx mapboxed -z 9 -x1 -123.0652 -y1 38.1799 -x2 -120.1163 -y2 37.1431
```

<img src="https://raw.githubusercontent.com/dkaoster/mapboxed/main/demo/mapboxed1.jpg" width="100%" />

```
npx mapboxed -z 9 -x1 -123.0652 -y1 38.1799 -x2 -120.1163 -y2 37.1431 -t mapbox.mapbox-terrain-v2
```

<img src="https://raw.githubusercontent.com/dkaoster/mapboxed/main/demo/mapboxed2.jpg" width="100%" />

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