Name: geotrellis-chatta-demo
Owner: SpatialDev
Description: Demo of GeoTrellis - weighted overlay and zonal summary for University of Tennessee at Chattanooga.
Forked from: geotrellis/geotrellis-chatta-demo
Created: 2017-02-06 20:26:13.0
Updated: 2017-10-25 13:31:36.0
Pushed: 2017-02-01 17:59:54.0
Homepage: null
Size: 92865
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a demo of GeoTrellis functionality. The demo consists of two parts: the tile ingest process and demo server to query ingested data.
make ingest
) Apache Sparkmake ingest-docker
) DockerSee the Makefile
for full details.
Command | Action
——- | ——-
make build
| Build ingest/server code
make ingest
| Ingest data for use by server
make ingest-docker
| Ingest via docker
make server
| Start a test server at localhost:8777
make image
| Generate a Docker image for deployment
The demo covers Chattanooga with different Byte
tiles. (In fact each tile is essentially of type Bit
because they only
contain the values {0, 1}
). Each tile is ingests into it's own layer, and
the resulting map consists of layers which consist of combinations of
differently-weighted source layers (a weighted overlay).
gt/colors
- Color Rampsgt/breaks
- Color Breaksgt/tms/{zoom}/{x}/{y}
- Weighted Overlaygt/sum
- Zonal SummaryList of available color ramps to color weighted overlay:
blue-to-orange
green-to-orange
blue-to-red
green-to-red-orange
light-to-dark-sunset
light-to-dark-green
yellow-to-red-heatmap
blue-to-yellow-to-red-heatmap
dark-red-to-yellow-heatmap
purple-to-dark-purple-to-white-heatmap
bold-land-use-qualitative
muted-terrain-qualitative
Get Parameters: layers
, weights
, numBreaks
.
Calculates breaks for combined layers by weights with specified breaks amount.
Get Parameters: layers
, weights
, breaks
, bbox
, colors: [default: 4]
, colorRamp: [default: "blue-to-red"]
, mask
.
It is a TMS layer service that gets {zoom}/{x}/{y}
, passed a series of
layer names and weights, and returns PNG TMS tiles of the weighted overlay.
It also takes the breaks that were computed using the gt/breaks
service.
If the mask
option is set to a polygon, {zoom}/{x}/{y}
tiles masked by
that polygon would be returned.
Get Parameters: polygon
, layers
, weights
.
This service takes layers, weights and a polygon. It will compute a weighted summary of the area under the polygon.
Quick clarification:
This description is a bit more generic, and describes dependent Spark server run.
To compile and run this demo, we prepared an environment. To run cluster we have a slightly-modified docker-compose.yml file:
To run cluster:
er-compose up
To check that cluster is operating normally check the availability of these pages:
Hadoop http://localhost:50070/
Accumulo http://localhost:50095/
Spark http://localhost:8080/
To check containers status is possible using following command:
er ps -a | grep geodocker
More information avaible in a GeoDocker cluster repo
Install and run this demo using GeoDocker cluster
Modify application.conf (working conf example for GeoDocker cluster):
otrellis {
port = 8777
server.static-path = "../static"
hostname = "spark-master"
backend = "accumulo"
cumulo {
instance = "accumulo"
user = "root"
password = "GisPwd"
zookeepers = "zookeeper"
Modify backend-profiles.json (working conf example for GeoDocker cluster):
"name": "accumulo-local",
"type": "accumulo",
"zookeepers": "zookeeper",
"instance": "accumulo",
"user": "root",
"password": "GisPwd"
Copy everything into spark master container:
./geotrellis
sbt assembly
cker exec geotrellischattademo_spark-master_1 mkdir -p /data/target/scala-2.10/
cker cp target/scala-2.11/GeoTrellis-Tutorial-Project-assembly-0.1-SNAPSHOT.jar geotrellischattademo_spark-master_1:/data/target/scala-2.10/GeoTrellis-Tutorial-Project-assembly-0.1-SNAPSHOT.jar
cker cp ../static geotrellischattademo_spark-master_1:/static
cker cp data/arg_wm/ geotrellischattademo_spark-master_1:/data/
cker cp conf geotrellischattademo_spark-master_1:/data/
cker cp ingest.sh geotrellischattademo_spark-master_1:/data/
cker cp run-server.sh geotrellischattademo_spark-master_1:/data/
ash
cker exec -it geotrellischattademo_spark-master_1 bash
/data/; make ingest # to ingest data into accumulo
/data/; make server # to run the server
This demo would be installed into /data
directory, inside spark master container.