Skip to content

Commit

Permalink
resolve non existing links
Browse files Browse the repository at this point in the history
  • Loading branch information
baloola committed Jul 21, 2023
1 parent a4313e3 commit df81fc2
Show file tree
Hide file tree
Showing 62 changed files with 64 additions and 298 deletions.
5 changes: 3 additions & 2 deletions stac/stac-generator/collection_convertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def create_links(title):
feature.extra_fields = extra_fields
collection_links = collection.links
for link in collection_links:
if link.rel == "self":
if link.rel == "self" or (link.rel == "license" and link.href == ''):
collection_links.remove(link)
additional_links = create_links(feature.id)
collection_links.extend(additional_links)
Expand All @@ -112,4 +112,5 @@ def create_links(title):

index_catalog.normalize_and_save(
root_href="stac_dist/",
catalog_type=pystac.CatalogType.SELF_CONTAINED)
catalog_type=pystac.CatalogType.SELF_CONTAINED,
skip_unresolved=True)
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions 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 @@ -101,17 +101,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions 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 @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/CAMS_GLC/CAMS_GLC.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/CDS_2M_TEMP_2020/CDS_2M_TEMP_2020.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
3 changes: 1 addition & 2 deletions stac_dist/CNES_LAND_COVER_MAP/CNES_LAND_COVER_MAP.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/CNR_CHL/CNR_CHL.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/CNR_TSM/CNR_TSM.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
3 changes: 1 addition & 2 deletions stac_dist/COPERNICUS_30/COPERNICUS_30.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
3 changes: 1 addition & 2 deletions stac_dist/CORINE_LAND_COVER/CORINE_LAND_COVER.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/E12C_MOTORWAY/E12C_MOTORWAY.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/E12D_PRIMARY/E12D_PRIMARY.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/EMODNET_VESSEL_DENSITY/EMODNET_VESSEL_DENSITY.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/ERA5_WIND_U/ERA5_WIND_U.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
9 changes: 1 addition & 8 deletions stac_dist/ERA5_WIND_V/ERA5_WIND_V.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,10 @@
"sentinelhub:mosaicking_order": "mostRecent",
"sentinelhub:upsampling": "BICUBIC"
},
{
"rel": "license",
"href": "",
"type": "text/html",
"title": "License"
},
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
3 changes: 1 addition & 2 deletions stac_dist/GHS_BUILT_S2/GHS_BUILT_S2.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
3 changes: 1 addition & 2 deletions stac_dist/GLOBAL_LAND_COVER/GLOBAL_LAND_COVER.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
3 changes: 1 addition & 2 deletions stac_dist/GLOBAL_SURFACE_WATER/GLOBAL_SURFACE_WATER.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@
{
"rel": "root",
"href": "https://fairicube.github.io/data-requests/catalog.json",
"type": "application/json",
"title": "data-access catalog"
"type": "application/json"
},
{
"rel": "parent",
Expand Down
Loading

0 comments on commit df81fc2

Please sign in to comment.