Giter VIP home page Giter VIP logo

tilestrata-kothic's Introduction

tilestrata-kothic is a Tilestrata plugin for rendering tiles using Kothic

NPM version License Build Status

This plugin doesn't require any particular data source, but it was designed with PostgreSQL and PostGIS in mind.

Please consider tilestrata-kothic as a working example rather then box product.

Usage tutorial

Let's render something simple, e.g. contour lines over a transparent background.

Required prerequisites:

  1. Have PostgreSQL + PostGIS installed
  2. PostgreSQL database with PostGIS and hstore extensions enabled
  3. GDAL tools installed

Download SRTM contours in shape format from OpenDemData http://opendemdata.info/data/srtm_contour/N43E042.zip

wget http://opendemdata.info/data/srtm_contour/N43E042.zip

Unzip archive

unzip N43E042.zip

Use OGR2OGR to load shapes to PostgreSQL

ogr2ogr -f "PostgreSQL" PG:"host=localhost dbname=%db_name$ user=%psql_user% password=%psql_password" "N43E042/N43E042.shp" -nln contours -overwrite -t_srs EPSG:3857

Note: contours example relies on spatial data in EPSG:3857

Run examples/contours-server.js

PG_USER=%psql_user% PG_PASSWORD=%psql_password" PG_DB=%db_name$ node examples/contours-server.js

Check generated contours in your browser

http://localhost:8081/contours/14/10123/5998.png

Additional info

For information about KothicJS see: https://github.com/kothic/kothic-node

tilestrata-kothic's People

Contributors

miroff avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.