Skip to content

A research project to investigate using GeoTrellis as a REST service

License

Notifications You must be signed in to change notification settings

azavea/geotrellis-collections-api-research

Repository files navigation

geotrellis-collections-api-research

Build Status

A research project to set up and use GeoTrellis as a REST service.

current demo

Requirements

To ingest the geotiff data used in the app, you'll also need to ensure that you've got spark-submit on your local path.

Getting started

Setup

Clone the project, make sure that Docker's running, then run:

make

This will

Server

To start the app & API servers, run:

make server

This will start servers to run the app on port 9555 and the API on port 7000.

Ports

Port Service
9555 Webpack dev server
7000 GeoTrellis API

API Endpoints

Each of these API endpoints accepts a polygon geometry object posted from the client:

Path Service
/panlcdcount Returns NLCD cell counts arranged by type for AOI

Make rules

Rule Description
make build Install app container npm dependencies
make compile Compile app & api for CI
make app-console Log into app container shell
make api-console Log into API with ./sbt console
make restart Start API with ./sbt ~reStart
make server Start app container & API service
make download-tif Download a geotiff of 1992 NLCD data for Pennsylvania
make ingest Ingest Pennsylvania NLCD GeoTiff into GeoTrellis RDD
make paint Paint Pennsylvania NCLD tiles from RDD
make clean Remove downloaded geotiff, generated RDD, generated tiles