{"id":37103781,"url":"https://github.com/petoc/elevation","last_synced_at":"2026-01-14T12:33:28.151Z","repository":{"id":64303891,"uuid":"282197789","full_name":"petoc/elevation","owner":"petoc","description":"Simple elevation API reading data from SRTM HGT files.","archived":false,"fork":false,"pushed_at":"2023-06-30T12:20:32.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T03:39:29.309Z","etag":null,"topics":["api","elevation","go","golang","hgt","srtm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-24T11:05:31.000Z","updated_at":"2023-03-02T13:35:39.000Z","dependencies_parsed_at":"2024-06-20T02:56:33.064Z","dependency_job_id":"f3409032-0c83-4ece-b5d6-51cef928ca6c","html_url":"https://github.com/petoc/elevation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/petoc/elevation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petoc%2Felevation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petoc%2Felevation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petoc%2Felevation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petoc%2Felevation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petoc","download_url":"https://codeload.github.com/petoc/elevation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petoc%2Felevation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","elevation","go","golang","hgt","srtm"],"created_at":"2026-01-14T12:33:27.587Z","updated_at":"2026-01-14T12:33:28.142Z","avatar_url":"https://github.com/petoc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elevation API\n\nSimple elevation API reading data from SRTM HGT files.\n\n## Supported data\n\n- 30m (1 arc second)\n- 90m (3 arc seconds)\n\n## Usage\n\nBuild Docker image.\n\n```sh\ndocker build -t elevation:latest .\n```\n\nStart container with mounted directory containing SRTM HGT files.\n\n```sh\ndocker run --name elevation -v $(pwd)/data:/opt/elevation/data -p 127.0.0.1:8080:8080 -d elevation:latest\n```\n\n### Request\n\nDue to limitations in query length, POST method should be used for large requests.\n\n#### GET\n\nCoordinate order is latitude,longitude.\n\n```sh\ncurl -v 'http://127.0.0.1:8080/json?locations=48.1234,21.1234|49.12,22.12|1,1'\n```\n\n#### POST\n\n```sh\ncurl -v -X POST \\\n    -H 'Content-Type: application/json'\n    -d '{\"locations\":[{\"latitude\":48.1234,\"longitude\":21.1234},{\"latitude\":49.12,\"longitude\":22.12},{\"latitude\":1,\"longitude\":1}]}' \\\n    'http://127.0.0.1:8080/json'\n```\n\n### Response\n\n- elevation is in meters\n- resolution is in arc seconds (1 - 30m, 3 - 90m)\n- for location with unknown elevation (missing data file, location out of SRTM range, void) parameter \"error\" with value 404 will appear in result object.\n\n```json\n{\n    \"result\": [\n        {\n            \"latitude\": 48.1234,\n            \"longitude\": 21.1234,\n            \"elevation\": 103,\n            \"resolution\": 1\n        },\n        {\n            \"latitude\": 49.12,\n            \"longitude\": 22.12,\n            \"elevation\": 420,\n            \"resolution\": 1\n        },\n        {\n            \"latitude\": 1,\n            \"longitude\": 1,\n            \"error\": 404\n        }\n    ]\n}\n```\n\n## License\n\nLicensed under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetoc%2Felevation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetoc%2Felevation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetoc%2Felevation/lists"}