{"action":"created","issue":{"url":"https://api.github.com/repos/bryanjos/geo/issues/11","labels_url":"https://api.github.com/repos/bryanjos/geo/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/bryanjos/geo/issues/11/comments","events_url":"https://api.github.com/repos/bryanjos/geo/issues/11/events","html_url":"https://github.com/bryanjos/geo/issues/11","id":57486165,"number":11,"title":"decoding MultiPolygon","user":{"login":"jxs","id":1204690,"avatar_url":"https://avatars.githubusercontent.com/u/1204690?v=3","gravatar_id":"","url":"https://api.github.com/users/jxs","html_url":"https://github.com/jxs","followers_url":"https://api.github.com/users/jxs/followers","following_url":"https://api.github.com/users/jxs/following{/other_user}","gists_url":"https://api.github.com/users/jxs/gists{/gist_id}","starred_url":"https://api.github.com/users/jxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxs/subscriptions","organizations_url":"https://api.github.com/users/jxs/orgs","repos_url":"https://api.github.com/users/jxs/repos","events_url":"https://api.github.com/users/jxs/events{/privacy}","received_events_url":"https://api.github.com/users/jxs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-12T16:48:52Z","updated_at":"2015-02-12T18:23:26Z","closed_at":null,"body":"Hi there, i am having errors decoding MultiPolygon, either with ecto \r\n```\r\niex(11)> Transfere.Repo.all(query)                                                                                                                              [debug] SELECT l0.\"id\", l0.\"freguesia\", l0.\"municipio\", l0.\"distrito\", l0.\"geom\" FROM \"locations\" AS l0 LIMIT 5 (1.1ms)\r\n** (ArgumentError) cannot load `\"0106000020E6100000010000000103000000010000000F00000091A1EF7505D521C0F4AD6182E481424072B3CE92FED421C01D483CDAE281424085184FAEF7D421C0CB159111E1814240E1EBD7FBF8D421C0D421F7C8DF814240AD111315FFD421C0FE1F21C0DE81424082A0669908D521C050071118DE814240813C5E700FD521C0954EEF97DE814240DC889FA815D521C0B3382182E08142400148A81817D521C0E620D22BE2814240F1E95BDE19D521C08BD53852E3814240F81699E217D521C05B35D7DCE4814240B287C8D715D521C0336338FEE481424085882FB90FD521C0FEF65484E5814240A53E1E460AD521C09A0EA286E581424091A1EF7505D521C0F4AD6182E4814240\"` as type Geo.MultiPolygon\r\n             lib/ecto/type.ex:315: Ecto.Type.load!/2\r\n             lib/ecto/schema.ex:553: anonymous fn/3 in Ecto.Schema.do_load/4\r\n    (elixir) lib/enum.ex:1261: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             lib/ecto/schema.ex:551: Ecto.Schema.do_load/4\r\n             lib/ecto/schema.ex:545: Ecto.Schema.__load__/4\r\n             lib/ecto/adapters/sql.ex:403: anonymous fn/3 in Ecto.Adapters.SQL.process_row/2\r\n    (elixir) lib/enum.ex:1036: Enum.\"-map_reduce/3-lists^mapfoldl/2-0-\"/3\r\n             lib/ecto/adapters/sql.ex:396: Ecto.Adapters.SQL.process_row/2\r\n```\r\nand with Geo.WKB.decode\r\n\r\n``` \r\n\r\niex(11)> Geo.WKB.decode(\"0106000020E6100000010000000103000000010000000F00000091A1EF7505D521C0F4AD6182E481424072B3CE92FED421C01D483CDAE281424085184FAEF7D421C0CB159111E1814240E1EBD7FBF8D421C0D421F7C8DF814240AD111315FFD421C0FE1F21C0DE81424082A0669908D521C050071118DE814240813C5E700FD521C0954EEF97DE814240DC889FA815D521C0B3382182E08142400148A81817D521C0E620D22BE2814240F1E95BDE19D521C08BD53852E3814240F81699E217D521C05B35D7DCE4814240B287C8D715D521C0336338FEE481424085882FB90FD521C0FEF65484E5814240A53E1E460AD521C09A0EA286E581424091A1EF7505D521C0F4AD6182E4814240\")\r\n** (Protocol.UndefinedError) protocol Enumerable not implemented for %Geo.Polygon{coordinates: [[{-8.91605728674111, 37.014786050505705}, {-8.916004741413165, 37.01473548835222}, {-8.915952155261275, 37.014681049196575}, {-8.915962095363229, 37.014641876859656}, {-8.916008623674168, 37.01461030595236}, {-8.916081231858929, 37.01459027129624}, {-8.91613341474863, 37.01460551438246}, {-8.91618086764759, 37.0146639501776}, {-8.916191835920474, 37.01471469650441}, {-8.91621298667903, 37.01474979186158}, {-8.916197854221068, 37.01479683407043}, {-8.916182273129241, 37.01480081322952}, {-8.916135584881212, 37.01481680058167}, {-8.916094008628827, 37.01481707489911}, {-8.91605728674111, 37.014786050505705}]], srid: nil}\r\n    (elixir) lib/enum.ex:1: Enumerable.impl_for!/1\r\n    (elixir) lib/enum.ex:112: Enumerable.reduce/3\r\n    (elixir) lib/enum.ex:981: Enum.map/2\r\n             lib/geo/wkb.ex:239: Geo.WKB.decode_coordinates/2\r\n             lib/geo/wkb.ex:171: Geo.WKB.decode/2\r\n```\r\n\r\nthanks for the lib :)"},"comment":{"url":"https://api.github.com/repos/bryanjos/geo/issues/comments/74123396","html_url":"https://github.com/bryanjos/geo/issues/11#issuecomment-74123396","issue_url":"https://api.github.com/repos/bryanjos/geo/issues/11","id":74123396,"user":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars.githubusercontent.com/u/1257573?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T18:23:26Z","updated_at":"2015-02-12T18:23:26Z","body":"Sorry, I'll have to look into that one tonight when I get a bit more time. Looks like it's not calling the wkb decode function somewhere."}}