{"action":"created","issue":{"url":"https://api.github.com/repos/geoalchemy/geoalchemy2/issues/52","repository_url":"https://api.github.com/repos/geoalchemy/geoalchemy2","labels_url":"https://api.github.com/repos/geoalchemy/geoalchemy2/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/geoalchemy/geoalchemy2/issues/52/comments","events_url":"https://api.github.com/repos/geoalchemy/geoalchemy2/issues/52/events","html_url":"https://github.com/geoalchemy/geoalchemy2/pull/52","id":14760473,"number":52,"title":"Deserialization for WKB","user":{"login":"Giszmo","id":96378,"avatar_url":"https://avatars.githubusercontent.com/u/96378?v=3","gravatar_id":"","url":"https://api.github.com/users/Giszmo","html_url":"https://github.com/Giszmo","followers_url":"https://api.github.com/users/Giszmo/followers","following_url":"https://api.github.com/users/Giszmo/following{/other_user}","gists_url":"https://api.github.com/users/Giszmo/gists{/gist_id}","starred_url":"https://api.github.com/users/Giszmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Giszmo/subscriptions","organizations_url":"https://api.github.com/users/Giszmo/orgs","repos_url":"https://api.github.com/users/Giszmo/repos","events_url":"https://api.github.com/users/Giszmo/events{/privacy}","received_events_url":"https://api.github.com/users/Giszmo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2013-05-25T17:18:42Z","updated_at":"2016-11-17T21:48:43Z","closed_at":"2016-11-17T20:10:27Z","pull_request":{"url":"https://api.github.com/repos/geoalchemy/geoalchemy2/pulls/52","html_url":"https://github.com/geoalchemy/geoalchemy2/pull/52","diff_url":"https://github.com/geoalchemy/geoalchemy2/pull/52.diff","patch_url":"https://github.com/geoalchemy/geoalchemy2/pull/52.patch"},"body":"@lweberk created issue https://github.com/geoalchemy/geoalchemy2/issues/51\nand we've been working on resolving it on our end. This merge request shares our findings. It adds a property to WKBElement to access WKB as a python-native tuple.\n\nFor example on my table with a field of type Polygon, initializing the polygon with\n\n``` python\n  lake.geom = POLYGON((88.555555555 88.555555555,89.555555555 88.555555555,89.555555555 89.555555555,88.555555555 88.555555555))\n```\n\n(produces this well known binary:\n\n```\n  b'0103000000010000000400000083f5e2388e23564083f5e2388e23564083f5e2388e63564083f5e2388e23564083f5e2388e63564083f5e2388e63564083f5e2388e23564083f5e2388e235640'\n```\n\n) and when querying lake.geom from the db I get this geom.tuple:\n\n``` python\nPolygon(wkb_id=3, rings=[LineString(wkb_id=2, points=[Point(wkb_id=1, x=88.555555555, y=88.555555555), Point(wkb_id=1, x=89.555555555, y=88.555555555), Point(wkb_id=1, x=89.555555555, y=89.555555555), Point(wkb_id=1, x=88.555555555, y=88.555555555)])])\n```\n\nA way to re-serialize the tuple exists in wkb.py but is not exposed to WKBElement yet.\n\nThis code is not ready for productive use in general geoalchemy2 applications but will most likely not get extended by us neither if there is no interest by the community, as it serves our needs as is.\n"},"comment":{"url":"https://api.github.com/repos/geoalchemy/geoalchemy2/issues/comments/261380421","html_url":"https://github.com/geoalchemy/geoalchemy2/pull/52#issuecomment-261380421","issue_url":"https://api.github.com/repos/geoalchemy/geoalchemy2/issues/52","id":261380421,"user":{"login":"elemoine","id":76594,"avatar_url":"https://avatars.githubusercontent.com/u/76594?v=3","gravatar_id":"","url":"https://api.github.com/users/elemoine","html_url":"https://github.com/elemoine","followers_url":"https://api.github.com/users/elemoine/followers","following_url":"https://api.github.com/users/elemoine/following{/other_user}","gists_url":"https://api.github.com/users/elemoine/gists{/gist_id}","starred_url":"https://api.github.com/users/elemoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elemoine/subscriptions","organizations_url":"https://api.github.com/users/elemoine/orgs","repos_url":"https://api.github.com/users/elemoine/repos","events_url":"https://api.github.com/users/elemoine/events{/privacy}","received_events_url":"https://api.github.com/users/elemoine/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T21:48:43Z","updated_at":"2016-11-17T21:48:43Z","body":"> I'm ok with the drop, since we moved on anyways.\r\n\r\nNot using GeoAlchemy anywore?"}}
{"actor":{"display_login":"elemoine"}}