Code Monkey home page Code Monkey logo

mapbox-upload-validate's Introduction

Build Status Coverage Status

mapbox-upload-validate

Validate that a file can be uploaded to Mapbox

Install

$ npm install -g @mapbox/mapbox-upload-validate

Configuration

By default file metadata has a 60.0Kb limit. You can override this value with the LIMITS_MAX_METADATA environment variable. See https://github.com/mapbox/mapbox-upload-limits for additional configuration.

Usage

$ mapbox-upload-validate /path/to/data/file

Where /path/to/data/file is the path to a file.

There are three possible results:

  • Valid: process exit 0 and logs the file's path to stdout
  • Invalid: process exit 3, nothing is logged to stdout, and a validation error is printed to stderr
  • Unexpected: something unexpected happened and we could not confirm whether or not the file is valid. Process exit 1 with nothing printed to stdout and an error message printed to stderr

The following types of files are supported for upload to Mapbox.com:

  • Mbtiles
  • GeoTIFF
  • Zipped Shapefile
  • GeoJSON
  • TopoJSON
  • GPX
  • KML
  • TileJSON
  • tm2z
  • Serialtiles

Run tests

Setup your environment with some variables:

  • MapboxAccessToken: for access to mapbox.com

Then

npm test

mapbox-upload-validate's People

Contributors

dnomadb avatar e-n-f avatar flippmoke avatar ian29 avatar isiyu avatar jakepruitt avatar jqtrde avatar mapsam avatar rclark avatar tmcw avatar who8mycakes avatar willwhite avatar yhahn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.