{"action":"created","comment":{"url":"https://api.github.com/repos/cgeo/cgeo/pulls/comments/70895244","id":70895244,"diff_hunk":"@@ -0,0 +1,112 @@\n+package cgeo.geocaching.location;\n+\n+import org.junit.Assert;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.junit.runners.Parameterized;\n+\n+import java.util.Arrays;\n+import java.util.Collection;\n+\n+/**\n+ * Test the UTMConverter class with testcases from an Excel sheet provided here: http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.htm\n+ *\n+ * Other Tools to verify results:\n+ * Online Batch Converter: http://www.hamstermap.com/\n+ * http://www.latlong.net/lat-long-utm.html\n+ * http://www.rcn.montana.edu/resources/converter.aspx\n+ * http://www.synnatschke.de/geo-tools/coordinate-converter.php\n+ */\n+@RunWith(Parameterized.class)\n+public class UTMConverterTest {\n+\n+    @Parameterized.Parameters\n+    public static Collection<Object[]> data() {\n+        System.out.println(\"lat, lon; expected easting, northing; result easting, northing; diff easting, northing\");\n+        return Arrays.asList(new Object[][]{\n+                {84d, 102d, 48, \"X\", 465005.34493d, 9329005.2d},\n+                {51d, 60d, 41, \"U\", 289511.142963d, 5654109.2d},\n+                {37d, 151d, 56, \"S\", 322037.81022d, 4096742.1d},\n+                {24d, 14d, 33, \"R\", 398285.44617d, 2654587.6d},\n+                {-21d, 17d, 33, \"K\", 707889.2160d, 7676551.7d},\n+                {-36d, 85d, 45, \"H\", 319733.3418d, 6014201.8d},\n+                {-50d, 117d, 50, \"F\", 500000d, 4461369.3d},\n+                {-68d, 146d, 55, \"D\", 458196.7256d, 2456797.5d},\n+                {-81d, 171d, 59, \"Z\", 500000d, 1006795.6d},\n+                {-83d, -12d, 29, \"Z\", 459200.2563d, 782480.6d},\n+                {-61d, -164d, 3, \"E\", 554084.38101d, 3236799.8d},\n+                {-43d, -92d, 15, \"G\", 581508.6478d, 5238700.1d},\n+                {-21d, -53d, 22, \"K\", 292110.7839d, 7676551.7d},\n+                {15d, -33d, 25, \"P\", 500000d, 1658326.0d},\n+                {32d, -122d, 10, \"S\", 594457.4634d, 3540872.5d},\n+                {57d, -82d, 17, \"V\", 439253.3763d, 6317830.5d},\n+                {74d, -177d, 1, \"X\", 500000d, 8212038.1d},\n+                {-55.98d, -67.28917d, 19, \"F\", 606750d, 3794825d},\n+                {-61.453333d, -55.495752d, 21, \"E\", 580191d, 3185792d},\n+                {37.81972d, -122.47861d, 10, \"S\", 545889d, 4185941d},\n+                {40.713d, -74.0135d, 18, \"T\", 583326d, 4507366d},\n+                {3.15785d, 101.71165d, 47, \"N\", 801396d, 349434d},\n+                {27.98806d, 86.92528d, 45, \"R\", 492652d, 3095881d},\n+                {-3.07583d, 37.35333d, 37, \"M\", 317004d, 9659884d},\n+                {25.19714d, 55.27411d, 40, \"R\", 326103d, 2787892d},\n+                {41.00855d, 28.97994d, 35, \"T\", 666499d, 4541594d},\n+                {41.90222d, 12.45333d, 33, \"T\", 288761d, 4642057d},\n+                {48.85822d, 2.2945d, 31, \"U\", 448252d, 5411935d},\n+                {71.1725d, 25.78444d, 35, \"W\", 456220d, 7897075d},\n+                {-34.35806d, 18.47194d, 34, \"H\", 267496d, 6195246d},\n+                {83.627d, -32.664d, 25, \"X\", 504163.90d, 9286465.67d},\n+                {-55.98d, -67.28917d, 19, \"F\", 606750d, 3794825d},\n+                {-61.453333d, -55.495752d, 21, \"E\", 580191d, 3185792},\n+                {37.81972d, -122.47861d, 10, \"S\", 545889d, 4185941},\n+                {40.713d, -74.0135d, 18, \"T\", 583326d, 4507366},\n+                {3.15785d, 101.71165d, 47, \"N\", 801396d, 349434},\n+                {27.98806d, 86.92528d, 45, \"R\", 492652d, 3095881},\n+                {-3.07583d, 37.35333d, 37, \"M\", 317004d, 9659884},\n+                {25.19714d, 55.27411d, 40, \"R\", 326103d, 2787892},\n+                {41.00855d, 28.97994d, 35, \"T\", 666499d, 4541594},\n+                {41.90222d, 12.45333d, 33, \"T\", 288761d, 4642057},\n+                {48.85822d, 2.2945d, 31, \"U\", 448252d, 5411935},\n+                {71.1725d, 25.78444d, 35, \"W\", 456220d, 7897075},\n+                {-34.35806d, 18.47194d, 34, \"H\", 267496d, 6195246},\n+                {-13.16333d, -72.54556d, 18, \"L\", 766062d, 8543503},\n+                {-32.65343d, -70.01108d, 19, \"H\", 405179d, 6386681},\n+                {-43.59575d, 170.14104d, 59, \"G\", 430668d, 5172667},\n+                {-33.85867d, 151.21403d, 56, \"H\", 334786d, 6252080},\n+                {25.03361d, 121.565d, 51, \"R\", 355224d, 2769437},\n+                {35.35806d, 138.73111d, 54, \"S\", 293848d, 3915114},\n+                {56.05611d, 160.64417d, 57, \"V\", 602389d, 6213543},\n+                {71.38889d, -156.47917d, 4, \"W\", 589769d, 7922642},\n+                {21.365d, -157.95d, 4, \"Q\", 608862d, 2362907},\n+                {-27.11667d, -109.36667d, 12, \"J\", 661897d, 6999591},\n+                {-37.11111d, -12.28833d, 28, \"H\", 740947d, 5889360},\n+                {-77.85d, 166.66667d, 58, \"C\", 539154d, 1357814}\n+        });\n+    }\n+\n+    private final UTMConverter conv = new UTMConverter();\n+    private final double lat;","path":"tests/src/cgeo/geocaching/location/UTMConverterTest.java","position":87,"original_position":87,"commit_id":"0fd1864394c6f7a3242bdad331df5b361ccf5d34","original_commit_id":"0fd1864394c6f7a3242bdad331df5b361ccf5d34","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.](https://www.codacy.com/app/cgeo/cgeo/file/2998554852/issues/source?bid=3217125&fileBranchId=3425258#l87)","created_at":"2016-07-14T22:26:29Z","updated_at":"2016-07-14T22:26:29Z","html_url":"https://github.com/cgeo/cgeo/pull/5823#discussion_r70895244","pull_request_url":"https://api.github.com/repos/cgeo/cgeo/pulls/5823","_links":{"self":{"href":"https://api.github.com/repos/cgeo/cgeo/pulls/comments/70895244"},"html":{"href":"https://github.com/cgeo/cgeo/pull/5823#discussion_r70895244"},"pull_request":{"href":"https://api.github.com/repos/cgeo/cgeo/pulls/5823"}}},"pull_request":{"url":"https://api.github.com/repos/cgeo/cgeo/pulls/5823","id":77024081,"html_url":"https://github.com/cgeo/cgeo/pull/5823","diff_url":"https://github.com/cgeo/cgeo/pull/5823.diff","patch_url":"https://github.com/cgeo/cgeo/pull/5823.patch","issue_url":"https://api.github.com/repos/cgeo/cgeo/issues/5823","number":5823,"state":"open","locked":false,"title":"fix #1914 include UTM format in cache details","user":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"body":"Extended the `GeopointFormatter` and `CoordinatesFormatSwitcher` to support UTM coords.","created_at":"2016-07-11T21:11:46Z","updated_at":"2016-07-14T22:26:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcab4eb15a9de6c883f3d47ca41dcdd884177abb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cgeo/cgeo/pulls/5823/commits","review_comments_url":"https://api.github.com/repos/cgeo/cgeo/pulls/5823/comments","review_comment_url":"https://api.github.com/repos/cgeo/cgeo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cgeo/cgeo/issues/5823/comments","statuses_url":"https://api.github.com/repos/cgeo/cgeo/statuses/0fd1864394c6f7a3242bdad331df5b361ccf5d34","head":{"label":"pstorch:1914_utm_coordinates","ref":"1914_utm_coordinates","sha":"0fd1864394c6f7a3242bdad331df5b361ccf5d34","user":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"repo":{"id":49060755,"name":"cgeo","full_name":"pstorch/cgeo","owner":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pstorch/cgeo","description":"c:geo - The powerful Android geocaching app.","fork":true,"url":"https://api.github.com/repos/pstorch/cgeo","forks_url":"https://api.github.com/repos/pstorch/cgeo/forks","keys_url":"https://api.github.com/repos/pstorch/cgeo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pstorch/cgeo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pstorch/cgeo/teams","hooks_url":"https://api.github.com/repos/pstorch/cgeo/hooks","issue_events_url":"https://api.github.com/repos/pstorch/cgeo/issues/events{/number}","events_url":"https://api.github.com/repos/pstorch/cgeo/events","assignees_url":"https://api.github.com/repos/pstorch/cgeo/assignees{/user}","branches_url":"https://api.github.com/repos/pstorch/cgeo/branches{/branch}","tags_url":"https://api.github.com/repos/pstorch/cgeo/tags","blobs_url":"https://api.github.com/repos/pstorch/cgeo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pstorch/cgeo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pstorch/cgeo/git/refs{/sha}","trees_url":"https://api.github.com/repos/pstorch/cgeo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pstorch/cgeo/statuses/{sha}","languages_url":"https://api.github.com/repos/pstorch/cgeo/languages","stargazers_url":"https://api.github.com/repos/pstorch/cgeo/stargazers","contributors_url":"https://api.github.com/repos/pstorch/cgeo/contributors","subscribers_url":"https://api.github.com/repos/pstorch/cgeo/subscribers","subscription_url":"https://api.github.com/repos/pstorch/cgeo/subscription","commits_url":"https://api.github.com/repos/pstorch/cgeo/commits{/sha}","git_commits_url":"https://api.github.com/repos/pstorch/cgeo/git/commits{/sha}","comments_url":"https://api.github.com/repos/pstorch/cgeo/comments{/number}","issue_comment_url":"https://api.github.com/repos/pstorch/cgeo/issues/comments{/number}","contents_url":"https://api.github.com/repos/pstorch/cgeo/contents/{+path}","compare_url":"https://api.github.com/repos/pstorch/cgeo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pstorch/cgeo/merges","archive_url":"https://api.github.com/repos/pstorch/cgeo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pstorch/cgeo/downloads","issues_url":"https://api.github.com/repos/pstorch/cgeo/issues{/number}","pulls_url":"https://api.github.com/repos/pstorch/cgeo/pulls{/number}","milestones_url":"https://api.github.com/repos/pstorch/cgeo/milestones{/number}","notifications_url":"https://api.github.com/repos/pstorch/cgeo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pstorch/cgeo/labels{/name}","releases_url":"https://api.github.com/repos/pstorch/cgeo/releases{/id}","deployments_url":"https://api.github.com/repos/pstorch/cgeo/deployments","created_at":"2016-01-05T11:04:41Z","updated_at":"2016-01-11T21:30:26Z","pushed_at":"2016-07-14T22:23:57Z","git_url":"git://github.com/pstorch/cgeo.git","ssh_url":"git@github.com:pstorch/cgeo.git","clone_url":"https://github.com/pstorch/cgeo.git","svn_url":"https://github.com/pstorch/cgeo","homepage":"www.cgeo.org","size":234462,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cgeo:master","ref":"master","sha":"119f75b07f87e546f3d76c49491a62901816e0de","user":{"login":"cgeo","id":907088,"avatar_url":"https://avatars.githubusercontent.com/u/907088?v=3","gravatar_id":"","url":"https://api.github.com/users/cgeo","html_url":"https://github.com/cgeo","followers_url":"https://api.github.com/users/cgeo/followers","following_url":"https://api.github.com/users/cgeo/following{/other_user}","gists_url":"https://api.github.com/users/cgeo/gists{/gist_id}","starred_url":"https://api.github.com/users/cgeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgeo/subscriptions","organizations_url":"https://api.github.com/users/cgeo/orgs","repos_url":"https://api.github.com/users/cgeo/repos","events_url":"https://api.github.com/users/cgeo/events{/privacy}","received_events_url":"https://api.github.com/users/cgeo/received_events","type":"Organization","site_admin":false},"repo":{"id":2028724,"name":"cgeo","full_name":"cgeo/cgeo","owner":{"login":"cgeo","id":907088,"avatar_url":"https://avatars.githubusercontent.com/u/907088?v=3","gravatar_id":"","url":"https://api.github.com/users/cgeo","html_url":"https://github.com/cgeo","followers_url":"https://api.github.com/users/cgeo/followers","following_url":"https://api.github.com/users/cgeo/following{/other_user}","gists_url":"https://api.github.com/users/cgeo/gists{/gist_id}","starred_url":"https://api.github.com/users/cgeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgeo/subscriptions","organizations_url":"https://api.github.com/users/cgeo/orgs","repos_url":"https://api.github.com/users/cgeo/repos","events_url":"https://api.github.com/users/cgeo/events{/privacy}","received_events_url":"https://api.github.com/users/cgeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cgeo/cgeo","description":"c:geo - The powerful Android geocaching app.","fork":false,"url":"https://api.github.com/repos/cgeo/cgeo","forks_url":"https://api.github.com/repos/cgeo/cgeo/forks","keys_url":"https://api.github.com/repos/cgeo/cgeo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgeo/cgeo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgeo/cgeo/teams","hooks_url":"https://api.github.com/repos/cgeo/cgeo/hooks","issue_events_url":"https://api.github.com/repos/cgeo/cgeo/issues/events{/number}","events_url":"https://api.github.com/repos/cgeo/cgeo/events","assignees_url":"https://api.github.com/repos/cgeo/cgeo/assignees{/user}","branches_url":"https://api.github.com/repos/cgeo/cgeo/branches{/branch}","tags_url":"https://api.github.com/repos/cgeo/cgeo/tags","blobs_url":"https://api.github.com/repos/cgeo/cgeo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgeo/cgeo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgeo/cgeo/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgeo/cgeo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgeo/cgeo/statuses/{sha}","languages_url":"https://api.github.com/repos/cgeo/cgeo/languages","stargazers_url":"https://api.github.com/repos/cgeo/cgeo/stargazers","contributors_url":"https://api.github.com/repos/cgeo/cgeo/contributors","subscribers_url":"https://api.github.com/repos/cgeo/cgeo/subscribers","subscription_url":"https://api.github.com/repos/cgeo/cgeo/subscription","commits_url":"https://api.github.com/repos/cgeo/cgeo/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgeo/cgeo/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgeo/cgeo/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgeo/cgeo/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgeo/cgeo/contents/{+path}","compare_url":"https://api.github.com/repos/cgeo/cgeo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgeo/cgeo/merges","archive_url":"https://api.github.com/repos/cgeo/cgeo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgeo/cgeo/downloads","issues_url":"https://api.github.com/repos/cgeo/cgeo/issues{/number}","pulls_url":"https://api.github.com/repos/cgeo/cgeo/pulls{/number}","milestones_url":"https://api.github.com/repos/cgeo/cgeo/milestones{/number}","notifications_url":"https://api.github.com/repos/cgeo/cgeo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgeo/cgeo/labels{/name}","releases_url":"https://api.github.com/repos/cgeo/cgeo/releases{/id}","deployments_url":"https://api.github.com/repos/cgeo/cgeo/deployments","created_at":"2011-07-11T06:02:47Z","updated_at":"2016-07-13T09:39:35Z","pushed_at":"2016-07-14T22:23:59Z","git_url":"git://github.com/cgeo/cgeo.git","ssh_url":"git@github.com:cgeo/cgeo.git","clone_url":"https://github.com/cgeo/cgeo.git","svn_url":"https://github.com/cgeo/cgeo","homepage":"www.cgeo.org","size":244049,"stargazers_count":694,"watchers_count":694,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":450,"mirror_url":null,"open_issues_count":487,"forks":450,"open_issues":487,"watchers":694,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cgeo/cgeo/pulls/5823"},"html":{"href":"https://github.com/cgeo/cgeo/pull/5823"},"issue":{"href":"https://api.github.com/repos/cgeo/cgeo/issues/5823"},"comments":{"href":"https://api.github.com/repos/cgeo/cgeo/issues/5823/comments"},"review_comments":{"href":"https://api.github.com/repos/cgeo/cgeo/pulls/5823/comments"},"review_comment":{"href":"https://api.github.com/repos/cgeo/cgeo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cgeo/cgeo/pulls/5823/commits"},"statuses":{"href":"https://api.github.com/repos/cgeo/cgeo/statuses/0fd1864394c6f7a3242bdad331df5b361ccf5d34"}}}}
{"actor":{"display_login":"codacy-bot"}}