{"action":"closed","issue":{"url":"https://api.github.com/repos/dankelley/oce/issues/706","labels_url":"https://api.github.com/repos/dankelley/oce/issues/706/labels{/name}","comments_url":"https://api.github.com/repos/dankelley/oce/issues/706/comments","events_url":"https://api.github.com/repos/dankelley/oce/issues/706/events","html_url":"https://github.com/dankelley/oce/issues/706","id":96073880,"number":706,"title":"landsatTrim should be more flexible","user":{"login":"richardsc","id":233584,"avatar_url":"https://avatars.githubusercontent.com/u/233584?v=3","gravatar_id":"","url":"https://api.github.com/users/richardsc","html_url":"https://github.com/richardsc","followers_url":"https://api.github.com/users/richardsc/followers","following_url":"https://api.github.com/users/richardsc/following{/other_user}","gists_url":"https://api.github.com/users/richardsc/gists{/gist_id}","starred_url":"https://api.github.com/users/richardsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardsc/subscriptions","organizations_url":"https://api.github.com/users/richardsc/orgs","repos_url":"https://api.github.com/users/richardsc/repos","events_url":"https://api.github.com/users/richardsc/events{/privacy}","received_events_url":"https://api.github.com/users/richardsc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dankelley/oce/labels/landsat","name":"landsat","color":"009800"},{"url":"https://api.github.com/repos/dankelley/oce/labels/Needs%20recheck","name":"Needs recheck","color":"fbca04"},{"url":"https://api.github.com/repos/dankelley/oce/labels/request","name":"request","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"richardsc","id":233584,"avatar_url":"https://avatars.githubusercontent.com/u/233584?v=3","gravatar_id":"","url":"https://api.github.com/users/richardsc","html_url":"https://github.com/richardsc","followers_url":"https://api.github.com/users/richardsc/followers","following_url":"https://api.github.com/users/richardsc/following{/other_user}","gists_url":"https://api.github.com/users/richardsc/gists{/gist_id}","starred_url":"https://api.github.com/users/richardsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardsc/subscriptions","organizations_url":"https://api.github.com/users/richardsc/orgs","repos_url":"https://api.github.com/users/richardsc/repos","events_url":"https://api.github.com/users/richardsc/events{/privacy}","received_events_url":"https://api.github.com/users/richardsc/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-07-20T14:15:10Z","updated_at":"2015-08-14T13:32:21Z","closed_at":"2015-08-14T13:32:21Z","body":"the `ll` and `ur` args for `landsatTrim()` must be a list with elements `$longitude` and `$latitude`. This makes it difficult to quickly trim an image by choosing points with `locator()`, because the results have to be re-packaged first.\r\n\r\nI propose that `landsatTrim()` should accept a list with either `longitude` and `latitude` *OR* `x` and `y` elements, which would allow one do to something like:\r\n```r\r\nd <- read.landsat('LCwhatever', band=1)\r\nll <- locator(1)\r\nur <- locator(1)\r\ndt <- landsatTrim(d, ll, ur)\r\n```\r\n\r\nCome to think of it, does it make sense to accept just a *single* object for `ll`, *if* it has either `lon/lat` or `x/y` elements of length 2? I.e:\r\n```r\r\nd <- read.landsat('LCwhatever', band=1)\r\nll <- locator(2)\r\ndt <- landsatTrim(d, ll)\r\n```"}}