{"id":30313847,"url":"https://github.com/itinero/srtm","last_synced_at":"2025-08-17T18:08:22.574Z","repository":{"id":45090075,"uuid":"109858497","full_name":"itinero/srtm","owner":"itinero","description":"A library to load SRTM data and return heights in meter.","archived":false,"fork":false,"pushed_at":"2022-01-09T15:41:38.000Z","size":3279,"stargazers_count":21,"open_issues_count":10,"forks_count":12,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-08-01T04:46:49.415Z","etag":null,"topics":["csharp","itinero","srtm"],"latest_commit_sha":null,"homepage":"","language":"C#","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/itinero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-07T16:03:42.000Z","updated_at":"2025-07-29T18:58:51.000Z","dependencies_parsed_at":"2022-09-18T05:00:51.834Z","dependency_job_id":null,"html_url":"https://github.com/itinero/srtm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itinero/srtm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinero%2Fsrtm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinero%2Fsrtm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinero%2Fsrtm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinero%2Fsrtm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itinero","download_url":"https://codeload.github.com/itinero/srtm/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinero%2Fsrtm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270885502,"owners_count":24662466,"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-17T02:00:09.016Z","response_time":129,"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":["csharp","itinero","srtm"],"created_at":"2025-08-17T18:08:21.885Z","updated_at":"2025-08-17T18:08:22.554Z","avatar_url":"https://github.com/itinero.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SRTM\n\n[![build](https://github.com/itinero/srtm/actions/workflows/build.yml/badge.svg)](https://github.com/itinero/srtm/actions/workflows/build.yml)\n[![Join the chat at https://gitter.im/Itinero/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Itinero/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Visit our website](https://img.shields.io/badge/website-itinero.tech-020031.svg) ](http://www.itinero.tech/)\n[![](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/itinero/srtm/blob/master/LICENSE.md)\n\n- SRTM: [![NuGet Badge](https://buildstats.info/nuget/SRTM)](https://www.nuget.org/packages/SRTM/)\n\nA simple library to load SRTM data and return heights in _meter_ for a given lat/lon. Based on [Alpinechough.Srtm\n](https://github.com/alpinechough/Alpinechough.Srtm).\n\n## Usage\n\n```csharp\n// create a new srtm data instance.\n// it accepts a folder to download and cache data into in addition to the source you want to use for the data.\n// USGS data is immediately available, but is of a lower resolution.\nvar srtmData = new SRTMData(@\"/path/to/data/cache\", new USGSSource());\n// NASA data is of a higher resolution, but requires creating an account at https://urs.earthdata.nasa.gov/users/new/.\nvar credentials = new NetworkCredential(\"username\", \"password\");\nvar srtmData = new SRTMData(@\"/path/to/data/cache\", new NASASource(credentials));\n\n// get elevations for some locations\nint? elevation = srtmData.GetElevation(47.267222, 11.392778);\nConsole.WriteLine(\"Elevation of Innsbruck: {0}m\", elevation);\n\nelevation = srtmData.GetElevation(-16.5, -68.15);\nConsole.WriteLine(\"Elevation of La Paz: {0}m\", elevation);\n\nelevation = srtmData.GetElevation(27.702983735525862f, 85.2978515625f);\nConsole.WriteLine(\"Elevation of Kathmandu {0}m\", elevation);\n\nelevation = srtmData.GetElevation(21.030673628606102f, 105.853271484375f);\nConsole.WriteLine(\"Elevation of Ha Noi {0}m\", elevation);\n\n// if a smoother result is preferred, it is possible to use bilinear interpolation at the cost of some accuracy\ndouble? smoothElevation = srtmData.GetElevationBilinear(47.267222, 11.392778);\nConsole.WriteLine(\"Elevation of Innsbruck: {0}m\", elevation);\n\nsmoothElevation = srtmData.GetElevationBilinear(-16.5, -68.15);\nConsole.WriteLine(\"Elevation of La Paz: {0}m\", elevation);\n\nsmoothElevation = srtmData.GetElevationBilinear(27.702983735525862f, 85.2978515625f);\nConsole.WriteLine(\"Elevation of Kathmandu {0}m\", elevation);\n\nsmoothElevation = srtmData.GetElevationBilinear(21.030673628606102f, 105.853271484375f);\nConsole.WriteLine(\"Elevation of Ha Noi {0}m\", elevation);\n```\n\n## Data sources\n\nWe implemented two sources of data, the [USGS SRTM](https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/) and [NASA SRTM](https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/). If you want to add an extra source, we're accepting pull requests, you just need to implement [something like this](https://github.com/itinero/srtm/blob/master/src/SRTM/Sources/USGS/USGSSource.cs).\n\n## We need help!\n\nIf you think we need to add another source of data **let us know via the issues**, if you know more about SRTM or of another source of elevation, also **let us know**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinero%2Fsrtm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinero%2Fsrtm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinero%2Fsrtm/lists"}