Giter VIP home page Giter VIP logo

greyhound-writer's Introduction

Greyhound Writer

This is a sample REPL that exercises the PDAL Greyhound writer. It allows a user to easily split up the execution of an arbitrary series of PDAL filters across a user-defined tiling scheme and instantly visualize the result in a web browser.

Usage

Git and docker-compose are required to follow these instructions.

Index data

First, index some data with Entwine. We'll assume that ~/entwine is the root location for Entwine-indexed data.

docker run -it -v ~/entwine:/entwine connormanning/entwine build \
    -i https://entwine.io/sample-data/autzen.laz \
    -o /entwine/autzen

Launch Greyhound development environment

git clone https://github.com/connormanning/greyhound-writer
cd greyhound-writer
ENTWINE=~/entwine docker-compose up -d

Now there is a Greyhound container running as well as a container that can execute the greyhound-writer script. Greyhound's logs can now be viewed with docker-compose logs -f.

We can make sure Greyhound is hooked up to our data properly by browsing to http://speck.ly/?s=localhost:8080&r=autzen.

Run some filtering algorithms

We'll run some ground classifier using PDAL's SMRF and PMF filters, and their results will be written back to the Greyhound resource.

Check out the example pipeline to see the filter portion that will be executed. We will run each of the ground classifiers, and after each one runs we will ferry the Classification attribute over to new user-defined attributes that will be pushed to the resource. By default, the data will be split up into a 6x6 grid.

We will use the Docker container named writer which was launched by our docker-compose earlier. The current directory, containing example.json, is mapped to /data within the container (see the docker-compose file).

docker exec -it writer write \
    -r autzen \
    -p /data/example.json \
    -n Example

This invocation, with the provided example.json, will create three new attributes named Example/Tile, Example/Smrf, and Example/Pmf. Since we passed only the resource name autzen rather than the full server path, the script expanded this out to the default server http://greyhound:8080/resource/autzen (see docker-compose.yml). Now we can browse to speck.ly's "Color Channels" pane and visualize our new attributes here. The Example/Tile attribute was added by the algorithm-runner script and not explicitly specified in example.json.

There should now be a directory called pipelines/Example containing the constituent PDAL pipelines for this run of filtering.

Going further

The example.json filter pipeline has some special NAME characters within the dimension names. Any instance of NAME within the pipeline (-p) will be replaced with the value of the -n flag.

You can see the other options with:

docker exec -it writer write --help

Some notable options:

  • -s: Number of steps in the grid system, -s 8 uses an 8x8 grid for 64 total tiles
  • -b: Bloat tile bounds to eliminate edge effects, -b 0.10 bloats tiles by 10%
  • -j: Set number of concurrent pipelines to run
  • --norun: Generate the PDAL pipeline files, but don't execute them

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.