{"action":"created","comment":{"url":"https://api.github.com/repos/geotrellis/geotrellis/pulls/comments/73546897","id":73546897,"diff_hunk":"@@ -0,0 +1,59 @@\n+package geotrellis.spark.etl.config\n+\n+import geotrellis.proj4.CRS\n+import geotrellis.raster.resample.PointResampleMethod\n+import geotrellis.raster.{CellSize, CellType, RasterExtent}\n+import geotrellis.spark.io.index.{HilbertKeyIndexMethod, KeyIndexMethod, RowMajorKeyIndexMethod, ZCurveKeyIndexMethod}\n+import geotrellis.spark.pyramid.Pyramid\n+import geotrellis.spark.tiling._\n+import geotrellis.vector.Extent\n+\n+import org.apache.spark.HashPartitioner\n+\n+case class Output(\n+  backend: Backend,\n+  resampleMethod: PointResampleMethod,\n+  reprojectMethod: ReprojectMethod,\n+  keyIndexMethod: IngestKeyIndexMethod,\n+  tileSize: Int = 256,\n+  pyramid: Boolean = true,\n+  partitions: Option[Int] = None,\n+  layoutScheme: Option[String] = None,\n+  layoutExtent: Option[Extent] = None,\n+  crs: Option[String] = None,\n+  resolutionThreshold: Option[Double] = None,\n+  cellSize: Option[CellSize] = None,\n+  cellType: Option[CellType] = None,\n+  encoding: Option[String] = None,\n+  breaks: Option[String] = None,\n+  maxZoom: Option[Int] = None\n+) {\n+  def params = getParams(backend.`type`, backend.path)\n+\n+  def getCrs = crs.map(CRS.fromName)\n+\n+  def getLayoutScheme: LayoutScheme = (layoutScheme, getCrs, resolutionThreshold) match {\n+    case (Some(\"floating\"), _, _)            => FloatingLayoutScheme(tileSize)\n+    case (Some(\"zoomed\"), Some(c), Some(rt)) => ZoomedLayoutScheme(c, tileSize, rt)\n+    case (Some(\"zoomed\"), Some(c), _)        => ZoomedLayoutScheme(c, tileSize)\n+    case _ => throw new Exception(\"unsupported layout scheme definition\")\n+  }\n+\n+  def getLayoutDefinition = (layoutExtent, cellSize) match {\n+    case (Some(le), Some(cs)) => LayoutDefinition(RasterExtent(le, cs), tileSize)\n+    case _ => throw new Exception(\"unsupported layout definition\")\n+  }\n+\n+  private def _getKeyIndexMethod: KeyIndexMethod[_] = (keyIndexMethod.`type`, keyIndexMethod.temporalResolution) match {\n+    case (\"rowmajor\", None)    => RowMajorKeyIndexMethod\n+    case (\"hilbert\", None)     => HilbertKeyIndexMethod\n+    case (\"hilbert\", Some(tr)) => HilbertKeyIndexMethod(tr.toInt)\n+    case (\"zorder\", None)      => ZCurveKeyIndexMethod\n+    case (\"zorder\", Some(tr))  => ZCurveKeyIndexMethod.byMilliseconds(tr)\n+    case _                     => throw new Exception(\"unsupported keyIndexMethod definition\")\n+  }\n+\n+  def getKeyIndexMethod[K] = _getKeyIndexMethod.asInstanceOf[KeyIndexMethod[K]]","path":"spark-etl/src/main/scala/geotrellis/spark/etl/config/Output.scala","position":56,"original_position":56,"commit_id":"738fdf4b09313b05d5a1ba28502976508df2ce4b","original_commit_id":"738fdf4b09313b05d5a1ba28502976508df2ce4b","user":{"login":"echeipesh","id":1158084,"avatar_url":"https://avatars.githubusercontent.com/u/1158084?v=3","gravatar_id":"","url":"https://api.github.com/users/echeipesh","html_url":"https://github.com/echeipesh","followers_url":"https://api.github.com/users/echeipesh/followers","following_url":"https://api.github.com/users/echeipesh/following{/other_user}","gists_url":"https://api.github.com/users/echeipesh/gists{/gist_id}","starred_url":"https://api.github.com/users/echeipesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echeipesh/subscriptions","organizations_url":"https://api.github.com/users/echeipesh/orgs","repos_url":"https://api.github.com/users/echeipesh/repos","events_url":"https://api.github.com/users/echeipesh/events{/privacy}","received_events_url":"https://api.github.com/users/echeipesh/received_events","type":"User","site_admin":false},"body":"Actually I would really expect scala type inference to figure it out without `asInstanceof`, could be wrong there.","created_at":"2016-08-04T15:38:52Z","updated_at":"2016-08-04T15:38:52Z","html_url":"https://github.com/geotrellis/geotrellis/pull/1553#discussion_r73546897","pull_request_url":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553","_links":{"self":{"href":"https://api.github.com/repos/geotrellis/geotrellis/pulls/comments/73546897"},"html":{"href":"https://github.com/geotrellis/geotrellis/pull/1553#discussion_r73546897"},"pull_request":{"href":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553"}}},"pull_request":{"url":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553","id":74220938,"html_url":"https://github.com/geotrellis/geotrellis/pull/1553","diff_url":"https://github.com/geotrellis/geotrellis/pull/1553.diff","patch_url":"https://github.com/geotrellis/geotrellis/pull/1553.patch","issue_url":"https://api.github.com/repos/geotrellis/geotrellis/issues/1553","number":1553,"state":"open","locked":false,"title":"ETL Refactor","user":{"login":"pomadchin","id":4929546,"avatar_url":"https://avatars.githubusercontent.com/u/4929546?v=3","gravatar_id":"","url":"https://api.github.com/users/pomadchin","html_url":"https://github.com/pomadchin","followers_url":"https://api.github.com/users/pomadchin/followers","following_url":"https://api.github.com/users/pomadchin/following{/other_user}","gists_url":"https://api.github.com/users/pomadchin/gists{/gist_id}","starred_url":"https://api.github.com/users/pomadchin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomadchin/subscriptions","organizations_url":"https://api.github.com/users/pomadchin/orgs","repos_url":"https://api.github.com/users/pomadchin/repos","events_url":"https://api.github.com/users/pomadchin/events{/privacy}","received_events_url":"https://api.github.com/users/pomadchin/received_events","type":"User","site_admin":false},"body":"Move ETL to use json configuration\r\n\r\n- [x] classes to read to / from json\r\n- [x] refactor etl input / output plugins to work with new inputs\r\n- [x] update documentation\r\n- [x] deprecate scallop\r\n- [x] test on a real ingest (chatta-demo ingest / emr)\r\n- [x] refactor landsat demo to work with this pr\r\n- [ ] refactor chatta demo to work with this pr\r\n- [x] output into a separate file\r\n- [x] improve json validation (our exceptions improvements and schema validation(?))\r\n- [x] @echeipesh comments","created_at":"2016-06-17T10:26:50Z","updated_at":"2016-08-04T15:38:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9391012552f6705a26029f33e6fdfa8763fba2a4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553/commits","review_comments_url":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553/comments","review_comment_url":"https://api.github.com/repos/geotrellis/geotrellis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geotrellis/geotrellis/issues/1553/comments","statuses_url":"https://api.github.com/repos/geotrellis/geotrellis/statuses/738fdf4b09313b05d5a1ba28502976508df2ce4b","head":{"label":"pomadchin:feature/etl-json","ref":"feature/etl-json","sha":"738fdf4b09313b05d5a1ba28502976508df2ce4b","user":{"login":"pomadchin","id":4929546,"avatar_url":"https://avatars.githubusercontent.com/u/4929546?v=3","gravatar_id":"","url":"https://api.github.com/users/pomadchin","html_url":"https://github.com/pomadchin","followers_url":"https://api.github.com/users/pomadchin/followers","following_url":"https://api.github.com/users/pomadchin/following{/other_user}","gists_url":"https://api.github.com/users/pomadchin/gists{/gist_id}","starred_url":"https://api.github.com/users/pomadchin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomadchin/subscriptions","organizations_url":"https://api.github.com/users/pomadchin/orgs","repos_url":"https://api.github.com/users/pomadchin/repos","events_url":"https://api.github.com/users/pomadchin/events{/privacy}","received_events_url":"https://api.github.com/users/pomadchin/received_events","type":"User","site_admin":false},"repo":{"id":36681479,"name":"geotrellis","full_name":"pomadchin/geotrellis","owner":{"login":"pomadchin","id":4929546,"avatar_url":"https://avatars.githubusercontent.com/u/4929546?v=3","gravatar_id":"","url":"https://api.github.com/users/pomadchin","html_url":"https://github.com/pomadchin","followers_url":"https://api.github.com/users/pomadchin/followers","following_url":"https://api.github.com/users/pomadchin/following{/other_user}","gists_url":"https://api.github.com/users/pomadchin/gists{/gist_id}","starred_url":"https://api.github.com/users/pomadchin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomadchin/subscriptions","organizations_url":"https://api.github.com/users/pomadchin/orgs","repos_url":"https://api.github.com/users/pomadchin/repos","events_url":"https://api.github.com/users/pomadchin/events{/privacy}","received_events_url":"https://api.github.com/users/pomadchin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pomadchin/geotrellis","description":"GeoTrellis is a geographic data processing engine for high performance applications.","fork":true,"url":"https://api.github.com/repos/pomadchin/geotrellis","forks_url":"https://api.github.com/repos/pomadchin/geotrellis/forks","keys_url":"https://api.github.com/repos/pomadchin/geotrellis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pomadchin/geotrellis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pomadchin/geotrellis/teams","hooks_url":"https://api.github.com/repos/pomadchin/geotrellis/hooks","issue_events_url":"https://api.github.com/repos/pomadchin/geotrellis/issues/events{/number}","events_url":"https://api.github.com/repos/pomadchin/geotrellis/events","assignees_url":"https://api.github.com/repos/pomadchin/geotrellis/assignees{/user}","branches_url":"https://api.github.com/repos/pomadchin/geotrellis/branches{/branch}","tags_url":"https://api.github.com/repos/pomadchin/geotrellis/tags","blobs_url":"https://api.github.com/repos/pomadchin/geotrellis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pomadchin/geotrellis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pomadchin/geotrellis/git/refs{/sha}","trees_url":"https://api.github.com/repos/pomadchin/geotrellis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pomadchin/geotrellis/statuses/{sha}","languages_url":"https://api.github.com/repos/pomadchin/geotrellis/languages","stargazers_url":"https://api.github.com/repos/pomadchin/geotrellis/stargazers","contributors_url":"https://api.github.com/repos/pomadchin/geotrellis/contributors","subscribers_url":"https://api.github.com/repos/pomadchin/geotrellis/subscribers","subscription_url":"https://api.github.com/repos/pomadchin/geotrellis/subscription","commits_url":"https://api.github.com/repos/pomadchin/geotrellis/commits{/sha}","git_commits_url":"https://api.github.com/repos/pomadchin/geotrellis/git/commits{/sha}","comments_url":"https://api.github.com/repos/pomadchin/geotrellis/comments{/number}","issue_comment_url":"https://api.github.com/repos/pomadchin/geotrellis/issues/comments{/number}","contents_url":"https://api.github.com/repos/pomadchin/geotrellis/contents/{+path}","compare_url":"https://api.github.com/repos/pomadchin/geotrellis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pomadchin/geotrellis/merges","archive_url":"https://api.github.com/repos/pomadchin/geotrellis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pomadchin/geotrellis/downloads","issues_url":"https://api.github.com/repos/pomadchin/geotrellis/issues{/number}","pulls_url":"https://api.github.com/repos/pomadchin/geotrellis/pulls{/number}","milestones_url":"https://api.github.com/repos/pomadchin/geotrellis/milestones{/number}","notifications_url":"https://api.github.com/repos/pomadchin/geotrellis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pomadchin/geotrellis/labels{/name}","releases_url":"https://api.github.com/repos/pomadchin/geotrellis/releases{/id}","deployments_url":"https://api.github.com/repos/pomadchin/geotrellis/deployments","created_at":"2015-06-01T18:51:59Z","updated_at":"2016-01-11T21:06:23Z","pushed_at":"2016-08-04T15:26:57Z","git_url":"git://github.com/pomadchin/geotrellis.git","ssh_url":"git@github.com:pomadchin/geotrellis.git","clone_url":"https://github.com/pomadchin/geotrellis.git","svn_url":"https://github.com/pomadchin/geotrellis","homepage":"http://geotrellis.io","size":272416,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"geotrellis:master","ref":"master","sha":"fb57dc43f5ed4e48802552a58abe6b2c1b9117ae","user":{"login":"geotrellis","id":3129444,"avatar_url":"https://avatars.githubusercontent.com/u/3129444?v=3","gravatar_id":"","url":"https://api.github.com/users/geotrellis","html_url":"https://github.com/geotrellis","followers_url":"https://api.github.com/users/geotrellis/followers","following_url":"https://api.github.com/users/geotrellis/following{/other_user}","gists_url":"https://api.github.com/users/geotrellis/gists{/gist_id}","starred_url":"https://api.github.com/users/geotrellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotrellis/subscriptions","organizations_url":"https://api.github.com/users/geotrellis/orgs","repos_url":"https://api.github.com/users/geotrellis/repos","events_url":"https://api.github.com/users/geotrellis/events{/privacy}","received_events_url":"https://api.github.com/users/geotrellis/received_events","type":"Organization","site_admin":false},"repo":{"id":3040675,"name":"geotrellis","full_name":"geotrellis/geotrellis","owner":{"login":"geotrellis","id":3129444,"avatar_url":"https://avatars.githubusercontent.com/u/3129444?v=3","gravatar_id":"","url":"https://api.github.com/users/geotrellis","html_url":"https://github.com/geotrellis","followers_url":"https://api.github.com/users/geotrellis/followers","following_url":"https://api.github.com/users/geotrellis/following{/other_user}","gists_url":"https://api.github.com/users/geotrellis/gists{/gist_id}","starred_url":"https://api.github.com/users/geotrellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotrellis/subscriptions","organizations_url":"https://api.github.com/users/geotrellis/orgs","repos_url":"https://api.github.com/users/geotrellis/repos","events_url":"https://api.github.com/users/geotrellis/events{/privacy}","received_events_url":"https://api.github.com/users/geotrellis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geotrellis/geotrellis","description":"GeoTrellis is a geographic data processing engine for high performance applications.","fork":false,"url":"https://api.github.com/repos/geotrellis/geotrellis","forks_url":"https://api.github.com/repos/geotrellis/geotrellis/forks","keys_url":"https://api.github.com/repos/geotrellis/geotrellis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geotrellis/geotrellis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geotrellis/geotrellis/teams","hooks_url":"https://api.github.com/repos/geotrellis/geotrellis/hooks","issue_events_url":"https://api.github.com/repos/geotrellis/geotrellis/issues/events{/number}","events_url":"https://api.github.com/repos/geotrellis/geotrellis/events","assignees_url":"https://api.github.com/repos/geotrellis/geotrellis/assignees{/user}","branches_url":"https://api.github.com/repos/geotrellis/geotrellis/branches{/branch}","tags_url":"https://api.github.com/repos/geotrellis/geotrellis/tags","blobs_url":"https://api.github.com/repos/geotrellis/geotrellis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geotrellis/geotrellis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geotrellis/geotrellis/git/refs{/sha}","trees_url":"https://api.github.com/repos/geotrellis/geotrellis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geotrellis/geotrellis/statuses/{sha}","languages_url":"https://api.github.com/repos/geotrellis/geotrellis/languages","stargazers_url":"https://api.github.com/repos/geotrellis/geotrellis/stargazers","contributors_url":"https://api.github.com/repos/geotrellis/geotrellis/contributors","subscribers_url":"https://api.github.com/repos/geotrellis/geotrellis/subscribers","subscription_url":"https://api.github.com/repos/geotrellis/geotrellis/subscription","commits_url":"https://api.github.com/repos/geotrellis/geotrellis/commits{/sha}","git_commits_url":"https://api.github.com/repos/geotrellis/geotrellis/git/commits{/sha}","comments_url":"https://api.github.com/repos/geotrellis/geotrellis/comments{/number}","issue_comment_url":"https://api.github.com/repos/geotrellis/geotrellis/issues/comments{/number}","contents_url":"https://api.github.com/repos/geotrellis/geotrellis/contents/{+path}","compare_url":"https://api.github.com/repos/geotrellis/geotrellis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geotrellis/geotrellis/merges","archive_url":"https://api.github.com/repos/geotrellis/geotrellis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geotrellis/geotrellis/downloads","issues_url":"https://api.github.com/repos/geotrellis/geotrellis/issues{/number}","pulls_url":"https://api.github.com/repos/geotrellis/geotrellis/pulls{/number}","milestones_url":"https://api.github.com/repos/geotrellis/geotrellis/milestones{/number}","notifications_url":"https://api.github.com/repos/geotrellis/geotrellis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geotrellis/geotrellis/labels{/name}","releases_url":"https://api.github.com/repos/geotrellis/geotrellis/releases{/id}","deployments_url":"https://api.github.com/repos/geotrellis/geotrellis/deployments","created_at":"2011-12-23T14:56:54Z","updated_at":"2016-07-29T04:43:37Z","pushed_at":"2016-08-04T15:26:58Z","git_url":"git://github.com/geotrellis/geotrellis.git","ssh_url":"git@github.com:geotrellis/geotrellis.git","clone_url":"https://github.com/geotrellis/geotrellis.git","svn_url":"https://github.com/geotrellis/geotrellis","homepage":"http://geotrellis.io","size":284528,"stargazers_count":456,"watchers_count":456,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":138,"mirror_url":null,"open_issues_count":86,"forks":138,"open_issues":86,"watchers":456,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553"},"html":{"href":"https://github.com/geotrellis/geotrellis/pull/1553"},"issue":{"href":"https://api.github.com/repos/geotrellis/geotrellis/issues/1553"},"comments":{"href":"https://api.github.com/repos/geotrellis/geotrellis/issues/1553/comments"},"review_comments":{"href":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553/comments"},"review_comment":{"href":"https://api.github.com/repos/geotrellis/geotrellis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geotrellis/geotrellis/pulls/1553/commits"},"statuses":{"href":"https://api.github.com/repos/geotrellis/geotrellis/statuses/738fdf4b09313b05d5a1ba28502976508df2ce4b"}}}}
{"actor":{"display_login":"echeipesh"}}