A research project to set up and use GeoTrellis as a REST service.
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.
Clone the project, make sure that Docker's running, then run:
make
This will
- build the app client
- compile the API service
- download a geotiff representing 1992 NLCD values for Pennsylvania
- ingest the geotiff as an RDD for GeoTrellis
- paint tiles of the geotiff from the RDD
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
.
Port | Service |
---|---|
9555 | Webpack dev server |
7000 | GeoTrellis API |
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 |
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 |