pzsvc-gdaldem

command module
v0.0.0-...-ee5a8af Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

README

GoDoc Apache V2 License

pzsvc-gdaldem

GDAL is a commonly used library and set of tools for raster processing. The gdaldem program provides tools for working with elevation rasters, e.g., creating hillshades. The purpose of this application is to expose gdaldem as an API endpoint.

Install

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.

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

To install pzsvc-gdaldem, simply clone the repository and issue a go install command.

$ git clone https://github.com/venicegeo/pzsvc-gdaldem
$ cd pzsvc-gdaldem
$ go install github.com/venicegeo/pzsvc-gdaldem

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

$ pzsvc-gdaldem

The following curl command should return Hi!.

$ curl -X GET -H "Cache-Control: no-cache" -H "Postman-Token: 73e58ef4-44ba-8b40-6868-72ff404b41dd" 'http://localhost:8080'

Example

While this one will download the sample elevation.tif from S3, create a hillshade with default parameters, and upload the result to S3 as hillshade.tif.

curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: d5eb710b-cf94-c8b1-db29-98d4df633895" -d '{
    "source": {
        "bucket": "venicegeo-sample-data",
        "key": "raster/elevation.tif"
    },
    "function":"hillshade",
    "destination": {
        "bucket": "venicegeo-sample-data",
        "key": "temp/hillshade.tif"
    }
}' 'http://localhost:8080/gdaldem'

Deploying

When deployed, localhost:8080 is replaced with pzsvc-gdaldem.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-gdaldem 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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