Code Monkey home page Code Monkey logo

windshaft's Introduction

Windshaft Build Status

A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling.

  • Can render arbitrary SQL queries
  • Generates image and UTFGrid interactivity tiles
  • Accepts, stores, serves, and applies map styles written in CartoCSS
  • Supports re-projections

Windshaft is a library used by CARTO, a location intelligence and data visualization tool.

Examples

Playing with colors by @andrewxhill Circumpolar Arctic Vegetation by @andrewxhill Bolivia deforestation by @saleiva Traffic accidents by @rochoa

Build

Requirements:

Install

To fetch and build all node-based dependencies, run:

$ npm install

Installing Mapnik

Note: only needed while developing Mapnik and/or node-mapnik.

node-mapnik comes compiled for some platforms and architectures, in case you need it you can always compile, package and install it manually. The recommended option is via binaries, see mason and install Mapnik like:

$ mason install mapnik <version>

Where <version> is the latest released version of Mapnik. You can also use other alternatives:

Usage

Probably one of the more advanced uses of Windshaft library can be found at Windshaft-cartodb project.

Test

$ npm test

Coverage

$ npm run cover

Open ./coverage/lcov-report/index.html.

Docker support

We provide docker images just for testing and continuous integration purposes:

You can find instructions to install Docker, download, and update images here.

Useful npm scripts

Run test in a docker image with a specific Node.js version:

$ DOCKER_IMAGE=<docker-image-tag> NODE_VERSION=<nodejs-version> npm run test:docker

Where:

  • <docker-image-tag>: the tag of required docker image, e.g. carto/nodejs-xenial-pg1121:latest
  • <nodejs-version>: the Node.js version, e.g. 10.15.1

In case you need to debug:

$ DOCKER_IMAGE=<docker-image-tag> npm run docker:bash

Troubleshooting

Fonts: Invalid value for text-face-name

You need to install fonts at system level to be able to use them. If you face an issue like Invalid value for text-face-name, the type font is expected. DejaVu Sans Book (of type string) was given. probably you don't have the required fonts, try to install DejaVu fonts or any other font needed.

Contributing

Versioning

We follow SemVer for versioning. For available versions, see the tags on this repository.

License

This project is licensed under the BSD 3-clause "New" or "Revised" License. See the LICENSE file for details.

windshaft's People

Contributors

algunenano avatar cgendreau avatar christianbundy avatar dependabot[bot] avatar dgaubert avatar dshorthouse avatar elenatorro avatar ethervoid avatar fdansv avatar gravitystorm avatar javisantana avatar jgoizueta avatar kueda avatar luisbosque avatar oleurud avatar rochoa avatar snyk-community avatar strk avatar tokumine avatar vincentcau avatar zenitram avatar

Watchers

 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.