Skip to content

Commit

Permalink
Update README based on feedback from #15
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabs committed Feb 9, 2024
1 parent d0ec483 commit 1353ad0
Showing 1 changed file with 57 additions and 6 deletions.
63 changes: 57 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ SUBCOMMANDS:
See 'mvt help <subcommand>' for detailed help.
```

`mvt info` - Print information about the vector tile

```bash
mvt info Tests/MVTToolsTests/TestData/14_8716_8015.vector.mvt
```

---

## Features
Expand Down Expand Up @@ -110,6 +104,63 @@ let tileData = tile.data()
...
```

### Playground

On macOS you can use a Swift Playground to inspect the MVTTools API such as `layerNames` & `projection`.

* Load tile using MVTTools
* Inspect the properties of the `VectorTile`

### `mvt dump`

Print the vector tile as GeoJSON.

`mvt` works with a vector tile from local disk.

Example 1: Print information about the MVTTools test vector tile at zoom 14, at Yaoundé, Cameroon.

```bash
mvt dump Tests/MVTToolsTests/TestData/14_8716_8015.vector.mvt
```

### `mvt info`

```bash
mvt info Tests/MVTToolsTests/TestData/14_8716_8015.vector.mvt
```

*Result*

Name | Features | Points | LineStrings | Polygons | Unknown | Version
--------------------+----------+--------+-------------+----------+---------+--------
area_label | 55 | 55 | 0 | 0 | 0 | 2
barrier_line | 4219 | 0 | 4219 | 0 | 0 | 2
bridge | 14 | 0 | 14 | 0 | 0 | 2
building | 5414 | 0 | 0 | 5414 | 0 | 2
building_label | 413 | 413 | 0 | 0 | 0 | 2
...
road | 502 | 1 | 497 | 4 | 0 | 2
road_label | 309 | 0 | 309 | 0 | 0 | 2

---

`mvt` works with a vector tile served from a web server.

Example 2: Inspect a MapLibre vector tile at zoom 2, with an extent showing Norway to India.

```bash
mvt info https://demotiles.maplibre.org/tiles/2/2/1.pbf
```

*Result*

Name | Features | Points | LineStrings | Polygons | Unknown | Version
----------+----------+--------+-------------+----------+---------+--------
centroids | 104 | 104 | 0 | 0 | 0 | 2
countries | 113 | 0 | 0 | 113 | 0 | 2
geolines | 4 | 0 | 4 | 0 | 0 | 2


## Contributing

Please create an issue or open a pull request with a fix
Expand Down

0 comments on commit 1353ad0

Please sign in to comment.