{"id":15448263,"url":"https://github.com/karthik-ir/locationhunter","last_synced_at":"2025-03-28T08:44:57.471Z","repository":{"id":82107588,"uuid":"123721593","full_name":"karthik-ir/LocationHunter","owner":"karthik-ir","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-04T05:47:36.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T09:29:56.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/karthik-ir.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":"2018-03-03T18:50:25.000Z","updated_at":"2018-03-03T18:50:52.000Z","dependencies_parsed_at":"2023-03-09T20:01:02.628Z","dependency_job_id":null,"html_url":"https://github.com/karthik-ir/LocationHunter","commit_stats":null,"previous_names":["exarix/locationhunter","karthik-ir/locationhunter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik-ir%2FLocationHunter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik-ir%2FLocationHunter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik-ir%2FLocationHunter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik-ir%2FLocationHunter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karthik-ir","download_url":"https://codeload.github.com/karthik-ir/LocationHunter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999320,"owners_count":20707554,"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":[],"created_at":"2024-10-01T20:23:00.165Z","updated_at":"2025-03-28T08:44:57.443Z","avatar_url":"https://github.com/karthik-ir.png","language":"Go","readme":"### Location Tracker\n\nRun the project using  `go install ./main/`\n\nRun the test coverage with `go test -coverprofile=main`\n\n##### Project walk through \n\n* Entry Point : `LocationHunter.go`\n\n* Heap implementation : `Heap.go` using \"container/heap\" \n\n* Distance Calculation: `DistanceCalculator.go`\n\n* Test case file: `location_hunter_test.go`\n\n* Interface `Datasource` is used to maintain consistency between custom implementations. \nTwo of sample implementations are as below :\n\n1. CSV processing Implementation: `FileProcessing.go`\n\n2. Mysql processing Implementation: `DatabaseProcessing.go`\n\n##### Commandline arguments \n\n1. `datasource` - use this to toggle between multiple implementations.\n                  For now its either `file` and `db`. Defaulting to `file`\n\n2. File properties\n    \n    a. `file` - Absolute path of the file\n    \n    b. `separator` - The csv seprator. By default `,`\n    \n    c. `strict` - `true` or `false` if false, bad lines in the file in between are ignored and processed further.\n\n3. DB Properties\n\n    a. `dbconnectionstring` - Defaults to `localhost:3306` used to connect to the database.\n    \n    b. `user` - username of the database\n    \n    c. `password` - password to connect to the datasource\n    \n    d. `database` - actual database name. \n    \n    e. `table` - Table name defaulting to `geoData`\n    \n4. Common properties\n\n    a. `lat` - Home latitude location to be searched with. Defaulting to `51.925146`\n    \n    b. `lng` - Home Longitude location. Defaulting to `4.478617`\n    \n    c. `top` - Search top `n` nearest location. Defaulting to `5`\n\n### Other notes:\n\nThe project uses `n` sized heaps in order to be able to calculate large data sets.\n\nThe top `n` nearest locations are displayed in the console at the end of the program. \n\n#sample output#\n\n```$xslt\nNumber: 1 Distance 0.33 Data: {51.9271671 4.4822171 442406} \n\nNumber: 2 Distance 0.53 Data: {51.9253559 4.4863098 285782} \n\nNumber: 3 Distance 0.65 Data: {51.92562969999999 4.4880344 429151} \n\nNumber: 4 Distance 0.74 Data: {51.9268152 4.489072 512818} \n\nNumber: 5 Distance 0.82 Data: {51.92491219999999 4.490593 25182} \n```\n\n\n*Assumptions* \n\n1. Database columns are id,lat,lng .\n2. Distance displayed in kilometers are the Earth radius is considered as `6371`, not taking in the other \nvariables in consideration.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthik-ir%2Flocationhunter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarthik-ir%2Flocationhunter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthik-ir%2Flocationhunter/lists"}