{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/comments/33221506","id":33221506,"diff_hunk":"@@ -0,0 +1,72 @@\n+\n+# parameters used for distance calculations and coordinate system transforms\n+\n+#\n+# Ellipsoid\n+#\n+\n+immutable Ellipsoid\n+    a::Float64        # Semi-major axis\n+    b::Float64        # Semi-minor axis\n+    e²::Float64       # Eccentricity squared\n+    e′²::Float64      # Second eccentricity squared\n+end\n+\n+function Ellipsoid(; a::String=\"\", b::String=\"\", f_inv::String=\"\")\n+    if isempty(a) || isempty(b) == isempty(f_inv)\n+        throw(ArgumentError(\"Specify parameter 'a' and either 'b' or 'f_inv'\"))\n+    end\n+    if isempty(b)\n+        _ellipsoid_af(BigFloat(a), BigFloat(f_inv))\n+    else\n+        _ellipsoid_ab(BigFloat(a), BigFloat(b))\n+    end\n+end\n+\n+function _ellipsoid_ab(a::BigFloat, b::BigFloat)\n+    e² = (a^2 - b^2) / a^2\n+    e′² = (a^2 - b^2) / b^2\n+\n+    Ellipsoid(a, b, e², e′²)\n+end\n+function _ellipsoid_af(a::BigFloat, f_inv::BigFloat)\n+    b = a * (1 - inv(f_inv))\n+\n+    _ellipsoid_ab(a, b)\n+end\n+\n+# A few common Ellipsoids\n+\n+const eWGS84      = Ellipsoid(a = \"6378137.0\", f_inv = \"298.257223563\")\n+const eGRS80      = Ellipsoid(a = \"6378137.0\", f_inv = \"298.257222100882711243\") # f_inv derived\n+const eHayford    = Ellipsoid(a = \"6378388.0\", f_inv = \"297.0\")\n+const eClarke1866 = Ellipsoid(a = \"6378206.4\",   b = \"6356583.8\")\n+const eAiry       = Ellipsoid(a = \"6377563.396\", b = \"6356256.909\")\n+\n+#\n+# Datum\n+#\n+\n+abstract Datum\n+\n+# A few common datums\n+\n+# Default Datum: World Geodetic Coordinate System of 1984 (WGS 84)\n+immutable WGS84 <: Datum end\n+ellipsoid(::Type{WGS84}) = eWGS84\n+\n+\n+immutable ETRS89 <: Datum end\n+ellipsoid(::Type{ETRS89}) = eGRS80","path":"src/datum.jl","position":60,"original_position":60,"commit_id":"c8fd9ecccdbb55f7c976c2b9cadc5edc5416a192","original_commit_id":"c8fd9ecccdbb55f7c976c2b9cadc5edc5416a192","user":{"login":"yeesian","id":1231079,"avatar_url":"https://avatars.githubusercontent.com/u/1231079?v=3","gravatar_id":"","url":"https://api.github.com/users/yeesian","html_url":"https://github.com/yeesian","followers_url":"https://api.github.com/users/yeesian/followers","following_url":"https://api.github.com/users/yeesian/following{/other_user}","gists_url":"https://api.github.com/users/yeesian/gists{/gist_id}","starred_url":"https://api.github.com/users/yeesian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeesian/subscriptions","organizations_url":"https://api.github.com/users/yeesian/orgs","repos_url":"https://api.github.com/users/yeesian/repos","events_url":"https://api.github.com/users/yeesian/events{/privacy}","received_events_url":"https://api.github.com/users/yeesian/received_events","type":"User","site_admin":false},"body":"Thinking about it even more, it is exactly the design that Compose.jl settled on (by [parameterizing their Points by Measures](https://github.com/dcjones/Compose.jl/blob/26163d0bbf22c90de7e8f45a6d543a9fd0fe672c/src/measure.jl#L412-L415)). We'll probably need placeholders for unspecified Measures/Datums. But it might be a way to unify the various geometry types, rather than having to go through middle-man [conversion routines](https://github.com/yeesian/GeoConverters.jl/blob/master/src/compose.jl)).\r\n\r\nSounds like high-level architecting that might be hard to get buy-in from @dcjones and the JuliaGeometry ppl though.. I'll talk to them tomorrow and see.\r\n\r\ncc @sjkelly @SimonDanisch","created_at":"2015-06-25T04:25:19Z","updated_at":"2015-06-25T04:25:19Z","html_url":"https://github.com/JuliaGeo/Geodesy.jl/pull/11#discussion_r33221506","pull_request_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/comments/33221506"},"html":{"href":"https://github.com/JuliaGeo/Geodesy.jl/pull/11#discussion_r33221506"},"pull_request":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11","id":38493644,"html_url":"https://github.com/JuliaGeo/Geodesy.jl/pull/11","diff_url":"https://github.com/JuliaGeo/Geodesy.jl/pull/11.diff","patch_url":"https://github.com/JuliaGeo/Geodesy.jl/pull/11.patch","issue_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/11","number":11,"state":"open","locked":false,"title":"WIP: Parameterizing points on their coordinate system","user":{"login":"garborg","id":2823840,"avatar_url":"https://avatars.githubusercontent.com/u/2823840?v=3","gravatar_id":"","url":"https://api.github.com/users/garborg","html_url":"https://github.com/garborg","followers_url":"https://api.github.com/users/garborg/followers","following_url":"https://api.github.com/users/garborg/following{/other_user}","gists_url":"https://api.github.com/users/garborg/gists{/gist_id}","starred_url":"https://api.github.com/users/garborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garborg/subscriptions","organizations_url":"https://api.github.com/users/garborg/orgs","repos_url":"https://api.github.com/users/garborg/repos","events_url":"https://api.github.com/users/garborg/events{/privacy}","received_events_url":"https://api.github.com/users/garborg/received_events","type":"User","site_admin":false},"body":"Don't merge","created_at":"2015-06-24T22:13:56Z","updated_at":"2015-06-25T04:25:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1ddbd199b756eb2d12b11aab695a33b2f01c032","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11/commits","review_comments_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11/comments","review_comment_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/11/comments","statuses_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/statuses/c8fd9ecccdbb55f7c976c2b9cadc5edc5416a192","head":{"label":"JuliaGeo:xy","ref":"xy","sha":"c8fd9ecccdbb55f7c976c2b9cadc5edc5416a192","user":{"login":"JuliaGeo","id":10616454,"avatar_url":"https://avatars.githubusercontent.com/u/10616454?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaGeo","html_url":"https://github.com/JuliaGeo","followers_url":"https://api.github.com/users/JuliaGeo/followers","following_url":"https://api.github.com/users/JuliaGeo/following{/other_user}","gists_url":"https://api.github.com/users/JuliaGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaGeo/subscriptions","organizations_url":"https://api.github.com/users/JuliaGeo/orgs","repos_url":"https://api.github.com/users/JuliaGeo/repos","events_url":"https://api.github.com/users/JuliaGeo/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaGeo/received_events","type":"Organization","site_admin":false},"repo":{"id":29447144,"name":"Geodesy.jl","full_name":"JuliaGeo/Geodesy.jl","owner":{"login":"JuliaGeo","id":10616454,"avatar_url":"https://avatars.githubusercontent.com/u/10616454?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaGeo","html_url":"https://github.com/JuliaGeo","followers_url":"https://api.github.com/users/JuliaGeo/followers","following_url":"https://api.github.com/users/JuliaGeo/following{/other_user}","gists_url":"https://api.github.com/users/JuliaGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaGeo/subscriptions","organizations_url":"https://api.github.com/users/JuliaGeo/orgs","repos_url":"https://api.github.com/users/JuliaGeo/repos","events_url":"https://api.github.com/users/JuliaGeo/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaGeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaGeo/Geodesy.jl","description":"Work with points defined in various coordinate systems.","fork":false,"url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl","forks_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/forks","keys_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/teams","hooks_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/events","assignees_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/tags","blobs_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/subscription","commits_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/merges","archive_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/downloads","issues_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/releases{/id}","created_at":"2015-01-19T00:55:25Z","updated_at":"2015-04-17T21:36:44Z","pushed_at":"2015-06-24T22:13:57Z","git_url":"git://github.com/JuliaGeo/Geodesy.jl.git","ssh_url":"git@github.com:JuliaGeo/Geodesy.jl.git","clone_url":"https://github.com/JuliaGeo/Geodesy.jl.git","svn_url":"https://github.com/JuliaGeo/Geodesy.jl","homepage":null,"size":184,"stargazers_count":2,"watchers_count":2,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"JuliaGeo:master","ref":"master","sha":"f0900c243f58e8874d42270ab602951e3a2ca102","user":{"login":"JuliaGeo","id":10616454,"avatar_url":"https://avatars.githubusercontent.com/u/10616454?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaGeo","html_url":"https://github.com/JuliaGeo","followers_url":"https://api.github.com/users/JuliaGeo/followers","following_url":"https://api.github.com/users/JuliaGeo/following{/other_user}","gists_url":"https://api.github.com/users/JuliaGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaGeo/subscriptions","organizations_url":"https://api.github.com/users/JuliaGeo/orgs","repos_url":"https://api.github.com/users/JuliaGeo/repos","events_url":"https://api.github.com/users/JuliaGeo/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaGeo/received_events","type":"Organization","site_admin":false},"repo":{"id":29447144,"name":"Geodesy.jl","full_name":"JuliaGeo/Geodesy.jl","owner":{"login":"JuliaGeo","id":10616454,"avatar_url":"https://avatars.githubusercontent.com/u/10616454?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaGeo","html_url":"https://github.com/JuliaGeo","followers_url":"https://api.github.com/users/JuliaGeo/followers","following_url":"https://api.github.com/users/JuliaGeo/following{/other_user}","gists_url":"https://api.github.com/users/JuliaGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaGeo/subscriptions","organizations_url":"https://api.github.com/users/JuliaGeo/orgs","repos_url":"https://api.github.com/users/JuliaGeo/repos","events_url":"https://api.github.com/users/JuliaGeo/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaGeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaGeo/Geodesy.jl","description":"Work with points defined in various coordinate systems.","fork":false,"url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl","forks_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/forks","keys_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/teams","hooks_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/events","assignees_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/tags","blobs_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/subscription","commits_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/merges","archive_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/downloads","issues_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/releases{/id}","created_at":"2015-01-19T00:55:25Z","updated_at":"2015-04-17T21:36:44Z","pushed_at":"2015-06-24T22:13:57Z","git_url":"git://github.com/JuliaGeo/Geodesy.jl.git","ssh_url":"git@github.com:JuliaGeo/Geodesy.jl.git","clone_url":"https://github.com/JuliaGeo/Geodesy.jl.git","svn_url":"https://github.com/JuliaGeo/Geodesy.jl","homepage":null,"size":184,"stargazers_count":2,"watchers_count":2,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11"},"html":{"href":"https://github.com/JuliaGeo/Geodesy.jl/pull/11"},"issue":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/11"},"comments":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaGeo/Geodesy.jl/statuses/c8fd9ecccdbb55f7c976c2b9cadc5edc5416a192"}}}}