{"id":18315174,"url":"https://github.com/kingakeem/go-dms","last_synced_at":"2025-04-05T19:35:04.557Z","repository":{"id":57491261,"uuid":"148859103","full_name":"KingAkeem/go-dms","owner":"KingAkeem","description":"A small library for converting Decimal Degrees to Degrees, Minutes, Seconds coordinates","archived":false,"fork":false,"pushed_at":"2023-09-25T20:16:17.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T09:35:16.110Z","etag":null,"topics":["conversion","coordinates","decimal-degrees","degrees-minutes-seconds","dms","geolocation","go","golang","map","navigation","positioning","wasm"],"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/KingAkeem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-09-15T01:45:44.000Z","updated_at":"2023-09-25T11:17:54.000Z","dependencies_parsed_at":"2022-08-29T20:31:43.047Z","dependency_job_id":"bb0ad1e2-440f-4a38-b4e5-6025093af8b7","html_url":"https://github.com/KingAkeem/go-dms","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"c7eabc466c2ac420bc893e850e3a7d772df7420c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingAkeem%2Fgo-dms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingAkeem%2Fgo-dms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingAkeem%2Fgo-dms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingAkeem%2Fgo-dms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KingAkeem","download_url":"https://codeload.github.com/KingAkeem/go-dms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393480,"owners_count":20931807,"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":["conversion","coordinates","decimal-degrees","degrees-minutes-seconds","dms","geolocation","go","golang","map","navigation","positioning","wasm"],"created_at":"2024-11-05T16:37:42.526Z","updated_at":"2025-04-05T19:35:04.259Z","avatar_url":"https://github.com/KingAkeem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-dms\nA small library for converting Decimal Degrees to Degrees, Minutes, Seconds coordinates\n\nEfficiently converting coordinates between DD and DMS\n\n## Installation\n\n`go get -u github.com/KingAkeem/go-dms/dms`\n\n**test.go:**\n```go\npackage main\n\nimport (\n    \"github.com/KingAkeem/go-dms/dms\"\n    \"fmt\"\n    \"time\"\n    \"log\"\n)\n\nfunc main() {\n    start := time.Now()\n    dmsCoordinate, err := dms.NewDMS(dms.LatLon{Latitude: 2.21893, Longitude: 1.213905})\n    if err != nil {\n        log.Fatal(err)\n    }\n    fmt.Printf(\"DMS coordinates: %+v\\n\", dmsCoordinate.String()) \n    end := time.Now()\n    fmt.Printf(\"Function took %f seconds.\\n\", end.Sub(start).Seconds())\n}\n```\n**\u003e\u003e go run test.go**\n\n**Output:**\n```\n    DMS coordinates:\n    2°13'8.148000\" N, 1°12'50.058000\" E\n    Function took 0.000049 seconds.\n```\n\n**\u003e\u003e GOOS=js GOARCH=wasm go run -exec=\"$(go env GOROOT)/misc/wasm/go_js_wasm_exec\" .** (Compiling as WebAssembly module for Node, run command in the same directory as `test.go`)\n\nGolang WebAssemlby Wiki: https://github.com/golang/go/wiki/WebAssembly\n\n**Output:**\n```\n    DMS coordinates:\n    2°13'8.148000\" N, 1°12'50.058000\" E\n    Function took 0.000478 seconds.\n```\n\n\n### [dms-js](https://github.com/WSDOT-GIS/dms-js)\n\n**index.js:**\n```javascript\nvar dms = require('dms-conversion');\nvar NanoTimer = require('nanotimer');\nvar timerObj = new NanoTimer();\n\nvar dmsTest = function() {\n    var coords = new dms.default(2.21893, 1.213905);\n    console.log('DMS Coordinates: ' + coords.toString());\n    return coords;\n};\n\nvar seconds = timerObj.time(dmsTest, \"\", 's')\nconsole.log('Function took ' + seconds + ' seconds.');\n```\n\n**\u003e\u003e node index.js**\n\n**Output:** \n```\n    DMS Coordinates: 2°13′8.147999999999422″ N, 1°12′50.058″ E\n    Function took 0.001828968 seconds.\n```\n\n\n### [formatcoords](https://github.com/nerik/formatcoords)\n\n**index.js:**\n```javascript\nvar formatcoords = require('formatcoords');\nvar NanoTimer = require('nanotimer');\nvar timerObj = new NanoTimer();\n\nvar dmsTest = function() {\n    var coords = formatcoords(2.21893, 1.213905);\n    console.log('DMS Coordinates: ' + coords.format());\n    return coords;\n};\n\nvar seconds = timerObj.time(dmsTest, \"\", 's')\nconsole.log('Function took ' + seconds + ' seconds.');\n```\n\n**\u003e\u003e node index.js**\n\n**Output:** \n```\nDMS Coordinates: 2° 13′ 8.14800″ N 1° 12′ 50.05800″ E\nFunction took 0.002745904 seconds.\n```\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingakeem%2Fgo-dms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingakeem%2Fgo-dms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingakeem%2Fgo-dms/lists"}