opendatacube / datacube-core

Open Data Cube analyses continental scale Earth Observation data through time
http://www.opendatacube.org
Apache License 2.0
505 stars 176 forks source link

`dataset.metadata.fields` return both `creation_dt` and `creation_time`. #1295

Closed pindge closed 1 year ago

pindge commented 2 years ago

Expected behaviour

return either creation_time or creation_dt as they are the same fields

Actual behaviour

{'creation_time': datetime.datetime(2012, 1, 1, 0, 0),
 'format': 'GeoTIFF',
 'label': None,
 'lat': Range(begin=-20.000103279534002, end=-15.999825404949501),
 'lon': Range(begin=137.9997761436025, end=144.000054066587),
 'time': Range(begin=datetime.datetime(2000, 2, 1, 0, 0, 1, tzinfo=datetime.timezone.utc), end=datetime.datetime(2008, 3, 31, 23, 59, 59, 999999, tzinfo=datetime.timezone.utc)),
 'platform': None,
 'instrument': None,
 'product_type': 'aster_false_colour',
 'id': '64a0a0ac-78c4-4b0a-a65a-b51d83362cbc',
 'sources': {},
 'creation_dt': '2012-01-01',
 'grid_spatial': {'geo_ref_points': {'ll': {'x': 137.9997761436025,
    'y': -20.000103279534002},
   'lr': {'x': 144.000054066587, 'y': -20.000103279534002},
   'ul': {'x': 137.9997761436025, 'y': -15.999825404949501},
   'ur': {'x': 144.000054066587, 'y': -15.999825404949501}},
  'spatial_reference': 'EPSG:4283'},
 'measurements': {'Band_1': {'path': 'SE54_False_Colour_Band1.tif',
   'layer': '1'},
  'Band_2': {'path': 'SE54_False_Colour_Band2.tif', 'layer': '1'},
  'Band_3': {'path': 'SE54_False_Colour_Band3.tif', 'layer': '1'}}}

Steps to reproduce the behaviour

from datacube import Datacube
dc = Datacube()
dataset= dc.index.datasets.get("64a0a0ac-78c4-4b0a-a65a-b51d83362cbc")
dataset.metadata.fields

Environment information

Note: Stale issues will be automatically closed after a period of six months with no activity. To ensure critical issues are not closed, tag them with the Github pinned tag. If you are a community member and not a maintainer please escalate this issue to maintainers via GIS StackExchange or Slack.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SpacemanPaul commented 1 year ago

Agree this is redundant, but both have been around so long that removing either must be considered compatibility-breaking. Consider for v2.

SpacemanPaul commented 1 year ago

Really an eo3 issue. Not sure if much can be done about it.