Skip to content

Commit c2b7e0e

Browse files
author
Jon Duckworth
authored
Merge pull request #373 from gadomski/fix/collection-assets
Fix collection assets
2 parents 7e4602f + f2f0678 commit c2b7e0e

File tree

18 files changed

+68
-242
lines changed

18 files changed

+68
-242
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515

1616
- Links to STAC Spec point to latest supported version ([#368](https://github.com/stac-utils/pystac/pull/368))
1717
- Links to STAC Extension pages point to repos in `stac-extensions` GitHub org ([#368](https://github.com/stac-utils/pystac/pull/368))
18+
- Collection assets ([#373](https://github.com/stac-utils/pystac/pull/373))
1819

1920
### Removed
2021

22+
- Two v0.6.0 examples from the test suite ([#373](https://github.com/stac-utils/pystac/pull/373))
23+
2124
## [1.0.0-beta.2]
2225

2326
### Changed

pystac/collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ def from_dict(
715715

716716
if assets is not None:
717717
for asset_key, asset_dict in assets.items():
718-
collection.add_asset(asset_key, Asset(asset_dict))
718+
collection.add_asset(asset_key, Asset.from_dict(asset_dict))
719719

720720
return collection
721721

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"type": "Collection",
3+
"id": "area-1-1",
4+
"stac_version": "1.0.0-rc.4",
5+
"description": "test collection country-1",
6+
"links": [
7+
{
8+
"rel": "root",
9+
"href": "./multi-extent.json",
10+
"type": "application/json"
11+
},
12+
{
13+
"rel": "item",
14+
"href": "./area-1-1-imagery/area-1-1-imagery.json",
15+
"type": "application/json"
16+
},
17+
{
18+
"rel": "item",
19+
"href": "./area-1-1-labels/area-1-1-labels.json",
20+
"type": "application/json"
21+
},
22+
{
23+
"rel": "parent",
24+
"href": "../catalog.json",
25+
"type": "application/json"
26+
}
27+
],
28+
"stac_extensions": [],
29+
"extent": {
30+
"spatial": {
31+
"bbox": [
32+
[
33+
-2.5048828125,
34+
3.8916575492899987,
35+
-1.9610595703125,
36+
4.275202171119132
37+
]
38+
]
39+
},
40+
"temporal": {
41+
"interval": [
42+
[
43+
"2019-10-04T18:55:37Z",
44+
null
45+
]
46+
]
47+
}
48+
},
49+
"license": "proprietary",
50+
"assets": {
51+
"thumbnail": {
52+
"title": "thumbnail",
53+
"href": "http://example.com/thumbnail.png",
54+
"media_type": "image/png"
55+
}
56+
}
57+
}

tests/data-files/examples/example-info.csv

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,6 @@
121121
"iserv-0.6.1/2013/03/catalog.json","CATALOG","0.6.1",""
122122
"iserv-0.6.1/2013/catalog.json","CATALOG","0.6.1",""
123123
"iserv-0.6.1/catalog.json","COLLECTION","0.6.1",""
124-
"landsat-0.6.0/010/117/2015-01-02/LC80101172015002LGN00.json","ITEM","0.6.0","eo"
125-
"landsat-0.6.0/010/117/catalog.json","CATALOG","0.6.0",""
126-
"landsat-0.6.0/010/catalog.json","COLLECTION","0.6.0",""
127-
"landsat-0.6.0/156/029/2015-01-01/LC81560292015001LGN00.json","ITEM","0.6.0","eo"
128-
"landsat-0.6.0/156/029/catalog.json","CATALOG","0.6.0",""
129-
"landsat-0.6.0/156/catalog.json","COLLECTION","0.6.0",""
130-
"landsat-0.6.0/catalog.json","CATALOG","0.6.0",""
131-
"sentinel-0.6.0/catalog.json","CATALOG","0.6.0",""
132-
"sentinel-0.6.0/sentinel-2-l1c/9/V/XK/2017-10-13/S2B_9VXK_20171013_0.json","ITEM","0.6.0","eo"
133-
"sentinel-0.6.0/sentinel-2-l1c/9/V/XK/catalog.json","CATALOG","0.6.0",""
134-
"sentinel-0.6.0/sentinel-2-l1c/9/V/catalog.json","CATALOG","0.6.0",""
135-
"sentinel-0.6.0/sentinel-2-l1c/9/catalog.json","CATALOG","0.6.0",""
136-
"sentinel-0.6.0/sentinel-2-l1c/catalog.json","COLLECTION","0.6.0",""
137124
"hand-0.9.0/collection.json","COLLECTION","0.9.0",""
138125
"hand-0.8.1/collection.json","COLLECTION","0.8.1",""
139126
"1.0.0-RC3/catalog.json","CATALOG","1.0.0-rc.3",""

tests/data-files/examples/landsat-0.6.0/010/117/2015-01-02/LC80101172015002LGN00.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/data-files/examples/landsat-0.6.0/010/117/catalog.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)