geo2mvt

command module
v0.0.0-...-be7f865 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 9 Imported by: 0

README

geo2mvt

A Go program that converts a GeoJSON object into a Mapbox vector tile (mvt) object.

This tool is powered by orb.

Prerequisites

You need the following software installed,

  • Go v1.13 or later

Building the tool

  1. Run go build.

    go build
    
  2. You will find geo2mvt in this directory.

Running the tool

geo2mvt -x X -y Y -z ZOOM INPUT OUTPUT

Parameters

  • X: x coordinate of a tile to be generated.
  • Y: y coordinate of a tile to be generated.
  • ZOOM: zoom of a tile to be generated.
  • INPUT: path to an input JSON file.
  • OUTPUT: path to an output map vector tile file, which is a zipped PBF file.

As a Mapbox's map vector tile can contain multiple layers in a single tile, an input JSON file, multilayer GeoJSON file, can contain multiple GeoJSON objects inside. It associates a layer name with a corresponding GeoJSON object. A multilayer GeoJSON file looks like the following,

{
    "layers-1": {
        // GeoJSON object
    },
    "layers-2": {
        // GeoJSON object
    }, ...
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL