{"id":20955136,"url":"https://github.com/bryik/automatic-hirise","last_synced_at":"2026-05-01T20:31:16.935Z","repository":{"id":70396708,"uuid":"163553820","full_name":"bryik/automatic-hirise","owner":"bryik","description":"A *somewhat* automatic way of displaying HIRISE terrain models in 3D.","archived":false,"fork":false,"pushed_at":"2019-04-04T01:58:01.000Z","size":991,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T05:57:02.359Z","etag":null,"topics":["bash","gdal","gis","mars","threejs"],"latest_commit_sha":null,"homepage":"https://bryik.github.io/automatic-hirise/","language":"Shell","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/bryik.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,"governance":null}},"created_at":"2018-12-30T01:44:35.000Z","updated_at":"2019-04-04T02:10:15.000Z","dependencies_parsed_at":"2023-03-21T05:35:09.250Z","dependency_job_id":null,"html_url":"https://github.com/bryik/automatic-hirise","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"a237da547cbfdef2292cbbfc788982e25e1143a2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bryik/automatic-hirise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fautomatic-hirise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fautomatic-hirise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fautomatic-hirise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fautomatic-hirise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryik","download_url":"https://codeload.github.com/bryik/automatic-hirise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fautomatic-hirise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","gdal","gis","mars","threejs"],"created_at":"2024-11-19T01:18:11.103Z","updated_at":"2026-05-01T20:31:16.904Z","avatar_url":"https://github.com/bryik.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# automatic-hirise\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"hypanis.png\" width=\"600px\" height=\"600px\" /\u003e\n\u003c/p\u003e\n\nThis repo contains two bash scrips and some HTML/JS useful for displaying [HIRISE digital terrain models (DTMs)](https://www.uahirise.org/dtm/) in the browser.\n\nThe goal is to automate away the [somewhat obscure knowledge](http://blog.mastermaps.com/2013/10/terrain-building-with-threejs-part-1.html) needed to:\n\n- convert DTMs from .IMG to ENVI binaries with [gdal](https://www.gdal.org/)\n- render the results with [three.js](https://threejs.org/)\n\nIf all the requirements are met, displaying terrain in 3D is as easy as dropping a DTM (e.g. hypanis.IMG) into the root directory and executing:\n\n```bash\n./scripts/convert.sh hypanis.IMG \u0026\u0026 ./scripts/serve.sh\n```\n\n### Demo\n\nA pre-converted binary of [Hypanis Vallis](https://www.uahirise.org/dtm/dtm.php?ID=ESP_037651_1920) has been left in the docs directory (`./docs/hypanis.bin`).\n\nTo view it online, [click here](https://bryik.github.io/automatic-hirise/).\n\nTo view it locally, execute:\n\n```bash\n./scripts/serve.sh\n```\n\nand visit [http://localhost:8000](http://localhost:8000).\n\n## Requirements\n\n- bash (tested on Ubuntu via Windows' WSL)\n- gdal ([install instructions](https://stackoverflow.com/a/41613466/6591491))\n- python3\n- a web browser (tested on Chrome)\n\n## Instructions\n\n1. Download a [DTM from the Lunar \u0026 Planetary Laboratory](https://www.uahirise.org/dtm/). The file extension should be \".IMG\".\n\n2. Place the .IMG file in the same directory as this README.md file.\n\n3. Open a terminal in this directory and execute:\n\n```bash\n./scripts/convert.sh hypanis.IMG\n```\n\nReplacing \"hypanis\" with the name of the file you downloaded in step 1. This runs the `convert.sh` script which uses `gdalinfo` and `gdal_translate` to convert the .IMG file into a binary UInt16 array of elevation data. It also outputs a \"terrainInfo.json\" file containing metadata needed to reconstruct the terrain as a THREE.js plane geometry.\n\nThe output should be something like:\n\n```bash\n.../automatic-hirise $ ./scripts/convert.sh hypanis.IMG\nStarting conversion of \"hypanis.IMG\"\nSize is 6509 x 14043 (pixels squared)\nOutput file will be 65 x 140 (pixels squared)\nElevation interval is [-2727.999, -2473.162]\nConverting to hypanis.bin, placing it in ./docs/\nInput file size is 6509, 14043\n0...10...20...30...40...50...60...70...80...90...100 - done.\nOutputting terrainInfo.json to ./docs/\n\n~~~~~~~~~~~~~~~~~~~~~\n~  Great success!!  ~\n~~~~~~~~~~~~~~~~~~~~~\n```\n\n4. Now execute the second script to setup a local server (serving from `./docs`).\n\n```bash\n./scripts/serve.sh\n```\n\nThe output should be:\n\n```bash\n.../automatic-hirise $ ./scripts/serve.sh\nView terrain here: http://localhost:8000\n~~~~~~~~~~~~~~\nPress \"CTRL-C\" to quit.\n\nServing HTTP on 0.0.0.0 port 8000 ...\n```\n\nClick the link to see your terrain in 3D. If your terminal does not support clickable links, then open a new browser window and type the address in.\n\nIf all went well, you should see a black wireframe terrain model.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Fautomatic-hirise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryik%2Fautomatic-hirise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Fautomatic-hirise/lists"}