Skip to content

Commit

Permalink
set start date as date time
Browse files Browse the repository at this point in the history
  • Loading branch information
baloola committed Jul 22, 2023
1 parent 9828275 commit 91ea6ad
Show file tree
Hide file tree
Showing 38 changed files with 41 additions and 40 deletions.
7 changes: 4 additions & 3 deletions stac/stac-generator/collection_convertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ def create_links(title):
start_date = extent["temporal"]["interval"][0][0]
end_date = extent["temporal"]["interval"][0][1]
date = datetime.strptime('2000-01-01T00:00:00Z', "%Y-%m-%dT%H:%M:%SZ")
if start_date:
start_date = datetime.strptime(start_date, "%Y-%m-%dT%H:%M:%SZ")
date = start_date

if end_date:
end_date = datetime.strptime(end_date, "%Y-%m-%dT%H:%M:%SZ")
date = end_date

if start_date:
start_date = datetime.strptime(start_date, "%Y-%m-%dT%H:%M:%SZ")
date = start_date
extra_fields = dict()
for field in collection.extra_fields:
if field not in ["type", "cube:dimensions"]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"datetime": "2020-10-16T00:00:00Z"
"datetime": "2019-02-06T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ALOS_PALSAR2_L2_1_10M/ALOS_PALSAR2_L2_1_10M.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"datetime": "2021-04-08T00:00:00Z"
"datetime": "2019-03-06T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ALOS_PALSAR2_L2_1_3M/ALOS_PALSAR2_L2_1_3M.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2021-04-18T00:00:00Z"
"datetime": "2019-03-21T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-03-01T00:00:00Z"
"datetime": "2019-03-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/CAMS_GLC/CAMS_GLC.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
}
},
"datetime": "2017-01-01T00:00:01Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/CDS_2M_TEMP_2020/CDS_2M_TEMP_2020.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2022-04-01T00:00:00Z"
"datetime": "2019-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/CNES_LAND_COVER_MAP/CNES_LAND_COVER_MAP.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
]
}
},
"datetime": "2021-01-01T00:00:00Z"
"datetime": "2016-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/CORINE_LAND_COVER/CORINE_LAND_COVER.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
]
}
},
"datetime": "2018-01-01T00:00:00Z"
"datetime": "1990-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
]
}
},
"datetime": "2018-01-01T00:00:00Z"
"datetime": "2000-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/E12C_MOTORWAY/E12C_MOTORWAY.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-05-15T00:00:00Z"
"datetime": "2017-05-15T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/E12D_PRIMARY/E12D_PRIMARY.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-05-15T00:00:00Z"
"datetime": "2017-05-15T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-12-01T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-12-01T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-12-01T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-12-01T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ERA5_WIND_U/ERA5_WIND_U.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2022-04-01T00:00:00Z"
"datetime": "2019-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ERA5_WIND_V/ERA5_WIND_V.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2022-04-01T00:00:00Z"
"datetime": "2019-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"datetime": "2021-01-01T00:00:01Z"
"datetime": "2020-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/GHS_BUILT_S2/GHS_BUILT_S2.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
]
}
},
"datetime": "2018-01-01T00:00:01Z"
"datetime": "2018-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/GLOBAL_LAND_COVER/GLOBAL_LAND_COVER.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
]
}
},
"datetime": "2019-01-01T00:00:00Z"
"datetime": "2015-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/GLOBAL_SURFACE_WATER/GLOBAL_SURFACE_WATER.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
]
}
},
"datetime": "2020-01-01T00:00:00Z"
"datetime": "2019-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ICEYE_GRD_E11/ICEYE_GRD_E11.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-03-20T14:27:21Z"
"datetime": "2020-03-20T14:27:20Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ICEYE_GRD_E11A/ICEYE_GRD_E11A.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-04-13T13:10:17Z"
"datetime": "2020-02-07T13:08:50Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ICEYE_GRD_E13B/ICEYE_GRD_E13B.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-08-29T03:28:38Z"
"datetime": "2020-02-04T03:38:35Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/ICEYE_GRD_E3/ICEYE_GRD_E3.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
}
},
"datetime": "2020-07-17T03:44:28Z"
"datetime": "2020-02-04T03:38:35Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/JAXA_WQ_CHLA_AVERAGE/JAXA_WQ_CHLA_AVERAGE.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"datetime": "2021-05-22T00:00:00Z"
"datetime": "2018-01-06T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/JAXA_WQ_TSM_AVERAGE/JAXA_WQ_TSM_AVERAGE.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"datetime": "2021-05-22T00:00:00Z"
"datetime": "2018-01-06T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/LANDSAT1-5_MSS_L1/LANDSAT1-5_MSS_L1.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
]
}
},
"datetime": "2013-01-01T00:00:00Z"
"datetime": "1972-07-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/LANDSAT4-5_TM_L1/LANDSAT4-5_TM_L1.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
]
}
},
"datetime": "2012-05-04T00:00:00Z"
"datetime": "1982-07-16T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/LANDSAT4-5_TM_L2/LANDSAT4-5_TM_L2.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
]
}
},
"datetime": "2012-05-04T00:00:00Z"
"datetime": "1982-07-16T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
}
},
"datetime": "2021-01-01T00:00:00Z"
"datetime": "2016-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/POPULATION_DENSITY/POPULATION_DENSITY.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
}
},
"datetime": "2020-05-01T00:00:01Z"
"datetime": "2020-05-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/SEASONAL_TRAJECTORIES/SEASONAL_TRAJECTORIES.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
]
}
},
"datetime": "2021-12-21T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion stac_dist/SEA_ICE_INDEX/SEA_ICE_INDEX.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
]
}
},
"datetime": "2021-05-03T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
]
}
},
"datetime": "2020-12-22T00:00:00Z"
"datetime": "2020-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
]
}
},
"datetime": "2021-01-01T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
]
}
},
"datetime": "2021-01-01T00:00:00Z"
"datetime": "2017-01-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
Expand Down

0 comments on commit 91ea6ad

Please sign in to comment.