NASA-IMPACT / veda-data

2 stars 0 forks source link

Fix 'eis_fire' Collections that Point Non-Existent tipg Collections #42

Open ranchodeluxe opened 10 months ago

ranchodeluxe commented 10 months ago

For the following collections fix the links[].rel==child:

https://staging-stac.delta-backend.com/collections/eis_fire_newfirepix https://staging-stac.delta-backend.com/collections/eis_fire_fireline

ranchodeluxe commented 10 months ago

updated, here's the response JSON now for the items:

[{'id': 'eis_fire_perimeter',
  'type': 'Collection',
  'links': [{'rel': 'items',
    'type': 'application/geo+json',
    'href': 'https://staging-stac.delta-backend.com/collections/eis_fire_perimeter/items'},
   {'rel': 'parent',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/'},
   {'rel': 'root',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/'},
   {'rel': 'self',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/collections/eis_fire_perimeter'},
   {'rel': 'child',
    'href': 'https://firenrt.delta-backend.com/collections/public.eis_fire_snapshot_perimeter_nrt',
    'type': 'application/json',
    'title': None,
    'label:assets': None},
   {'rel': 'external',
    'href': 'https://firenrt.delta-backend.com/collections/public.eis_fire_snapshot_perimeter_nrt',
    'type': 'application/json',
    'title': None,
    'label:assets': None}],
  'title': 'Fire Perimeters',
  'assets': None,
  'extent': {'spatial': {'bbox': None},
   'temporal': {'interval': [[None, None]]}},
  'license': 'public-domain',
  'keywords': None,
  'providers': None,
  'summaries': None,
  'description': 'Perimeter of cumulative fire-area estimated from VIIRs detections',
  'item_assets': {'cog_default': {'type': 'image/tiff; application=geotiff; profile=cloud-optimized',
    'roles': ['data', 'layer'],
    'title': 'Default COG Layer',
    'description': 'Cloud optimized default layer to display on map'}},
  'stac_version': '1.0.0',
  'stac_extensions': None,
  'dashboard:is_periodic': True,
  'dashboard:time_density': 'day'},
 {'id': 'eis_fire_fireline',
  'type': 'Collection',
  'links': [{'rel': 'items',
    'type': 'application/geo+json',
    'href': 'https://staging-stac.delta-backend.com/collections/eis_fire_fireline/items'},
   {'rel': 'parent',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/'},
   {'rel': 'root',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/'},
   {'rel': 'self',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/collections/eis_fire_fireline'},
   {'rel': 'child',
    'href': 'https://firenrt.delta-backend.com/collections/public.eis_fire_snapshot_fireline_nrt',
    'type': 'application/json',
    'title': None,
    'label:assets': None}],
  'title': 'Active Fire Line',
  'assets': None,
  'extent': {'spatial': {'bbox': None},
   'temporal': {'interval': [[None, None]]}},
  'license': 'public-domain',
  'keywords': None,
  'providers': None,
  'summaries': None,
  'description': 'Active fire line as estimated by new VIIRS detections.',
  'item_assets': {'cog_default': {'type': 'image/tiff; application=geotiff; profile=cloud-optimized',
    'roles': ['data', 'layer'],
    'title': 'Default COG Layer',
    'description': 'Cloud optimized default layer to display on map'}},
  'stac_version': '1.0.0',
  'stac_extensions': None,
  'dashboard:is_periodic': True,
  'dashboard:time_density': 'day'},
 {'id': 'eis_fire_newfirepix',
  'type': 'Collection',
  'links': [{'rel': 'items',
    'type': 'application/geo+json',
    'href': 'https://staging-stac.delta-backend.com/collections/eis_fire_newfirepix/items'},
   {'rel': 'parent',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/'},
   {'rel': 'root',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/'},
   {'rel': 'self',
    'type': 'application/json',
    'href': 'https://staging-stac.delta-backend.com/collections/eis_fire_newfirepix'},
   {'rel': 'child',
    'href': 'https://firenrt.delta-backend.com/collections/public.eis_fire_snapshot_newfirepix_nrt',
    'type': 'application/json',
    'title': None,
    'label:assets': None}],
  'title': 'VIIRs Fire Detections',
  'assets': None,
  'extent': {'spatial': {'bbox': None},
   'temporal': {'interval': [[None, None]]}},
  'license': 'public-domain',
  'keywords': None,
  'providers': None,
  'summaries': None,
  'description': 'Most Recent VIIRs detections that inform the most recent time-step’s fire perimeter and active fire line calculation',
  'item_assets': {'cog_default': {'type': 'image/tiff; application=geotiff; profile=cloud-optimized',
    'roles': ['data', 'layer'],
    'title': 'Default COG Layer',
    'description': 'Cloud optimized default layer to display on map'}},
  'stac_version': '1.0.0',
  'stac_extensions': None,
  'dashboard:is_periodic': True,
  'dashboard:time_density': 'day'}]
ranchodeluxe commented 10 months ago

though why do some have links of rel='external'?

smohiudd commented 10 months ago

We had to use external because using child wasn't STAC compliant. The plan was to remove the child link

ranchodeluxe commented 10 months ago

thanks @smohiudd let me fix those