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

Datetime as null is not accepted by the STAC FASTAPI #637

Closed
sylar11 opened this issue Feb 19, 2024 · 8 comments
Closed

Datetime as null is not accepted by the STAC FASTAPI #637

sylar11 opened this issue Feb 19, 2024 · 8 comments

Comments

@sylar11
Copy link

sylar11 commented Feb 19, 2024

Hi all,
if I try to upload the following STAC item file:

STAC item
{
  "id": "SenET_Ebro_202005",
  "bbox": [
    -5.467733333,
    39.606033333,
    3.1200666669999997,
    43.353633333
  ],
  "type": "Feature",
  "links": [
    {
      "rel": "collection",
      "type": "application/json",
      "href": "https://stac.eurac.edu/collections/SenET_Ebro_basin"
    },
    {
      "rel": "parent",
      "type": "application/json",
      "href": "https://stac.eurac.edu/collections/SenET_Ebro_basin"
    },
    {
      "rel": "root",
      "type": "application/json",
      "href": "https://stac.eurac.edu/"
    },
    {
      "rel": "self",
      "type": "application/geo+json",
      "href": "https://stac.eurac.edu/collections/SenET_Ebro_basin/items/SenET_Ebro_202005"
    }
  ],
  "assets": {
    "visual": {
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/Subset_SenET_Ebro_20200529.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "visual"
      ],
      "title": "SenET_Ebro_202005 quicklook"
    },
    "thumbnail": {
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/Subset_SenET_Ebro_20200529.png",
      "type": "image/png",
      "roles": [
        "thumbnail"
      ],
      "title": "Thumbnail"
    },
    "daily_evaporation_20200501000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200501000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200501000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200501000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200502000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200502000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200502000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200502000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200503000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200503000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200503000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200503000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200504000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200504000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200504000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200504000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200505000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200505000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200505000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200505000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200506000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200506000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200506000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200506000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200507000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200507000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200507000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200507000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200508000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200508000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200508000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200508000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200509000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200509000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200509000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200509000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200510000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200510000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200510000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200510000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200511000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200511000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200511000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200511000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200512000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200512000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200512000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200512000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200513000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200513000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200513000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200513000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200515000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200515000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200515000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200515000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200516000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200516000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200516000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200516000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200517000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200517000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200517000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200517000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200518000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200518000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200518000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200518000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200519000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200519000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200519000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200519000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200520000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200520000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200520000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200520000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200521000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200521000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200521000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200521000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200522000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200522000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200522000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200522000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200523000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200523000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200523000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200523000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200524000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200524000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200524000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200524000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200525000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200525000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200525000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200525000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200526000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200526000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200526000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200526000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200527000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200527000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200527000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200527000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200528000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200528000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200528000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200528000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200529000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200529000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200529000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200529000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200530000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200530000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200530000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200530000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    },
    "daily_evaporation_20200531000000": {
      "gsd": 100,
      "href": "https://eurac-eo.s3-eu-west-1.amazonaws.com/SenET_Ebro_basin/daily_evaporation_SenET_Ebro_20200531000000.tif",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
      "roles": [
        "data",
        "tseb"
      ],
      "title": "daily_evaporation_20200531000000",
      "eo:bands": [
        {
          "name": "daily_evaporation_20200531000000",
          "common_name": "quality-checked daily evaporation estimates [mm day-1] corresponding to Sentinel-3 acquisition days",
          "description": "Daily evaporation product Ebro basin"
        }
      ],
      "proj:bbox": [
        -5.467733333,
        39.606033333,
        3.1200666669999997,
        43.353633333
      ],
      "proj:epsg": 4326,
      "proj:shape": [
        9542,
        4164
      ],
      "proj:transform": [
        0.0009000000000014552,
        0,
        -5.467733333000001,
        0,
        -0.0008999999999999993,
        43.353633333
      ]
    }
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          -5.467733333,
          39.606033333
        ],
        [
          3.1200666669999997,
          39.606033333
        ],
        [
          3.1200666669999997,
          43.353633333
        ],
        [
          -5.467733333,
          43.353633333
        ],
        [
          -5.467733333,
          39.606033333
        ]
      ]
    ]
  },
  "collection": "SenET_Ebro_basin",
  "properties": {
    "datetime": null,
    "gsd": 100,
    "title": "SenET_Ebro_202005",
    "created": "2023-10-12T14:24:00Z",
    "platform": "Sentinel-2A/B, Sentinel-3A/B",
    "proj:epsg": 4326,
    "description": "Daily evaporation data are produced from Two-Source Energy Balanced (TSEB) model driven by ESA Sentinel (both Sentinel-2 MSI and Sentinel-3 SLSTR) and ERA5 reanalysis data",
    "instruments": [
      "MSI, SLSTR"
    ],
    "end_datetime": "2020-05-31T00:00:00Z",
    "constellation": "Sentinel-2, Sentinel-3",
    "start_datetime": "2020-05-01T00:00:00Z"
  },
  "stac_version": "1.0.0",
  "stac_extensions": [
    "https://stac-extensions.github.io/projection/v1.0.0/schema.json"
  ]
}

If I validate this item via STAC Lint, it says that the item is correct; but, on the contrary, once I post in the STACAPI I get an error in the validation. Looking at the uploaded JSON file it shows that the property "datetime":null is not there and, as a consequence, it cannot be validated.

Is this an API bug? or am I doing something wrong?

@zachcoleman
Copy link
Contributor

Working on understanding issue here... when you upload the attached JSON which has the properties.datetime as null included, the JSON fails validation on the server since the properties.datetime is missing from the JSON that reaches server?

If this is the case, I would say it is very common for JSON encoders to drop keys that correspond to null values. Unfortunately, while this is a super common pattern the STAC spec has it listed as a required field.

How are you generating the POST request?

@sylar11
Copy link
Author

sylar11 commented Feb 20, 2024

The JSON file has the properties.datetime when I'm posting it. The POST request is not failing.
I'm creating the item both via copy and paste using the STAC-FASTAPI and via Python library requests.post.
Then, when I check via API its validity, the red cross appears.

@clausmichele
Copy link

@zachcoleman, basically it seems that the JSON encoder inside this project drops datetime: null when exposing again the uploaded JSON and therefore the exposed JSON via the API is no more valid.

@zachcoleman
Copy link
Contributor

What backend are you using @sylar11? I would like to try and recreate the issue. Looking over the possible places that stac-fastapi would drop this field, I haven't seen any (starlette JSONResponse, ORJSONResponse w/ appropriate flags, the std library json encoder/decoder, etc.). I'm now fairly convinced this would occur from the backend.

@mmcfarland
Copy link
Contributor

pgstac has an open issue that may be related.

stac-utils/pgstac#158

@thomas-maschler
Copy link
Contributor

stac-utils/stac-pydantic#135 addresses this issue.

But there are still a couple of PRs in front of this before this can be merged.
stac-utils/stac-pydantic#131 and #625

@sylar11
Copy link
Author

sylar11 commented Feb 22, 2024

@zachcoleman we are using PgSTAC as backend. Please let me know if you need more information to reproduce the issue.

@vincentsarago
Copy link
Member

should be resolved with the latest updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants