Code Monkey home page Code Monkey logo

terrafab's Introduction

TerraFab

Prerequisites

  • Node.js 0.10.x or newer

Getting up and running

You need the graphics library Cairo installed. Cairo needs to be linked with freetype to work with node_canvas for some reason. A simple way to achieve this if you are using homebrew on OS X is to install Cairo without X11-bindings, like so:

$ brew install cairo --without-x

Then:

    $ npm install
    $ node server.js

The web app should now be accessible at http://localhost:3000

Configuration

All configuration can be done under ./config/app.json. Have a look at the ./config/app.example.json.

In order to configure the accessToken and accessTokenSecret for Shapeways, you may obtain them by calling the route /accesstoken in the app after you have configrued the consumerKey and consumerKeySecret for your Shapeways application.

Model endpoints

/preview

Packages the model into an archive ready for export.

/download

Download the built model archive.

/cart

Lets the user buy the model at Shapeways through our configured Shapeways application.

It assumes the user already have visited the /preview route.

API endpoints

/dtm (GET)

Renders a UTM 33 terrain model for a given bound (box).

Params

box : A bounding box for the map given in UTM 33 coordinates given as 'NWx,NWy,SEx,SEy'.

outsize : The image dimensions in pixels given as 'X,Y'.

format (optional): Either 'png' or 'bin' (16bit binary in ENVI-format).

Example

/dtm?box=253723.176600653,6660500.4670516,267723.176600653,6646500.4670516&outsize=1000,1000

/map (GET)

Renders a UTM 33 map tile for a given bound (box).

Params

box : A bounding box for the map given in UTM 33 coordinates given as 'NWx,NWy,SEx,SEy'.

outsize : The image dimensions in pixels given as 'X,Y'.

Example

/map?box=253723.176600653,6660500.4670516,267723.176600653,6646500.4670516&outsize=1000,1000

Shapeways endpoints

/accesstoken (GET)

Let you login to Shapeways to get an access token for the your Shapeways application. Note: the end user will not be logging into this. It's a tool for obtaining an access token for the application (in order to post models to the Shapeways API).

There is also: /login and /callback which is taken care of by the oAuth bonanza.

Params

None

Example

/accesstoken

terrafab's People

Contributors

bjoerge avatar evenwestvang avatar kristofferjs avatar simen avatar skogsmaskin avatar

Watchers

 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.