Skip to content

Commit

Permalink
add projection on cog + raw items and assets
Browse files Browse the repository at this point in the history
  • Loading branch information
lubojr committed Jul 12, 2024
1 parent cad7efb commit e7049c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/eodash_catalog/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ def handle_raw_source(
geometry=create_geojson_from_bbox(bbox),
datetime=parser.isoparse(time_entry["Time"]),
assets=assets,
extra_fields=extra_fields,
)
ep_st = endpoint_config["Style"]
style_link = Link(
Expand Down
6 changes: 5 additions & 1 deletion tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,15 @@ def test_geojson_dataset_handled(catalog_output_folder):
)
# epsg code saved on collection
assert collection_json.get("proj:epsg", "") == 3035
# epsg code is saved to item
with open(os.path.join(item_dir, item_paths[0])) as fp:
item_json = json.load(fp)
# mimetype saved correctly
assert item_json["assets"]["vector_data"]["type"] == "application/geo+json"
assert item_json["collection"] == collection_name
# epsg code is saved to item
assert item_json["proj:epsg"] == 3035
# epsg code is saved to assets
assert item_json["assets"]["vector_data"]["proj:epsg"] == 3035


def test_cog_dataset_handled(catalog_output_folder):
Expand Down

0 comments on commit e7049c9

Please sign in to comment.