{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/448","labels_url":"https://api.github.com/repos/mapbox/rasterio/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/448/comments","events_url":"https://api.github.com/repos/mapbox/rasterio/issues/448/events","html_url":"https://github.com/mapbox/rasterio/issues/448","id":99256850,"number":448,"title":"Get rectangular geometry from `rio shapes`","user":{"login":"kapadia","id":581337,"avatar_url":"https://avatars.githubusercontent.com/u/581337?v=3","gravatar_id":"","url":"https://api.github.com/users/kapadia","html_url":"https://github.com/kapadia","followers_url":"https://api.github.com/users/kapadia/followers","following_url":"https://api.github.com/users/kapadia/following{/other_user}","gists_url":"https://api.github.com/users/kapadia/gists{/gist_id}","starred_url":"https://api.github.com/users/kapadia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapadia/subscriptions","organizations_url":"https://api.github.com/users/kapadia/orgs","repos_url":"https://api.github.com/users/kapadia/repos","events_url":"https://api.github.com/users/kapadia/events{/privacy}","received_events_url":"https://api.github.com/users/kapadia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-05T17:22:58Z","updated_at":"2015-08-05T18:06:11Z","closed_at":"2015-08-05T18:06:11Z","body":"@sgillies and folks - this is more of a question for the moment.\r\n\r\nWe're using `rio shapes` to extract valid pixels from a scene. In the case of a Landsat image, it looks like:\r\n\r\n    rio shapes LC80320372013150LGN00_B1.TIF --as-mask\r\n\r\nThe returned GeoJSON is great, though, at times it can be difficult to work with because it contains so many points. We can use the `sampling` flag to tune the number of points, but the returned geometry is pretty jagged. We often rely on having a convex polygon, and the jaggedness of the feature just blows everything up.\r\n\r\n![shapes-comparison-sm](https://cloud.githubusercontent.com/assets/581337/9092511/78beefd8-3b5b-11e5-84a1-9eabe9bbb053.png)\r\n*Default sampling (left), Sampling of 100 (center), Just corner points (right)*\r\n\r\nI just put together a script that selects the corner points. I'm wondering if this is something that should be incorporated into `rio shapes`. Do others come across this problem?\r\n\r\nScript at: https://gist.github.com/kapadia/d3ddc2b9cc36addc3022\r\n\r\n/cc @joshtennefoss"},"comment":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/comments/128094087","html_url":"https://github.com/mapbox/rasterio/issues/448#issuecomment-128094087","issue_url":"https://api.github.com/repos/mapbox/rasterio/issues/448","id":128094087,"user":{"login":"kapadia","id":581337,"avatar_url":"https://avatars.githubusercontent.com/u/581337?v=3","gravatar_id":"","url":"https://api.github.com/users/kapadia","html_url":"https://github.com/kapadia","followers_url":"https://api.github.com/users/kapadia/followers","following_url":"https://api.github.com/users/kapadia/following{/other_user}","gists_url":"https://api.github.com/users/kapadia/gists{/gist_id}","starred_url":"https://api.github.com/users/kapadia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapadia/subscriptions","organizations_url":"https://api.github.com/users/kapadia/orgs","repos_url":"https://api.github.com/users/kapadia/repos","events_url":"https://api.github.com/users/kapadia/events{/privacy}","received_events_url":"https://api.github.com/users/kapadia/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T18:06:11Z","updated_at":"2015-08-05T18:06:11Z","body":"@geowurster I've been using `fio-buffer`, love it.\r\n\r\nI've been keeping an eye on https://github.com/Toblerity/Fiona/issues/173, and look forward to piping with Fiona.\r\n\r\nI'd be happy to test out on the fio-geoprocessing plugin when available. `--preserve-topology` is what we're after.\r\n\r\nIt sounds like the right home for such an operation would be in a Fiona plugin, likely fio-geoprocessing. Thanks for the input everyone. Going to close, unless there's another opinion out there."}}