{"id":13482317,"url":"https://github.com/brycejohnston/sentinel2_aws","last_synced_at":"2025-04-07T10:51:32.555Z","repository":{"id":56894962,"uuid":"113693593","full_name":"brycejohnston/sentinel2_aws","owner":"brycejohnston","description":"Sentinel-2 metadata parser and downloader from AWS","archived":false,"fork":false,"pushed_at":"2018-04-07T15:21:56.000Z","size":31,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-23T10:20:36.507Z","etag":null,"topics":["aws","rubygem","satellite","sentinel-2"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/sentinel2_aws","language":"Ruby","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/brycejohnston.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-09T18:59:00.000Z","updated_at":"2020-04-16T11:35:44.000Z","dependencies_parsed_at":"2022-08-20T17:10:24.434Z","dependency_job_id":null,"html_url":"https://github.com/brycejohnston/sentinel2_aws","commit_stats":null,"previous_names":["beaorn/sentinel2_aws","beaorn/sentinel_s3"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fsentinel2_aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fsentinel2_aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fsentinel2_aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fsentinel2_aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brycejohnston","download_url":"https://codeload.github.com/brycejohnston/sentinel2_aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640557,"owners_count":20971555,"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":["aws","rubygem","satellite","sentinel-2"],"created_at":"2024-07-31T17:01:00.834Z","updated_at":"2025-04-07T10:51:32.525Z","avatar_url":"https://github.com/brycejohnston.png","language":"Ruby","funding_links":[],"categories":["Tools"],"sub_categories":["Search \u0026 Download"],"readme":"# sentinel2_aws\n\n[![Gem Version](http://img.shields.io/gem/v/sentinel2_aws.svg)][gem]\n\n[gem]: https://rubygems.org/gems/sentinel2_aws\n\nRuby library for parsing Sentinel-2 tile metadata and downloading tile data from [AWS](https://aws.amazon.com/public-datasets/sentinel-2/).\nThis is the primary mechanism for retrieving data for the [Sentinel-2 AWS Search API](https://github.com/beaorn/sentinel2-search-api) project.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sentinel2_aws'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sentinel2_aws\n\n## Usage\n\nInitialize Sentinel2Aws::Client\n```ruby\nclient = Sentinel2Aws::Client.new(\"access_key_id\", \"secret_access_key\")\n```\n\nGet productInfo.json object paths for all products by date: `get_products(\"YYYY-MM-DD\")`\n```ruby\nproducts = client.get_products(\"2017-12-14\")\n# =\u003e\n# [\n# \"products/2017/12/14/S2B_MSIL1C_20171214T230119_N0206_R015_T58FCD_20171214T234716/productInfo.json\",\n# \"products/2017/12/14/S2B_MSIL1C_20171214T230119_N0206_R015_T58FCE_20171214T234716/productInfo.json\",\n# ]\n```\n\nGet product and tile metadata\n```ruby\n# takes single productInfo.json path returned from get_products\nproduct = \"products/2017/12/15/S2B_MSIL1C_20171215T235729_N0206_R030_T57MVR_20171216T010047/productInfo.json\"\nmetadata = client.get_product_info(product)\n# =\u003e\n{\n  :name =\u003e \"S2B_MSIL1C_20171215T235729_N0206_R030_T57MVR_20171216T010047\",\n  :id =\u003e \"eaedcad9-f287-41b8-944c-0cfed0b15db8\",\n  :path =\u003e  \"products/2017/12/15/S2B_MSIL1C_20171215T235729_N0206_R030_T57MVR_20171216T010047\",\n  :timestamp =\u003e \"2017-12-15T23:57:29.027Z\",\n  :datatake_identifier =\u003e \"GS2B_20171215T235729_004060_N02.06\",\n  :scihub_ingestion =\u003e \"2017-12-16T01:46:29.112Z\",\n  :s3_ingestion =\u003e \"2017-12-16T01:50:49.375Z\",\n  :tiles=\u003e\n    [\n      {\n        :path =\u003e \"tiles/57/M/VR/2017/12/15/0\",\n        :timestamp =\u003e \"2017-12-15T23:57:27.460Z\",\n        :utm_zone =\u003e 57,\n        :latitude_band =\u003e \"M\",\n        :grid_square =\u003e \"VR\",\n        :epsg =\u003e \"32757\",\n        :data_coverage_percentage =\u003e 31.21,\n        :cloudy_pixel_percentage =\u003e 13.47\n      }\n    ]\n}\n```\n\nDownload tile data: `download_tile_data(s3 tile path, file, output path)`\n```ruby\nclient.download_tile_data(\"tiles/57/M/VR/2017/12/15/0\", \"B01.jp2\", \"/path/that/exists\")\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/beaorn/sentinel2_aws.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycejohnston%2Fsentinel2_aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrycejohnston%2Fsentinel2_aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycejohnston%2Fsentinel2_aws/lists"}