Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Trends.Earth JSON Outputs to STAC Items #871

Open
Samweli opened this issue Feb 4, 2025 · 0 comments
Open

Convert Trends.Earth JSON Outputs to STAC Items #871

Samweli opened this issue Feb 4, 2025 · 0 comments
Labels

Comments

@Samweli
Copy link
Collaborator

Samweli commented Feb 4, 2025

Part of #825

Update Trends.Earth's JSON output generation to ensure compatibility with the STAC Item specification. Each dataset instance should be wrapped in a STAC Item, with relevant metadata. Also make sure to take into account the updates discussed in the parent issues for the JSON outputs.

All the STAC Items should adhere to the standards, e.g each item should have a valid spatial (bbox), temporal (datetime), and additional properties if present.

The final STAC items should be validated using the stac-validator tool.

Sample JSON output converted to a STAC Item

{
  "stac_version": "1.0.0",
  "stac_extensions": ["https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"],
  "id": "country_sdg_15_3_1",
  "type": "Feature",
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [10.000, 5.000], [20.000, 5.000],
      [20.000, 15.000], [10.000, 15.000],
      [10.000, 5.000]
    ]]
  },
  "bbox": [10.000, 5.000, 20.000, 15.000],
  "properties": {
    "title": "SDG 15.3.1 Data for country",
    "description": "Land degradation monitoring results for country.",
    "country": "country",
    "data_source": "Trends.Earth LPD",
    "datetime": "2025-02-04T00:00:00Z"
  },
  "assets": {
    "jrc_data": {
      "href": "countries/country/assets/sdg-15-3-1-country-jrc.json",
      "title": "JRC LPD Data for country",
      "type": "application/json",
      "roles": ["data"]
    },
    "trends_earth_data": {
      "href": "countries/country/assets/sdg-15-3-1-country-trends.json",
      "title": "Trends.Earth LPD Data for country",
      "type": "application/json",
      "roles": ["data"]
    },
    "summary_excel": {
      "href": "countries/country/assets/sdg-15-3-1-summary.xlsx",
      "title": "Summary XLSX",
      "type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "roles": ["metadata"]
    },
    "summary_vrt": {
      "href": "countries/country/assets/sdg-15-3-1-summary.vrt",
      "title": "Summary VRT",
      "type": "application/x-vrt",
      "roles": ["metadata"]
    },
    "baseline_tif": {
      "href": "countries/country/assets/sdg-15-3-1-baseline.tif",
      "title": "Baseline Raster",
      "type": "image/tiff",
      "roles": ["data"]
    },
    "progress_tif": {
      "href": "countries/country/assets/sdg-15-3-1-progress.tif",
      "title": "Progress Raster",
      "type": "image/tiff",
      "roles": ["data"]
    }
  },
  "links": [
    {
      "rel": "collection",
      "href": "countries/country/country.json",
      "type": "application/json",
      "title": "SDG 15.3.1 Collection for country"
    },
    {
      "rel": "root",
      "href": "../catalog.json",
      "type": "application/json",
      "title": "Root STAC Catalog"
    }
  ]
}
@Samweli Samweli added the UR13 label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant