{"action":"created","comment":{"url":"https://api.github.com/repos/finnishtransportagency/harja/pulls/comments/66562057","id":66562057,"diff_hunk":"@@ -5,9 +5,26 @@ INSERT INTO tieverkko (osoite3, tie, ajorata, osa, tiepiiri, tr_pituus, geometri\n \n -- name: hae-tr-osoite-valille\n -- hakee tierekisteriosoitteen kahden pisteen välille\n-SELECT *\n-FROM tierekisteriosoite_pisteille(ST_MakePoint(:x1, :y1) :: GEOMETRY,\n-                                  ST_MakePoint(:x2, :y2) :: GEOMETRY, CAST(:treshold AS INTEGER)) AS tr_osoite;\n+SELECT * FROM tierekisteriosoite_pisteille(\n+  ST_MakePoint(:x1, :y1) :: GEOMETRY,\n+  ST_MakePoint(:x2, :y2) :: GEOMETRY,\n+  :threshold::INTEGER) AS tr_osoite;\n+\n+-- name: hae-tr-osoite-valille*\n+-- hakee tierekisteriosoitteen kahden pisteen välille tai NULL jos ei löydy\n+SELECT * FROM yrita_tierekisteriosoite_pisteille(\n+  ST_MakePoint(:x1, :y1) :: GEOMETRY,\n+  ST_MakePoint(:x2, :y2) :: GEOMETRY,\n+  :threshold::INTEGER) AS tr_osoite;\n+\n+-- name: hae-tr-osoitteet-valeille\n+-- Hakee tierekisteriosoitteet annetuille pisteille.\n+-- Pisteet on string WKT geometrycollection pointeja. Jokaisen\n+-- kahden pisteen välille lasketaan osoite.\n+SELECT * FROM\n+  tierekisteriosoitteet_pisteille(ST_GeomFromText(:pisteet), :threshold::INTEGER)\n+   as vali(alku geometry, loppu geometry, geometria geometry);\n+","path":"src/clj/harja/kyselyt/tieverkko.sql","position":26,"original_position":26,"commit_id":"502a2a222024e73961f33706f64619bab8d89c56","original_commit_id":"502a2a222024e73961f33706f64619bab8d89c56","user":{"login":"mikkoronkkomaki","id":8558965,"avatar_url":"https://avatars.githubusercontent.com/u/8558965?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkoronkkomaki","html_url":"https://github.com/mikkoronkkomaki","followers_url":"https://api.github.com/users/mikkoronkkomaki/followers","following_url":"https://api.github.com/users/mikkoronkkomaki/following{/other_user}","gists_url":"https://api.github.com/users/mikkoronkkomaki/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkoronkkomaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkoronkkomaki/subscriptions","organizations_url":"https://api.github.com/users/mikkoronkkomaki/orgs","repos_url":"https://api.github.com/users/mikkoronkkomaki/repos","events_url":"https://api.github.com/users/mikkoronkkomaki/events{/privacy}","received_events_url":"https://api.github.com/users/mikkoronkkomaki/received_events","type":"User","site_admin":false},"body":"Nimi voisi viitata geometriaa, koska osoitetta oikeasti ei palauteta.","created_at":"2016-06-10T05:03:12Z","updated_at":"2016-06-10T05:03:12Z","html_url":"https://github.com/finnishtransportagency/harja/pull/17#discussion_r66562057","pull_request_url":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/finnishtransportagency/harja/pulls/comments/66562057"},"html":{"href":"https://github.com/finnishtransportagency/harja/pull/17#discussion_r66562057"},"pull_request":{"href":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17","id":73077066,"html_url":"https://github.com/finnishtransportagency/harja/pull/17","diff_url":"https://github.com/finnishtransportagency/harja/pull/17.diff","patch_url":"https://github.com/finnishtransportagency/harja/pull/17.patch","issue_url":"https://api.github.com/repos/finnishtransportagency/harja/issues/17","number":17,"state":"open","locked":false,"title":"HAR-2514 Reittitoteuma tx","user":{"login":"tatut","id":83725,"avatar_url":"https://avatars.githubusercontent.com/u/83725?v=3","gravatar_id":"","url":"https://api.github.com/users/tatut","html_url":"https://github.com/tatut","followers_url":"https://api.github.com/users/tatut/followers","following_url":"https://api.github.com/users/tatut/following{/other_user}","gists_url":"https://api.github.com/users/tatut/gists{/gist_id}","starred_url":"https://api.github.com/users/tatut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatut/subscriptions","organizations_url":"https://api.github.com/users/tatut/orgs","repos_url":"https://api.github.com/users/tatut/repos","events_url":"https://api.github.com/users/tatut/events{/privacy}","received_events_url":"https://api.github.com/users/tatut/received_events","type":"User","site_admin":false},"body":"Käytä tx yhteyttä reittitoteuman luonnissa. Tämä pitää testata kunnolla ennen mergeä. Varmistettava, että reittitoteumien kirjaaminen APIn kautta vielä toimii ja geometriat tulevat oikein.","created_at":"2016-06-08T16:19:10Z","updated_at":"2016-06-10T05:03:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d7d969953c806967b0a6a7d51af0776b17f086d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17/commits","review_comments_url":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17/comments","review_comment_url":"https://api.github.com/repos/finnishtransportagency/harja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/finnishtransportagency/harja/issues/17/comments","statuses_url":"https://api.github.com/repos/finnishtransportagency/harja/statuses/502a2a222024e73961f33706f64619bab8d89c56","head":{"label":"finnishtransportagency:reittitoteuma_tx","ref":"reittitoteuma_tx","sha":"502a2a222024e73961f33706f64619bab8d89c56","user":{"login":"finnishtransportagency","id":5737015,"avatar_url":"https://avatars.githubusercontent.com/u/5737015?v=3","gravatar_id":"","url":"https://api.github.com/users/finnishtransportagency","html_url":"https://github.com/finnishtransportagency","followers_url":"https://api.github.com/users/finnishtransportagency/followers","following_url":"https://api.github.com/users/finnishtransportagency/following{/other_user}","gists_url":"https://api.github.com/users/finnishtransportagency/gists{/gist_id}","starred_url":"https://api.github.com/users/finnishtransportagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnishtransportagency/subscriptions","organizations_url":"https://api.github.com/users/finnishtransportagency/orgs","repos_url":"https://api.github.com/users/finnishtransportagency/repos","events_url":"https://api.github.com/users/finnishtransportagency/events{/privacy}","received_events_url":"https://api.github.com/users/finnishtransportagency/received_events","type":"Organization","site_admin":false},"repo":{"id":59985646,"name":"harja","full_name":"finnishtransportagency/harja","owner":{"login":"finnishtransportagency","id":5737015,"avatar_url":"https://avatars.githubusercontent.com/u/5737015?v=3","gravatar_id":"","url":"https://api.github.com/users/finnishtransportagency","html_url":"https://github.com/finnishtransportagency","followers_url":"https://api.github.com/users/finnishtransportagency/followers","following_url":"https://api.github.com/users/finnishtransportagency/following{/other_user}","gists_url":"https://api.github.com/users/finnishtransportagency/gists{/gist_id}","starred_url":"https://api.github.com/users/finnishtransportagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnishtransportagency/subscriptions","organizations_url":"https://api.github.com/users/finnishtransportagency/orgs","repos_url":"https://api.github.com/users/finnishtransportagency/repos","events_url":"https://api.github.com/users/finnishtransportagency/events{/privacy}","received_events_url":"https://api.github.com/users/finnishtransportagency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/finnishtransportagency/harja","description":"Liikenneviraston Harja-projekti","fork":false,"url":"https://api.github.com/repos/finnishtransportagency/harja","forks_url":"https://api.github.com/repos/finnishtransportagency/harja/forks","keys_url":"https://api.github.com/repos/finnishtransportagency/harja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/finnishtransportagency/harja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/finnishtransportagency/harja/teams","hooks_url":"https://api.github.com/repos/finnishtransportagency/harja/hooks","issue_events_url":"https://api.github.com/repos/finnishtransportagency/harja/issues/events{/number}","events_url":"https://api.github.com/repos/finnishtransportagency/harja/events","assignees_url":"https://api.github.com/repos/finnishtransportagency/harja/assignees{/user}","branches_url":"https://api.github.com/repos/finnishtransportagency/harja/branches{/branch}","tags_url":"https://api.github.com/repos/finnishtransportagency/harja/tags","blobs_url":"https://api.github.com/repos/finnishtransportagency/harja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/finnishtransportagency/harja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/finnishtransportagency/harja/git/refs{/sha}","trees_url":"https://api.github.com/repos/finnishtransportagency/harja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/finnishtransportagency/harja/statuses/{sha}","languages_url":"https://api.github.com/repos/finnishtransportagency/harja/languages","stargazers_url":"https://api.github.com/repos/finnishtransportagency/harja/stargazers","contributors_url":"https://api.github.com/repos/finnishtransportagency/harja/contributors","subscribers_url":"https://api.github.com/repos/finnishtransportagency/harja/subscribers","subscription_url":"https://api.github.com/repos/finnishtransportagency/harja/subscription","commits_url":"https://api.github.com/repos/finnishtransportagency/harja/commits{/sha}","git_commits_url":"https://api.github.com/repos/finnishtransportagency/harja/git/commits{/sha}","comments_url":"https://api.github.com/repos/finnishtransportagency/harja/comments{/number}","issue_comment_url":"https://api.github.com/repos/finnishtransportagency/harja/issues/comments{/number}","contents_url":"https://api.github.com/repos/finnishtransportagency/harja/contents/{+path}","compare_url":"https://api.github.com/repos/finnishtransportagency/harja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/finnishtransportagency/harja/merges","archive_url":"https://api.github.com/repos/finnishtransportagency/harja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/finnishtransportagency/harja/downloads","issues_url":"https://api.github.com/repos/finnishtransportagency/harja/issues{/number}","pulls_url":"https://api.github.com/repos/finnishtransportagency/harja/pulls{/number}","milestones_url":"https://api.github.com/repos/finnishtransportagency/harja/milestones{/number}","notifications_url":"https://api.github.com/repos/finnishtransportagency/harja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/finnishtransportagency/harja/labels{/name}","releases_url":"https://api.github.com/repos/finnishtransportagency/harja/releases{/id}","deployments_url":"https://api.github.com/repos/finnishtransportagency/harja/deployments","created_at":"2016-05-30T06:26:27Z","updated_at":"2016-06-08T21:06:04Z","pushed_at":"2016-06-09T18:22:40Z","git_url":"git://github.com/finnishtransportagency/harja.git","ssh_url":"git@github.com:finnishtransportagency/harja.git","clone_url":"https://github.com/finnishtransportagency/harja.git","svn_url":"https://github.com/finnishtransportagency/harja","homepage":"","size":17907,"stargazers_count":3,"watchers_count":3,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"develop"}},"base":{"label":"finnishtransportagency:develop","ref":"develop","sha":"5226b337c743a4bc7f661efcb69adbf91a4effda","user":{"login":"finnishtransportagency","id":5737015,"avatar_url":"https://avatars.githubusercontent.com/u/5737015?v=3","gravatar_id":"","url":"https://api.github.com/users/finnishtransportagency","html_url":"https://github.com/finnishtransportagency","followers_url":"https://api.github.com/users/finnishtransportagency/followers","following_url":"https://api.github.com/users/finnishtransportagency/following{/other_user}","gists_url":"https://api.github.com/users/finnishtransportagency/gists{/gist_id}","starred_url":"https://api.github.com/users/finnishtransportagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnishtransportagency/subscriptions","organizations_url":"https://api.github.com/users/finnishtransportagency/orgs","repos_url":"https://api.github.com/users/finnishtransportagency/repos","events_url":"https://api.github.com/users/finnishtransportagency/events{/privacy}","received_events_url":"https://api.github.com/users/finnishtransportagency/received_events","type":"Organization","site_admin":false},"repo":{"id":59985646,"name":"harja","full_name":"finnishtransportagency/harja","owner":{"login":"finnishtransportagency","id":5737015,"avatar_url":"https://avatars.githubusercontent.com/u/5737015?v=3","gravatar_id":"","url":"https://api.github.com/users/finnishtransportagency","html_url":"https://github.com/finnishtransportagency","followers_url":"https://api.github.com/users/finnishtransportagency/followers","following_url":"https://api.github.com/users/finnishtransportagency/following{/other_user}","gists_url":"https://api.github.com/users/finnishtransportagency/gists{/gist_id}","starred_url":"https://api.github.com/users/finnishtransportagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnishtransportagency/subscriptions","organizations_url":"https://api.github.com/users/finnishtransportagency/orgs","repos_url":"https://api.github.com/users/finnishtransportagency/repos","events_url":"https://api.github.com/users/finnishtransportagency/events{/privacy}","received_events_url":"https://api.github.com/users/finnishtransportagency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/finnishtransportagency/harja","description":"Liikenneviraston Harja-projekti","fork":false,"url":"https://api.github.com/repos/finnishtransportagency/harja","forks_url":"https://api.github.com/repos/finnishtransportagency/harja/forks","keys_url":"https://api.github.com/repos/finnishtransportagency/harja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/finnishtransportagency/harja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/finnishtransportagency/harja/teams","hooks_url":"https://api.github.com/repos/finnishtransportagency/harja/hooks","issue_events_url":"https://api.github.com/repos/finnishtransportagency/harja/issues/events{/number}","events_url":"https://api.github.com/repos/finnishtransportagency/harja/events","assignees_url":"https://api.github.com/repos/finnishtransportagency/harja/assignees{/user}","branches_url":"https://api.github.com/repos/finnishtransportagency/harja/branches{/branch}","tags_url":"https://api.github.com/repos/finnishtransportagency/harja/tags","blobs_url":"https://api.github.com/repos/finnishtransportagency/harja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/finnishtransportagency/harja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/finnishtransportagency/harja/git/refs{/sha}","trees_url":"https://api.github.com/repos/finnishtransportagency/harja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/finnishtransportagency/harja/statuses/{sha}","languages_url":"https://api.github.com/repos/finnishtransportagency/harja/languages","stargazers_url":"https://api.github.com/repos/finnishtransportagency/harja/stargazers","contributors_url":"https://api.github.com/repos/finnishtransportagency/harja/contributors","subscribers_url":"https://api.github.com/repos/finnishtransportagency/harja/subscribers","subscription_url":"https://api.github.com/repos/finnishtransportagency/harja/subscription","commits_url":"https://api.github.com/repos/finnishtransportagency/harja/commits{/sha}","git_commits_url":"https://api.github.com/repos/finnishtransportagency/harja/git/commits{/sha}","comments_url":"https://api.github.com/repos/finnishtransportagency/harja/comments{/number}","issue_comment_url":"https://api.github.com/repos/finnishtransportagency/harja/issues/comments{/number}","contents_url":"https://api.github.com/repos/finnishtransportagency/harja/contents/{+path}","compare_url":"https://api.github.com/repos/finnishtransportagency/harja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/finnishtransportagency/harja/merges","archive_url":"https://api.github.com/repos/finnishtransportagency/harja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/finnishtransportagency/harja/downloads","issues_url":"https://api.github.com/repos/finnishtransportagency/harja/issues{/number}","pulls_url":"https://api.github.com/repos/finnishtransportagency/harja/pulls{/number}","milestones_url":"https://api.github.com/repos/finnishtransportagency/harja/milestones{/number}","notifications_url":"https://api.github.com/repos/finnishtransportagency/harja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/finnishtransportagency/harja/labels{/name}","releases_url":"https://api.github.com/repos/finnishtransportagency/harja/releases{/id}","deployments_url":"https://api.github.com/repos/finnishtransportagency/harja/deployments","created_at":"2016-05-30T06:26:27Z","updated_at":"2016-06-08T21:06:04Z","pushed_at":"2016-06-09T18:22:40Z","git_url":"git://github.com/finnishtransportagency/harja.git","ssh_url":"git@github.com:finnishtransportagency/harja.git","clone_url":"https://github.com/finnishtransportagency/harja.git","svn_url":"https://github.com/finnishtransportagency/harja","homepage":"","size":17907,"stargazers_count":3,"watchers_count":3,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17"},"html":{"href":"https://github.com/finnishtransportagency/harja/pull/17"},"issue":{"href":"https://api.github.com/repos/finnishtransportagency/harja/issues/17"},"comments":{"href":"https://api.github.com/repos/finnishtransportagency/harja/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/finnishtransportagency/harja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/finnishtransportagency/harja/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/finnishtransportagency/harja/statuses/502a2a222024e73961f33706f64619bab8d89c56"}}}}
{"actor":{"display_login":"mikkoronkkomaki"}}