{"id":19568889,"url":"https://github.com/geotrellis/geotrellis-chatta-demo","last_synced_at":"2025-06-27T00:05:06.697Z","repository":{"id":13327907,"uuid":"16014791","full_name":"geotrellis/geotrellis-chatta-demo","owner":"geotrellis","description":"Demo of GeoTrellis - weighted overlay and zonal summary for University of Tennessee at Chattanooga.","archived":false,"fork":false,"pushed_at":"2018-07-16T17:54:49.000Z","size":92906,"stargazers_count":52,"open_issues_count":12,"forks_count":33,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-27T03:31:45.985Z","etag":null,"topics":["chattanooga","geodocker-cluster","geotrellis","s3","spark"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geotrellis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-17T23:30:00.000Z","updated_at":"2025-02-02T05:08:34.000Z","dependencies_parsed_at":"2022-08-25T15:01:54.077Z","dependency_job_id":null,"html_url":"https://github.com/geotrellis/geotrellis-chatta-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geotrellis/geotrellis-chatta-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geotrellis%2Fgeotrellis-chatta-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geotrellis%2Fgeotrellis-chatta-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geotrellis%2Fgeotrellis-chatta-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geotrellis%2Fgeotrellis-chatta-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geotrellis","download_url":"https://codeload.github.com/geotrellis/geotrellis-chatta-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geotrellis%2Fgeotrellis-chatta-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262163951,"owners_count":23268779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chattanooga","geodocker-cluster","geotrellis","s3","spark"],"created_at":"2024-11-11T06:06:50.532Z","updated_at":"2025-06-27T00:05:06.662Z","avatar_url":"https://github.com/geotrellis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoTrellis Chattanooga model demo\n\nThis is a demo of GeoTrellis functionality. The demo consists of two parts:\nthe tile ingest process and demo server to query ingested data.\n\n## Dependencies\n\n\n- Vagrant 1.9.5\n- VirtualBox 5.1+\n- AWS CLI 1.11+\n- AWS Account (to access S3)\n\n## Getting Started\n\nTo provision a VM and fetch our pre-ingested demo data:\n\n```bash\n$ ./scripts/setup\n$ vagrant ssh\n```\n\nThis will download data into `./service/geotrellis/data/chatta-demo`. See the [ingest](#ingesting-data) sections for information about ingesting data manually using either the [local filesystem](#local-ingest) or [geodocker](geodocker-ingest).\n\n## Scripts\n\nHelper and development scripts are located in the `./scripts` directory at the root of this project. These scripts are designed to encapsulate and perform commonly used actions such as starting a development server, accessing a development console, or running tests.\n\n| Script Name             | Purpose                                                      |\n|-------------------------|--------------------------------------------------------------|\n| `update`                | Pulls/builds necessary containers                            |\n| `setup`                 | Provisions the VM, fetch ingest data.                        |\n| `server`                | Starts a development server that listens at http://localhost:8777. Use the `--geodocker` flag to run the server with an accumulo backend.                       |\n| `console`               | Gives access to a running container via `docker-compose run`. Use the `--geodocker` flag to run with an accumulo backend |\n| `test`                  | Runs tests for project                                 |\n| `cibuild`               | Invoked by CI server and makes use of `test`.                |\n| `cipublish`             | Build JAR and publish container images to container image repositories.    |\n\n## Testing\n\nRun all the tests:\n\n```bash\n$ ./scripts/test\n```\n\n## Details\n\nThe demo covers [Chattanooga](https://goo.gl/S2qPCO) with different `Byte`\ntiles. (In fact each tile is essentially of type `Bit` because they only\ncontain the  values `{0, 1}`). Each tile is ingests into it's own layer, and\nthe resulting map consists of layers which consist of combinations of\ndifferently-weighted source layers (a weighted overlay).\n\n### API routes:\n\n* `gt/colors`             - [Color Ramps](#color-ramps)\n* `gt/breaks`             - [Color Breaks](#color-breaks)\n* `gt/tms/{zoom}/{x}/{y}` - [Weighted Overlay](#weighted-overlay)\n* `gt/sum`                - [Zonal Summary](#zonal-summary)\n\n### Color Ramps\n\nList of available color ramps to color weighted overlay:\n\n* `blue-to-orange`\n* `green-to-orange`\n* `blue-to-red`\n* `green-to-red-orange`\n* `light-to-dark-sunset`\n* `light-to-dark-green`\n* `yellow-to-red-heatmap`\n* `blue-to-yellow-to-red-heatmap`\n* `dark-red-to-yellow-heatmap`\n* `purple-to-dark-purple-to-white-heatmap`\n* `bold-land-use-qualitative`\n* `muted-terrain-qualitative`\n\n### Color Breaks\n\n*Get Parameters:* `layers`, `weights`, `numBreaks`.\n\nCalculates breaks for combined layers by weights with specified breaks amount.\n\n### Weighted Overlay:\n\n*Get Parameters:* `layers`, `weights`, `breaks`, `bbox`, `colors: [default: 4]`, `colorRamp: [default: \"blue-to-red\"]`, `mask`.\n\nIt is a TMS layer service that gets `{zoom}/{x}/{y}`, passed a series of\nlayer names and weights, and returns PNG TMS tiles of the weighted overlay.\nIt also takes the breaks that were computed using the `gt/breaks` service.\nIf the `mask` option is set to a polygon, `{zoom}/{x}/{y}` tiles masked by\nthat polygon would be returned.\n\n### Zonal Summary:\n\n*Get Parameters:* `polygon`, `layers`, `weights`.\n\nThis service takes layers, weights and a polygon.\nIt will compute a weighted summary of the area under the polygon.\n\n## Ingesting Data\n\nQuick clarification:\n\n* Ingest requires Spark usage.\n* Server works without Spark (uses GeoTrellis Collections API).\n\nThis section includes instructions on how to do local filesystem and Geodocker ingests to either the local filesystem, or to Accumulo (using [Geodocker](https://github.com/geodocker/geodocker)).\n\n### Local ingest\nIn the event that you need to run a local ingest, the `gt-chatta-ingest` container will run a `spark-submit` job that writes ingest data to the local filesystem. Make sure the Chatta Demo JAR has been built, then run the container:\n\n```bash\n$ docker-compose run --rm gt-chatta assembly\n$ docker-compose build gt-chatta-ingest\n$ docker-compose run --rm gt-chatta-ingest\n```\n\nData will be installed into `./service/geotrellis/data/chatta-demo`, which is mounted at `/data/chatta-demo` inside of the `gt-chatta` container.\n\n### Geodocker Ingests\nTo simulate running this demo in a distibuted environment, we prepared a Geodocker cluster including Hadoop, Accumulo and Spark. The application is configured for the geodocker setup using the `application.conf` file in the `geodocker/` folder. ***Make sure you build an accumulo-configured JAR with `make build-geodocker` before attempting a Geodocker ingest.*** \n\n* To run cluster:\n  ```bash\n    docker-compose up\n  ```\n\n  To check that cluster is operating normally check the availability of these pages:\n  * Hadoop [http://localhost:50070/](http://localhost:50070/)\n  * Accumulo [http://localhost:50095/](http://localhost:50095/)\n  * Spark [http://localhost:8080/](http://localhost:8080/)\n\nTo check containers status, use the following command:\n\n```bash\ndocker-compose -f docker-compose.geodocker.yml ps\n```\n\n\n* Install and run this demo using [GeoDocker cluster](https://github.com/geodocker/geodocker)\n  \n  * Running a Geodocker ingest will require more memory for the Vagrant VM. Before running an ingest, set `GT_CHATTA_VM_MEMORY=6144` (or a higher value) and run `vagrant reload`.\n\n  * Build the accumulo-configured geotrellis JAR, run an ingest, then start the server.\n    ```bash\n      make build-geodocker\n      make ingest-geodocker\n      ./scripts/server --geodocker\n    ```\n\nThe demo catalog will be available through the accumulo backend. More information avaible is available in the [GeoDocker cluster](https://github.com/geodocker/geodocker) repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeotrellis%2Fgeotrellis-chatta-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeotrellis%2Fgeotrellis-chatta-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeotrellis%2Fgeotrellis-chatta-demo/lists"}