Skip to content

Commit

Permalink
fixes to stac step
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricebrito committed Oct 19, 2023
1 parent 2593844 commit 2935a49
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion water-bodies/app-package-cloud-native.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cwlVersion: v1.0

$namespaces:
s: https://schema.org/
s:softwareVersion: 1.1.9
s:softwareVersion: 1.2.0
schemas:
- http://schema.org/version/9.0/schemaorg-current-http.rdf

Expand Down
2 changes: 1 addition & 1 deletion water-bodies/app-package.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cwlVersion: v1.0

$namespaces:
s: https://schema.org/
s:softwareVersion: 1.1.9
s:softwareVersion: 1.2.0
schemas:
- http://schema.org/version/9.0/schemaorg-current-http.rdf

Expand Down
8 changes: 7 additions & 1 deletion water-bodies/command-line-tools/stac/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ def to_stac(item_urls, water_bodies):
cat = pystac.Catalog(id="catalog", description="water-bodies")

for index, item_url in enumerate(item_urls):

if os.path.isdir(item_url):
catalog = pystac.read_file(os.path.join(item_url, "catalog.json"))
item = next(catalog.get_items())
else:
item = pystac.read_file(item_url)

item = pystac.read_file(item_url)

water_body = water_bodies[index]

os.mkdir(item.id)
Expand Down

0 comments on commit 2935a49

Please sign in to comment.