Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _convert_old_odc_dataset_to_new(ds: Dataset) -> DatasetDoc:
product = ProductDoc(name=ds.type.name)
properties = StacPropertyView(ds.metadata_doc['properties'])
return DatasetDoc(
id=ds.id,
product=product,
crs=ds.crs.crs_str,
properties=properties