GithubHelp home page GithubHelp logo

vovoma / windshaft Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cartodb/windshaft

0.0 1.0 0.0 4.98 MB

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

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.26% JavaScript 96.18% Shell 1.42% HTML 1.05% PLpgSQL 1.08%

windshaft's Introduction

Windshaft map tiler

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

NPM

Build Status Code Climate

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

Being a dynamic map renderer, windshaft commits some map server 'sins' in its raw form. The idea is that you the developer will want to graft your own auth/metrics/caching/scaling on top of decent core components. Same old story: high cohesion, low coupling makes us happy. See Windshaft-cartodb.

Windshaft is a library used by cartodb.com, an Open Source Geospatial Database on the Cloud.

Some examples

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

More examples built on top of Windshaft can be found in CartoDB's gallery.

Dependencies

  • Node >=0.8
  • npm >=1.2.1 <2.0.0
  • Mapnik 2.0.1, 2.0.2, 2.1.0, 2.2.0, 2.3.0. See Installing Mapnik.
  • PostgreSQL >8.3.x, PostGIS >1.5.x
  • Redis >2.2.x
  • libcairo2-dev, libpango1.0-dev, libjpeg8-dev and libgif-dev for server side canvas support

Dependencies installation example:

sudo add-apt-repository -y ppa:cartodb/cairo
sudo apt-get update
sudo apt-get install -y build-essential checkinstall pkg-config libcairo2-dev libjpeg8-dev libgif-dev

Install

npm install [windshaft]

Usage

An example http service is implemented in examples/http/server.js, examples/readme_server.js extends its behaviour.

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

Installing Mapnik

Latest node-mapnik versions 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 to use mapnik-packaging. You can also use other alternatives:

Recommended options to build from source:

We maintain a set of scripts/recipes to package mapnik sdk and node-mapnik. It can help to understand what you really need to package mapnik + node-mapnik to be used from windshaft[-cartodb].

Tests

Windshaft has a unit and acceptance test suite. To execute them, run npm test.

You'll need to be sure your PGUSER (or your libpq default) is set to a "superuser" PostgreSQL account, for example:

PGUSER=postgres npm test

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

See CONTRIBUTING.md.

-- Thanks to the Mapnik and Mapbox team for making such flexible tools

windshaft's People

Contributors

rochoa avatar javisantana avatar jgoizueta avatar tokumine avatar fdansv avatar dgaubert avatar christianbundy avatar zenitram avatar gravitystorm avatar vovoma avatar cgendreau avatar dshorthouse avatar kueda avatar luisbosque avatar vincentcau 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.