pzsvc-pdal

command module
v0.0.0-...-97c21ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

README

GoDoc Apache V2 License

pzsvc-pdal

Providing a PDAL-based microservice for Piazza.

The going in assumption is that we will receive some message from the dispatcher indicating that a point cloud service has been requested. We will have the path to the data and a description of the task to be performed. We also have a responsibility to update the job manager periodically with status updates.

Install

For pzsvc-pdal to function properly, PDAL must be installed on your system. Our manifest.yml file specifies a custom buildpack to ensure that PDAL is available on Cloud Foundry. For local operation, follow installation instructions for your system, e.g., brew install pdal on Mac OS X

Go 1.5+ is required. You can download it here.

If you have not already done so, make sure you've setup your Go workspace and set the necessary environment variables

We make use of Go 1.5's vendor/ experiment, so you'll need to make sure you are running Go 1.5+, and that your GO15VENDOREXPERIMENT environment variable is set to 1.

Installing pzsvc-pdal is as simple as

$ export GO15VENDOREXPERIMENT=1
$ go get github.com/venicegeo/pzsvc-pdal
$ go install github.com/venicegeo/pzsvc-pdal

Assuming $GOPATH/bin is on your $PATH, the service can easily be started on port 8080

$ pzsvc-pdal

Examples

Perhaps the most straightforward means of demonstrating the pzsvc-pdal service is via Postman.

Begin by importing our collection.

We also provide two environments, one to setup localhost, another to setup Cloud Foundry.

Testing

Nothing fancy here. Just run

$ go test ./...

Or, if you are interested in code coverage

$ go test ./... -cover

And, for more detailed coverage info

$ go test ./... -coverprofile=coverage.out
$ go tool cover -html=coverage.out

Modifying

We use Godeps to aid in deployment. Upon saving, run

$ godep save ./...

to update the Godeps folder and all import paths.

Swagger

We have also begun to document the API via Swagger. The current API specification can be found here, but it is currently incomplete.

Deploying

When deployed, localhost:8080 is replaced with pzsvc-pdal.cf.piazzageo.io.

All commits to master will be pushed through the VeniceGeo DevOps infrastructure, first triggering a build in Jenkins and, upon success, pushing the resulting binaries to Cloud Foundry

Documentation

Overview

pzsvc-pdal provides an endpoint for accepting PDAL requests.

Examples

$ curl -v -X POST -H "Content-Type: application/json" \
  -d '{"source":{"bucket":"venicegeo-sample-data","key":"pointcloud/samp11-utm.laz"},"function":"info"}' http://hostIP:8080/pdal

We shall see where we land with the input and output message for the job manager, but for now, we are expecting something along these lines.

Input:

{
	"source": {
		"bucket": "venicegeo-sample-data",
		"key": "pointcloud/samp11-utm.laz"
	},
	"function": "ground",
	"options": {
		"slope": 0.5
	},
	"destination": {
		"bucket": "venicegeo-sample-data",
		"key" "temp/output.laz"
	}
}

Output:

{
	"input": <echo the input message>,
	"started_at": "2015-12-23T18:07:36.987565884Z",
	"finished_at": "2015-12-23T18:07:38.111658707Z",
	"code": 200,
	"message": "Success!"
}

These messages are known to be incomplete at the moment. I'm sure there will be things like job IDs, etc. that have not been included at the moment. This is a good starting point though.

Directories

Path Synopsis
Package functions provides support for various functions within the PDAL microservice.
Package functions provides support for various functions within the PDAL microservice.
Package handlers provides support for various handlers within the PDAL microservice.
Package handlers provides support for various handlers within the PDAL microservice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL