{"action":"created","issue":{"url":"https://api.github.com/repos/Toblerity/Shapely/issues/302","labels_url":"https://api.github.com/repos/Toblerity/Shapely/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/Toblerity/Shapely/issues/302/comments","events_url":"https://api.github.com/repos/Toblerity/Shapely/issues/302/events","html_url":"https://github.com/Toblerity/Shapely/issues/302","id":101688384,"number":302,"title":"MultiPoint.convex_hull doesn't contain all of the points","user":{"login":"cyphar","id":2888411,"avatar_url":"https://avatars.githubusercontent.com/u/2888411?v=3","gravatar_id":"","url":"https://api.github.com/users/cyphar","html_url":"https://github.com/cyphar","followers_url":"https://api.github.com/users/cyphar/followers","following_url":"https://api.github.com/users/cyphar/following{/other_user}","gists_url":"https://api.github.com/users/cyphar/gists{/gist_id}","starred_url":"https://api.github.com/users/cyphar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyphar/subscriptions","organizations_url":"https://api.github.com/users/cyphar/orgs","repos_url":"https://api.github.com/users/cyphar/repos","events_url":"https://api.github.com/users/cyphar/events{/privacy}","received_events_url":"https://api.github.com/users/cyphar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-18T15:53:22Z","updated_at":"2015-08-18T16:32:57Z","closed_at":null,"body":"Given a setup like this (the numpy stuff just gives me a set of points inside a circle in a given coordinate system):\r\n\r\n```\r\n>>> xs, ys = numpy.mgrid[:20,:20]\r\n>>> pts = np.transpose(np.where(((xs - 10)**2 + (ys - 10)**2 < 45).T))\r\n>>> hull = shapely.geometry.MultiPoint(pts).convex_hull\r\n```\r\n\r\nOne would assume that all of the points `pts` are contained within `hull`. However:\r\n\r\n```\r\n>>> all(hull.contains(shapely.geometry.Point(pt)) for pt in pts)\r\nFalse\r\n>>> sum(hull.contains(shapely.geometry.Point(pt)) for pt in pts) / len(pts)\r\n0.7956204379562044\r\n```\r\n\r\nSo about 20% of the points are missing. In my actual code case, almost all of the points are missing, and a whole bunch of points outside what I would define as the convex hull are included in the convex hull. Is there some explanation for what is going on?"},"comment":{"url":"https://api.github.com/repos/Toblerity/Shapely/issues/comments/132268369","html_url":"https://github.com/Toblerity/Shapely/issues/302#issuecomment-132268369","issue_url":"https://api.github.com/repos/Toblerity/Shapely/issues/302","id":132268369,"user":{"login":"snorfalorpagus","id":3883947,"avatar_url":"https://avatars.githubusercontent.com/u/3883947?v=3","gravatar_id":"","url":"https://api.github.com/users/snorfalorpagus","html_url":"https://github.com/snorfalorpagus","followers_url":"https://api.github.com/users/snorfalorpagus/followers","following_url":"https://api.github.com/users/snorfalorpagus/following{/other_user}","gists_url":"https://api.github.com/users/snorfalorpagus/gists{/gist_id}","starred_url":"https://api.github.com/users/snorfalorpagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snorfalorpagus/subscriptions","organizations_url":"https://api.github.com/users/snorfalorpagus/orgs","repos_url":"https://api.github.com/users/snorfalorpagus/repos","events_url":"https://api.github.com/users/snorfalorpagus/events{/privacy}","received_events_url":"https://api.github.com/users/snorfalorpagus/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T16:32:57Z","updated_at":"2015-08-18T16:32:57Z","body":"@jwass You beat me to it!\r\n\r\nI do wonder if we need to correct the documentation for convex hull. From Wikipedia:\r\n> Formally, the convex hull may be defined as the intersection of all convex sets containing X or as the set of all convex combinations of points in X."}}