{"action":"created","issue":{"url":"https://api.github.com/repos/hotosm/oam-uploader/issues/39","repository_url":"https://api.github.com/repos/hotosm/oam-uploader","labels_url":"https://api.github.com/repos/hotosm/oam-uploader/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/hotosm/oam-uploader/issues/39/comments","events_url":"https://api.github.com/repos/hotosm/oam-uploader/issues/39/events","html_url":"https://github.com/hotosm/oam-uploader/issues/39","id":170891842,"number":39,"title":"Consume new file formats","user":{"login":"smit1678","id":796838,"avatar_url":"https://avatars.githubusercontent.com/u/796838?v=3","gravatar_id":"","url":"https://api.github.com/users/smit1678","html_url":"https://github.com/smit1678","followers_url":"https://api.github.com/users/smit1678/followers","following_url":"https://api.github.com/users/smit1678/following{/other_user}","gists_url":"https://api.github.com/users/smit1678/gists{/gist_id}","starred_url":"https://api.github.com/users/smit1678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smit1678/subscriptions","organizations_url":"https://api.github.com/users/smit1678/orgs","repos_url":"https://api.github.com/users/smit1678/repos","events_url":"https://api.github.com/users/smit1678/events{/privacy}","received_events_url":"https://api.github.com/users/smit1678/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-12T15:04:27Z","updated_at":"2016-09-14T16:34:18Z","closed_at":null,"body":"Pending final input on https://github.com/openimagerynetwork/oin-metadata-spec/issues/11, we can look to enable support for consuming jp2 and potentially jpeg. \r\n\r\nRight now we can consume geotiff files, generate metadata and a thumbnail, and then post to the HOT S3 bucket. We'll look to potentially support the same process for jp2 and jpeg files. "},"comment":{"url":"https://api.github.com/repos/hotosm/oam-uploader/issues/comments/247073695","html_url":"https://github.com/hotosm/oam-uploader/issues/39#issuecomment-247073695","issue_url":"https://api.github.com/repos/hotosm/oam-uploader/issues/39","id":247073695,"user":{"login":"nbumbarger","id":9471488,"avatar_url":"https://avatars.githubusercontent.com/u/9471488?v=3","gravatar_id":"","url":"https://api.github.com/users/nbumbarger","html_url":"https://github.com/nbumbarger","followers_url":"https://api.github.com/users/nbumbarger/followers","following_url":"https://api.github.com/users/nbumbarger/following{/other_user}","gists_url":"https://api.github.com/users/nbumbarger/gists{/gist_id}","starred_url":"https://api.github.com/users/nbumbarger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbumbarger/subscriptions","organizations_url":"https://api.github.com/users/nbumbarger/orgs","repos_url":"https://api.github.com/users/nbumbarger/repos","events_url":"https://api.github.com/users/nbumbarger/events{/privacy}","received_events_url":"https://api.github.com/users/nbumbarger/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T16:34:17Z","updated_at":"2016-09-14T16:34:17Z","body":"@smit1678 cc @danielfdsilva - The version of gdal node bindings on NPM is compiled without jp2 support, but I made a [fork](https://github.com/nbumbarger/node-gdal) that does support it. The fork will be useful for keeping our metadata processor running, but it only gets us part of the way there because there’s no node version of gdal_translate. This [thread]( https://github.com/naturalatlas/node-gdal/issues/67) was the only reference I could find for how one might go about directly harnessing gdal for conversion, and it gives me the impression that it would involve fairly complicated, low-level work.\r\n\r\nFor that reason, I think that our best option would be to configure a server with a standard (no node bindings) installation  gdal, including translate, and call it through node’s child_process. Regarding JPEG, it _is_ supported in gdal, but you should be aware that it isn’t a spatial format- the header doesn’t include fields for bounding box or coordinate system. A workaround would be to include a separate text file (called a worldfile) that includes this information, but this is cumbersome and not standard practice.\r\n\r\nFor completeness, I did check out a few other solutions, including ImageMagick and Mapnik. ImageMagick can theoretically convert between jp2 and tif, but it ignores spatial header fields so we would need to find a separate way to reinsert them into the processed tifs (probably not as bad as recreating gdal_translate, but not as easy as using the CLI version). I found that Mapnik doesn’t support the format at all."}}
{"actor":{"display_login":"nbumbarger"}}