Skip to main content

Create STAC Items from raster datasets.

Project description

rio-stac

rio-stac

Create STAC Items from raster datasets.

Test Coverage Package version Downloads Downloads


Documentation: https://developmentseed.github.io/rio-stac/

Source Code: https://github.com/developmentseed/rio-stac


rio-stac is a simple rasterio plugin for creating valid STAC items from a raster dataset. The library is built on top of pystac to make sure we follow the STAC specification.

Installation

$ pip install pip -U

# From Pypi
$ pip install rio-stac

# Or from source
$ pip install git+http://github.com/developmentseed/rio-stac

Example

// rio stac tests/fixtures/dataset_cog.tif | jq
{
  "type": "Feature",
  "stac_version": "1.0.0",
  "id": "dataset_cog.tif",
  "properties": {
    "proj:epsg": 32621,
    "proj:geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            373185,
            8019284.949381611
          ],
          [
            639014.9492102272,
            8019284.949381611
          ],
          [
            639014.9492102272,
            8286015
          ],
          [
            373185,
            8286015
          ],
          [
            373185,
            8019284.949381611
          ]
        ]
      ]
    },
    "proj:bbox": [
      373185,
      8019284.949381611,
      639014.9492102272,
      8286015
    ],
    "proj:shape": [
      2667,
      2658
    ],
    "proj:transform": [
      100.01126757344893,
      0,
      373185,
      0,
      -100.01126757344893,
      8286015,
      0,
      0,
      1
    ],
    "datetime": "2022-09-02T16:17:51.427680Z"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          -60.72634617297825,
          72.23689137791739
        ],
        [
          -52.91627525610924,
          72.22979795551834
        ],
        [
          -52.301598718454485,
          74.61378388950398
        ],
        [
          -61.28762442711404,
          74.62204314252978
        ],
        [
          -60.72634617297825,
          72.23689137791739
        ]
      ]
    ]
  },
  "links": [],
  "assets": {
    "asset": {
      "href": "/Users/vincentsarago/Dev/DevSeed/rio-stac/tests/fixtures/dataset_cog.tif",
      "raster:bands": [
        {
          "data_type": "uint16",
          "scale": 1,
          "offset": 0,
          "sampling": "point",
          "statistics": {
            "mean": 2107.524612053134,
            "minimum": 1,
            "maximum": 7872,
            "stddev": 2271.0065537857326,
            "valid_percent": 9.564764936336924e-05
          },
          "histogram": {
            "count": 11,
            "min": 1,
            "max": 7872,
            "buckets": [
              503460,
              0,
              0,
              161792,
              283094,
              0,
              0,
              0,
              87727,
              9431
            ]
          }
        }
      ],
      "eo:bands": [
        {
          "name": "b1",
          "description": "gray"
        }
      ],
      "roles": []
    }
  },
  "bbox": [
    -61.28762442711404,
    72.22979795551834,
    -52.301598718454485,
    74.62204314252978
  ],
  "stac_extensions": [
    "https://stac-extensions.github.io/projection/v1.0.0/schema.json",
    "https://stac-extensions.github.io/raster/v1.1.0/schema.json",
    "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
  ]
}

See https://developmentseed.org/rio-stac/intro/ for more.

Contribution & Development

See CONTRIBUTING.md

Authors

See contributors

Changes

See CHANGES.md.

License

See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rio-stac-0.7.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

rio_stac-0.7.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file rio-stac-0.7.0.tar.gz.

File metadata

  • Download URL: rio-stac-0.7.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for rio-stac-0.7.0.tar.gz
Algorithm Hash digest
SHA256 0bd2bc145793d44bdb06a1b1c528f11731ebdcb8cb681270fd9bafb3aa509154
MD5 64d6804339a9d22724808249f6e0165c
BLAKE2b-256 dcd415b29187b9416be6b4c2898ea26c2ced1e94d8bb8a08e9791205f3e4adbc

See more details on using hashes here.

File details

Details for the file rio_stac-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: rio_stac-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for rio_stac-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c7b24a3da53ae999533364a8da9cb5429fe4950aae23cb6f01cd9f0851716a1
MD5 9dbe7c9f0f27f268e915f75f12fb6c53
BLAKE2b-256 f594ffb2122928d595130d416bcd5b7214fadc6a3fbaba766083bf1b5f5682ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page