{"action":"created","comment":{"url":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/47918885","id":47918885,"diff_hunk":"@@ -150,6 +150,45 @@ class GeographyPointValue {\n         return oss.str();\n     }\n \n+    std::string formatLngLat() const{\n+        std::ostringstream oss;\n+        oss << toString(m_longitude) << \" \" << toString(m_latitude);\n+        return oss.str();\n+    }\n+\n+    std::string toWKT() const {\n+        std::ostringstream oss;\n+        oss <<\"Point (\" << formatLngLat() << \")\";\n+        return oss.str();\n+    }\n+\n+private:\n+    // converts double value to string with specified precision displaying\n+    // only significant decimal value.\n+    // Output pattern is similar to \"...##0.0##...\"\n+    std::string toString(double number, int decimalPrecision=12) const {\n+        double decimalNumber;\n+        char buffer[32];\n+\n+        // provided precision should be less than that can survive roundtrip of double -> text -> double\n+#if __cplusplus > 199711L\n+        // if platform supports C++11\n+        assert(decimalPrecision <= std::numeric_limits< double >::max_digits10);\n+#else\n+        assert(decimalPrecision <= 17);\n+#endif\n+\n+        decimalNumber = number - floor(number);","path":"src/ee/common/GeographyPointValue.hpp","position":32,"original_position":32,"commit_id":"68f473b21731e06f598c9e2d8179d641ac5f9189","original_commit_id":"68f473b21731e06f598c9e2d8179d641ac5f9189","user":{"login":"hhakimi53","id":13318654,"avatar_url":"https://avatars.githubusercontent.com/u/13318654?v=3","gravatar_id":"","url":"https://api.github.com/users/hhakimi53","html_url":"https://github.com/hhakimi53","followers_url":"https://api.github.com/users/hhakimi53/followers","following_url":"https://api.github.com/users/hhakimi53/following{/other_user}","gists_url":"https://api.github.com/users/hhakimi53/gists{/gist_id}","starred_url":"https://api.github.com/users/hhakimi53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhakimi53/subscriptions","organizations_url":"https://api.github.com/users/hhakimi53/orgs","repos_url":"https://api.github.com/users/hhakimi53/repos","events_url":"https://api.github.com/users/hhakimi53/events{/privacy}","received_events_url":"https://api.github.com/users/hhakimi53/received_events","type":"User","site_admin":false},"body":"Looked into boost::format api's and there is equivalent version of printf() with some restrictions. With boost::format() also we will have to handle case whether number has any significant decimal digit or not  (like 3.0) so that we can represent co-ordinates format equivalent to Java's DecimalFormat(##0.0###########);. If we choose DecimalFormat(##0.############) as our representation, than we don't have to this logic in here and can simplify above logic. \r\n\r\nDo we want to switch our co-ordinate format to DecimalFormat(##0.############) from DecimalFormat(##0.0###########)?","created_at":"2015-12-17T15:32:01Z","updated_at":"2015-12-17T15:32:01Z","html_url":"https://github.com/VoltDB/voltdb/pull/3092#discussion_r47918885","pull_request_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092","_links":{"self":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/47918885"},"html":{"href":"https://github.com/VoltDB/voltdb/pull/3092#discussion_r47918885"},"pull_request":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092"}}},"pull_request":{"url":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092","id":53890902,"html_url":"https://github.com/VoltDB/voltdb/pull/3092","diff_url":"https://github.com/VoltDB/voltdb/pull/3092.diff","patch_url":"https://github.com/VoltDB/voltdb/pull/3092.patch","issue_url":"https://api.github.com/repos/VoltDB/voltdb/issues/3092","number":3092,"state":"open","locked":false,"title":"Eng 9304 geo astext","user":{"login":"hhakimi53","id":13318654,"avatar_url":"https://avatars.githubusercontent.com/u/13318654?v=3","gravatar_id":"","url":"https://api.github.com/users/hhakimi53","html_url":"https://github.com/hhakimi53","followers_url":"https://api.github.com/users/hhakimi53/followers","following_url":"https://api.github.com/users/hhakimi53/following{/other_user}","gists_url":"https://api.github.com/users/hhakimi53/gists{/gist_id}","starred_url":"https://api.github.com/users/hhakimi53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhakimi53/subscriptions","organizations_url":"https://api.github.com/users/hhakimi53/orgs","repos_url":"https://api.github.com/users/hhakimi53/repos","events_url":"https://api.github.com/users/hhakimi53/events{/privacy}","received_events_url":"https://api.github.com/users/hhakimi53/received_events","type":"User","site_admin":false},"body":"Add support for geo function asText() - converts geo types to wkt. WKT output presents longitude and latitude to decimal numbers to significant 12 digits.\r\n\r\nTesting:\r\n- Currently running Jenkins job","created_at":"2015-12-16T20:03:45Z","updated_at":"2015-12-17T15:32:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fec1fa8aa2836dcc130bfea250b1244d68b988f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092/commits","review_comments_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092/comments","review_comment_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/issues/3092/comments","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/68f473b21731e06f598c9e2d8179d641ac5f9189","head":{"label":"VoltDB:ENG-9304-geo-astext","ref":"ENG-9304-geo-astext","sha":"68f473b21731e06f598c9e2d8179d641ac5f9189","user":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"repo":{"id":2445970,"name":"voltdb","full_name":"VoltDB/voltdb","owner":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VoltDB/voltdb","description":"VoltDB","fork":false,"url":"https://api.github.com/repos/VoltDB/voltdb","forks_url":"https://api.github.com/repos/VoltDB/voltdb/forks","keys_url":"https://api.github.com/repos/VoltDB/voltdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoltDB/voltdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoltDB/voltdb/teams","hooks_url":"https://api.github.com/repos/VoltDB/voltdb/hooks","issue_events_url":"https://api.github.com/repos/VoltDB/voltdb/issues/events{/number}","events_url":"https://api.github.com/repos/VoltDB/voltdb/events","assignees_url":"https://api.github.com/repos/VoltDB/voltdb/assignees{/user}","branches_url":"https://api.github.com/repos/VoltDB/voltdb/branches{/branch}","tags_url":"https://api.github.com/repos/VoltDB/voltdb/tags","blobs_url":"https://api.github.com/repos/VoltDB/voltdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoltDB/voltdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoltDB/voltdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoltDB/voltdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/{sha}","languages_url":"https://api.github.com/repos/VoltDB/voltdb/languages","stargazers_url":"https://api.github.com/repos/VoltDB/voltdb/stargazers","contributors_url":"https://api.github.com/repos/VoltDB/voltdb/contributors","subscribers_url":"https://api.github.com/repos/VoltDB/voltdb/subscribers","subscription_url":"https://api.github.com/repos/VoltDB/voltdb/subscription","commits_url":"https://api.github.com/repos/VoltDB/voltdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoltDB/voltdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoltDB/voltdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/VoltDB/voltdb/contents/{+path}","compare_url":"https://api.github.com/repos/VoltDB/voltdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoltDB/voltdb/merges","archive_url":"https://api.github.com/repos/VoltDB/voltdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoltDB/voltdb/downloads","issues_url":"https://api.github.com/repos/VoltDB/voltdb/issues{/number}","pulls_url":"https://api.github.com/repos/VoltDB/voltdb/pulls{/number}","milestones_url":"https://api.github.com/repos/VoltDB/voltdb/milestones{/number}","notifications_url":"https://api.github.com/repos/VoltDB/voltdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoltDB/voltdb/labels{/name}","releases_url":"https://api.github.com/repos/VoltDB/voltdb/releases{/id}","created_at":"2011-09-23T18:46:12Z","updated_at":"2015-12-16T10:27:40Z","pushed_at":"2015-12-17T03:36:22Z","git_url":"git://github.com/VoltDB/voltdb.git","ssh_url":"git@github.com:VoltDB/voltdb.git","clone_url":"https://github.com/VoltDB/voltdb.git","svn_url":"https://github.com/VoltDB/voltdb","homepage":"http://community.voltdb.com/","size":486674,"stargazers_count":691,"watchers_count":691,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":208,"mirror_url":null,"open_issues_count":33,"forks":208,"open_issues":33,"watchers":691,"default_branch":"master"}},"base":{"label":"VoltDB:ENG-8859-geospatial","ref":"ENG-8859-geospatial","sha":"ea5cfd489e31d2b021a926fb25f8c317fea6b14d","user":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"repo":{"id":2445970,"name":"voltdb","full_name":"VoltDB/voltdb","owner":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VoltDB/voltdb","description":"VoltDB","fork":false,"url":"https://api.github.com/repos/VoltDB/voltdb","forks_url":"https://api.github.com/repos/VoltDB/voltdb/forks","keys_url":"https://api.github.com/repos/VoltDB/voltdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoltDB/voltdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoltDB/voltdb/teams","hooks_url":"https://api.github.com/repos/VoltDB/voltdb/hooks","issue_events_url":"https://api.github.com/repos/VoltDB/voltdb/issues/events{/number}","events_url":"https://api.github.com/repos/VoltDB/voltdb/events","assignees_url":"https://api.github.com/repos/VoltDB/voltdb/assignees{/user}","branches_url":"https://api.github.com/repos/VoltDB/voltdb/branches{/branch}","tags_url":"https://api.github.com/repos/VoltDB/voltdb/tags","blobs_url":"https://api.github.com/repos/VoltDB/voltdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoltDB/voltdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoltDB/voltdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoltDB/voltdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/{sha}","languages_url":"https://api.github.com/repos/VoltDB/voltdb/languages","stargazers_url":"https://api.github.com/repos/VoltDB/voltdb/stargazers","contributors_url":"https://api.github.com/repos/VoltDB/voltdb/contributors","subscribers_url":"https://api.github.com/repos/VoltDB/voltdb/subscribers","subscription_url":"https://api.github.com/repos/VoltDB/voltdb/subscription","commits_url":"https://api.github.com/repos/VoltDB/voltdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoltDB/voltdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoltDB/voltdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/VoltDB/voltdb/contents/{+path}","compare_url":"https://api.github.com/repos/VoltDB/voltdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoltDB/voltdb/merges","archive_url":"https://api.github.com/repos/VoltDB/voltdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoltDB/voltdb/downloads","issues_url":"https://api.github.com/repos/VoltDB/voltdb/issues{/number}","pulls_url":"https://api.github.com/repos/VoltDB/voltdb/pulls{/number}","milestones_url":"https://api.github.com/repos/VoltDB/voltdb/milestones{/number}","notifications_url":"https://api.github.com/repos/VoltDB/voltdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoltDB/voltdb/labels{/name}","releases_url":"https://api.github.com/repos/VoltDB/voltdb/releases{/id}","created_at":"2011-09-23T18:46:12Z","updated_at":"2015-12-16T10:27:40Z","pushed_at":"2015-12-17T03:36:22Z","git_url":"git://github.com/VoltDB/voltdb.git","ssh_url":"git@github.com:VoltDB/voltdb.git","clone_url":"https://github.com/VoltDB/voltdb.git","svn_url":"https://github.com/VoltDB/voltdb","homepage":"http://community.voltdb.com/","size":486674,"stargazers_count":691,"watchers_count":691,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":208,"mirror_url":null,"open_issues_count":33,"forks":208,"open_issues":33,"watchers":691,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092"},"html":{"href":"https://github.com/VoltDB/voltdb/pull/3092"},"issue":{"href":"https://api.github.com/repos/VoltDB/voltdb/issues/3092"},"comments":{"href":"https://api.github.com/repos/VoltDB/voltdb/issues/3092/comments"},"review_comments":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092/comments"},"review_comment":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/3092/commits"},"statuses":{"href":"https://api.github.com/repos/VoltDB/voltdb/statuses/68f473b21731e06f598c9e2d8179d641ac5f9189"}}}}