{"id":13735466,"url":"https://github.com/developmentseed/sentinel-2-cog","last_synced_at":"2025-06-23T21:40:59.261Z","repository":{"id":42353042,"uuid":"183662085","full_name":"developmentseed/sentinel-2-cog","owner":"developmentseed","description":"Convert Sentinel-2 JPEG 2000 to COG with AWS Lambda","archived":false,"fork":false,"pushed_at":"2022-12-06T15:32:17.000Z","size":348,"stargazers_count":17,"open_issues_count":10,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T11:43:15.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gist.github.com/vincentsarago/0e8c3fba19a4b2b6855bca77f18b88fb","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developmentseed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-26T16:33:46.000Z","updated_at":"2023-06-20T17:59:58.000Z","dependencies_parsed_at":"2023-01-23T09:10:14.607Z","dependency_job_id":null,"html_url":"https://github.com/developmentseed/sentinel-2-cog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/developmentseed/sentinel-2-cog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fsentinel-2-cog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fsentinel-2-cog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fsentinel-2-cog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fsentinel-2-cog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developmentseed","download_url":"https://codeload.github.com/developmentseed/sentinel-2-cog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fsentinel-2-cog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261561183,"owners_count":23177545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:07.178Z","updated_at":"2025-06-23T21:40:59.233Z","avatar_url":"https://github.com/developmentseed.png","language":"Python","readme":"# sentinel2 to COGEO\n\nUse AWS Lambda and [rio-cogeo](github.com/cogeotiff/rio-cogeo) to convert Sentinel-2 JPEG2000 to CloudOptimized GeoTIFF.\n\n## Deployment\n\n#### Package Lambda\n\nCreate `package.zip`\n\n```bash\n$ docker-compose build --no-cache\n$ docker-compose run --rm package\n```\n\n#### Deploy to AWS\n\n```bash\n$ npm install\n$ sls deploy --bucket my-output-bucket\n```\n\n## Use\n\nA CLI is porvided within this repo to invoke the lambda function directly. \n\n```bash\n$ python scripts/invoke.py --help\nUsage: invoke.py [OPTIONS] SCENEID\n\n  Invoke Lambda.\n\nOptions:\n  -b, --bidx TEXT  Band index to copy  [required]\n  --stage TEXT     Stack stage\n  --function TEXT  Function's name\n  --region TEXT    AWS Lambda region\n  --help           Show this message and exit.\n```\n\nsentinel-2-cog works with Sentinel scene id as defined by [rio-tiler](https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/sentinel2.py#L40-L67) \n\n### Example\n```bash\n$ python scripts/invoke.py S2B_tile_20190421_18TXR_0 --bidx 04 --bidx 03 --bidx 02\n```\n\n## Cost\n\nEach band is processed in ~40Sec, meaning that if you want to process 1M scenes with 4 bands (04, 03, 02, 08) it should cost you around 11$ + the datatransfer (writing to S3).\n\n## Contribution \u0026 Development\n\nIssues and pull requests are more than welcome.\n\n**Dev install \u0026 Pull-Request**\n\n```\n$ git clone http://github.com/developmentseed/sentinel-2-cog.git\n$ cd sentinel-2-cog\n$ pip install -e .[dev]\n```\n\n\n**Python \u003e=3.6 only**\n\nThis repo is set to use `pre-commit` to run *flake8*, *pydocstring* and *black* (\"uncompromising Python code formatter\") when committing new code.\n\n```\n$ pre-commit install\n$ git add .\n$ git commit -m'my change'\nblack....................................................................Passed\nFlake8...................................................................Passed\nVerifying PEP257 Compliance..............................................Passed\n$ git push origin\n```\n\n\n## About\nCreated by [Development Seed](\u003chttp://developmentseed.org\u003e)\n","funding_links":[],"categories":["`Python` processing of optical imagery (non deep learning)"],"sub_categories":["Cloud Native Geospatial"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopmentseed%2Fsentinel-2-cog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopmentseed%2Fsentinel-2-cog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopmentseed%2Fsentinel-2-cog/lists"}