{"id":15645844,"url":"https://github.com/jaredly/terraform","last_synced_at":"2025-08-21T02:09:02.597Z","repository":{"id":66952904,"uuid":"185312590","full_name":"jaredly/terraform","owner":"jaredly","description":"rust + usgs data = 3d-printable models of mountains, canyons, etc.","archived":false,"fork":false,"pushed_at":"2022-04-24T22:07:39.000Z","size":3416,"stargazers_count":54,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-06T00:06:50.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/jaredly.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":"2019-05-07T03:16:29.000Z","updated_at":"2025-05-10T02:09:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"8379c41d-4194-4417-b2d4-16175d721082","html_url":"https://github.com/jaredly/terraform","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jaredly/terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fterraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fterraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fterraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fterraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredly","download_url":"https://codeload.github.com/jaredly/terraform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fterraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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":[],"created_at":"2024-10-03T12:10:14.302Z","updated_at":"2025-08-21T02:09:02.579Z","avatar_url":"https://github.com/jaredly.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Terraform: generate 3-d models of geographic terrain\n\n![splash screen](./assets/background.png)\n\n## Running:\n\n`topo.bin`\n\n## Dependencies\n\n- GDAL, which is a C library that will need to be installed separately. On macos, try `brew install gdal2` or `brew install gdal`.\n- Rust. This was developed with rustc 1.34.1 (2019-04-24), and cargo 1.34.0 (2019-04-01). It is probably compatible with some other versions.\n\n## Building\n\n`env GDAL_LIB_DIR=/usr/local/opt/gdal/lib/ cargo run --release` should do the trick.\n\nNote that because of the intensive numerical processing involved, doing a debug build will only result in sadness.\n\n## Use\n\nCheck out the blog post that I'm about to write.\n\n### Finding a Data Source\nThere are a number of free, public data sources out there with relatively\nhigh-resolution elevation data for various parts of the world. The one that's\neasiest to use, and conveniently doesn't require you to register, is the USGS\nNational Map (this only works if the area you're interested in is within the\nUS, however). It provides \"1/3 arc-second resolution\" -- e.g. an elevation\nreading for every 10 meters. [Here's a\nlink](https://viewer.nationalmap.gov/basic/?basemap=b1\u0026category=ned\u0026q=\u0026zoom=11\u0026bbox=-111.99426681,40.14528109,-111.23003036,40.59204857\u0026preview=\u0026avail=\u0026refpoly=)\nto the map viewer zoomed to Mount Timpanogos in Utah.\n\nThe other data source I looked at was the \"ALOS Global Digital Surface\nModel\", also referred to as the \"AW3D30\", which is provided by the Japanese\ngovernment, and has \"1 arc-second resolution\" data (every 30 meters), for the\nwhole world. You have to register with them to access it, but it's free \u0026\nfairly painless to do so. You register [at this\npage](https://www.eorc.jaxa.jp/ALOS/en/aw3d30/registration.htm), and then\nthey email you a password to use [on the map viewer\npage](https://www.eorc.jaxa.jp/ALOS/en/aw3d30/data/index.htm).\n\n### Importing elevation data\n\nIf you got the data from USGS National Map, you'll need to unzip the archive, and find the `.adf` file that's the largest (it wiwll probably look somelike like `x001001.adf`).\n\nIf you got the data from ALOS AW3D30, you'll want to open the `.tif` file that ends in `_DSM.tif`.\n\nOpen Terraform, click \"open file\", and select the `.adf` or `.tif` file that you want. If the program crashes, you probably picked an invalid file.\n\n### Crop to the section you care about\n\nCropping to a smaller rectangle than the full initial file allows Terraform to render at a higher resolution \u0026 show you more detail for the final cut.\n\n### Cut to a hexagon\n\nCurrently terraform only supports hexagons for the final cut, but I could imagine supporting cylinders, rectangles and triangles in the future.\n\n### Export!\n\nThis will generate a `.stl` mesh file, which can be imported into Blender, AutoCAD, FreeCAD, etc. for 3-d printing or (maybe) cnc routing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fterraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredly%2Fterraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fterraform/lists"}