{"id":16085993,"url":"https://github.com/im7mortal/utm","last_synced_at":"2025-07-03T01:38:36.963Z","repository":{"id":57483325,"uuid":"46717774","full_name":"im7mortal/UTM","owner":"im7mortal","description":"Bidirectional UTM-WGS84 converter for golang :earth_africa: :globe_with_meridians:","archived":false,"fork":false,"pushed_at":"2024-12-17T01:46:39.000Z","size":95,"stargazers_count":47,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T05:27:28.875Z","etag":null,"topics":["geolocation","latitude","longitude","utm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/im7mortal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-11-23T12:05:51.000Z","updated_at":"2024-12-17T01:46:43.000Z","dependencies_parsed_at":"2024-06-18T22:35:16.063Z","dependency_job_id":"1b7844e2-edf9-439a-af72-4f9f64425658","html_url":"https://github.com/im7mortal/UTM","commit_stats":{"total_commits":94,"total_committers":4,"mean_commits":23.5,"dds":"0.42553191489361697","last_synced_commit":"44fa8681d421c35d7d2faa49e96b1b4fb0ea4a0b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/im7mortal/UTM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im7mortal%2FUTM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im7mortal%2FUTM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im7mortal%2FUTM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im7mortal%2FUTM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/im7mortal","download_url":"https://codeload.github.com/im7mortal/UTM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im7mortal%2FUTM/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263244844,"owners_count":23436480,"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":["geolocation","latitude","longitude","utm"],"created_at":"2024-10-09T13:10:05.183Z","updated_at":"2025-07-03T01:38:36.939Z","avatar_url":"https://github.com/im7mortal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/im7mortal/UTM.svg)](https://travis-ci.org/im7mortal/UTM)\n[![Coverage Status](https://coveralls.io/repos/im7mortal/UTM/badge.svg?branch=master)](https://coveralls.io/r/im7mortal/UTM?branch=master)\n[![GoDoc](https://godoc.org/github.com/im7mortal/UTM?status.svg)](https://godoc.org/github.com/im7mortal/UTM)\n\nUTM\n===\n\nBidirectional UTM-WGS84 converter for golang. It use logic from [UTM python version](https://pypi.python.org/pypi/utm)\nby Tobias Bieniek\n\nUsage\n-----\n\n\tgo get github.com/im7mortal/UTM\n\nConvert a latitude, longitude into an UTM coordinate\n\n```go\n    easting, northing, zoneNumber, zoneLetter, err := UTM.FromLatLon(40.71435, -74.00597, false)\n```\n\nConvert an UTM coordinate into a latitude, longitude.\n\n```go\n    latitude, longitude, err := UTM.ToLatLon(377486, 6296562, 30, \"V\")\n```\n\nSince the zone letter is not strictly needed for the conversion you may also\nthe ``northern`` parameter instead, which is a named parameter and can be set\nto either ``true`` or ``false``. In this case you should define fields clearly(!).\nYou can't set ZoneLetter or northern both.\n\n```go\n    latitude, longitude, err := UTM.ToLatLon(377486, 6296562, 30, \"\", false)\n```\n\nThe UTM coordinate system is explained on\nthis [Wikipedia page](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system)\n\nSpeed\n-----\n\n Benchmark            | Amount of iterations | Average speed \n----------------------|----------------------|---------------\n ToLatLon             | 10000000             | 123 ns/op     \n ToLatLonWithNorthern | 10000000             | 121 ns/op     \n FromLatLon           | 20000000             | 80.6 ns/op    \n\n\u003e go test -bench=.\n\nFull example\n-----------\n\n```go\npackage main\n\nimport (\n\t\"github.com/im7mortal/UTM\"\n\t\"fmt\"\n)\n\nfunc main() {\n\n\teasting, northing, zoneNumber, zoneLetter, err := UTM.FromLatLon(40.71435, -74.00597, false)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Println(\n\t\tfmt.Sprintf(\n\t\t\t\"Easting: %d; Northing: %d; ZoneNumber: %d; ZoneLetter: %s;\",\n\t\t\teasting,\n\t\t\tnorthing,\n\t\t\tzoneNumber,\n\t\t\tzoneLetter,\n\t\t))\n\n\teasting, northing, zoneNumber, zoneLetter, err = UTM.FromLatLon(40.71435, -74.00597, true)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Println(\n\t\tfmt.Sprintf(\n\t\t\t\"Easting: %d; Northing: %d; ZoneNumber: %d; ZoneLetter: %s;\",\n\t\t\teasting,\n\t\t\tnorthing,\n\t\t\tzoneNumber,\n\t\t\tzoneLetter,\n\t\t))\n\n\tlatitude, longitude, err := UTM.ToLatLon(377486, 6296562, 30, \"\", true)\n\tfmt.Println(fmt.Sprintf(\"Latitude: %.5f; Longitude: %.5f;\", latitude, longitude))\n\n\tlatitude, longitude, err = UTM.ToLatLon(377486, 6296562, 30, \"V\")\n\tfmt.Println(fmt.Sprintf(\"Latitude: %.5f; Longitude: %.5f;\", latitude, longitude))\n\n}\n\n```\n\nAuthors\n-------\n\n* Petr Lozhkin \u003cim7mortal@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim7mortal%2Futm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim7mortal%2Futm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim7mortal%2Futm/lists"}