Youssef-Harby / fio-stac

[WORK IN PROGRESS] Create STAC Items from vector datasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fio-stac

fio-stac

Create STAC Items from vector datasets.

Test Coverage Package version Downloads Downloads


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

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


fio-stac is a simple fiona plugin for creating valid STAC items from a vector 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 fio-stac

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

Example

// fio stac zip+https://naciscdn.org/naturalearth/10m/cultural/ne_10m_roads_north_america.zip | jq
{
  "type": "Feature",
  "stac_version": "1.0.0",
  "id": "ne_10m_roads_north_america",
  "properties": {
    "proj:epsg": 4326,
    "proj:geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -176.7640084731439,
            14.590750676565
          ],
          [
            -52.64725244187383,
            14.590750676565
          ],
          [
            -52.64725244187383,
            70.2966838677457
          ],
          [
            -176.7640084731439,
            70.2966838677457
          ],
          [
            -176.7640084731439,
            14.590750676565
          ]
        ]
      ]
    },
    "proj:bbox": [
      -176.7640084731439,
      14.590750676565,
      -52.64725244187383,
      70.2966838677457
    ],
    "proj:projjson": {
      "$schema": "https://proj.org/schemas/v0.4/projjson.schema.json",
      "type": "GeographicCRS",
      "name": "WGS 84",
      "datum": {
        "type": "GeodeticReferenceFrame",
        "name": "World Geodetic System 1984",
        "ellipsoid": {
          "name": "WGS 84",
          "semi_major_axis": 6378137,
          "inverse_flattening": 298.257223563
        }
      },
      "coordinate_system": {
        "subtype": "ellipsoidal",
        "axis": [
          {
            "name": "Geodetic latitude",
            "abbreviation": "Lat",
            "direction": "north",
            "unit": "degree"
          },
          {
            "name": "Geodetic longitude",
            "abbreviation": "Lon",
            "direction": "east",
            "unit": "degree"
          }
        ]
      },
      "id": {
        "authority": "EPSG",
        "code": 4326
      }
    },
    "proj:wkt2": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]",
    "vector:layers": {
      "ne_10m_roads_north_america": {
        "properties": {
          "prefix": "str:5",
          "number": "str:5",
          "class": "str:10",
          "type": "str:12",
          "divided": "str:10",
          "country": "str:25",
          "state": "str:25",
          "note": "str:100",
          "scalerank": "int:4",
          "uident": "int:9",
          "length": "float:13.11",
          "rank": "int:4",
          "continent": "str:50"
        },
        "geometry": "LineString"
      }
    },
    "datetime": "2023-12-11T15:21:15.054810Z"
  },
  "geometry": {
    "coordinates": [
      [
        [
          -176.7640084731439,
          14.590750676565
        ],
        [
          -52.64725244187383,
          14.590750676565
        ],
        [
          -52.64725244187383,
          70.2966838677457
        ],
        [
          -176.7640084731439,
          70.2966838677457
        ],
        [
          -176.7640084731439,
          14.590750676565
        ]
      ]
    ],
    "type": "Polygon"
  },
  "links": [],
  "assets": {
    "ne_10m_roads_north_america": {
      "href": "zip+https://naciscdn.org/naturalearth/10m/cultural/ne_10m_roads_north_america.zip",
      "roles": []
    }
  },
  "bbox": [
    -176.7640084731439,
    14.590750676565,
    -52.64725244187383,
    70.2966838677457
  ],
  "stac_extensions": [
    "https://stac-extensions.github.io/projection/v1.1.0/schema.json"
  ]
}

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

Contribution & Development

See CONTRIBUTING.md

Authors

See contributors

Changes

See CHANGES.md.

License

See LICENSE

About

[WORK IN PROGRESS] Create STAC Items from vector datasets

License:MIT License


Languages

Language:Python 100.0%