-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
Client.get_collection
for static catalogs (#782)
* add static catalog to test data (copied from pystac) * ensure that `Client.get_collection` returns specified collection * ensure that if no matching collection is found it raises
- Loading branch information
Showing
18 changed files
with
966 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"type": "Catalog", | ||
"id": "test", | ||
"stac_version": "1.1.0", | ||
"description": "test catalog", | ||
"links": [ | ||
{ | ||
"rel": "child", | ||
"href": "./country-1/catalog.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "child", | ||
"href": "./country-2/catalog.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "root", | ||
"href": "./catalog.json", | ||
"type": "application/json" | ||
} | ||
], | ||
"stac_extensions": [] | ||
} |
70 changes: 70 additions & 0 deletions
70
tests/data/test-case-1/country-1/area-1-1/area-1-1-imagery/area-1-1-imagery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"type": "Feature", | ||
"stac_version": "1.1.0", | ||
"id": "area-1-1-imagery", | ||
"properties": { | ||
"datetime": "2019-10-04T18:55:37Z" | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987 | ||
], | ||
[ | ||
-1.9610595703125, | ||
3.8916575492899987 | ||
], | ||
[ | ||
-1.9610595703125, | ||
4.275202171119132 | ||
], | ||
[ | ||
-2.5048828125, | ||
4.275202171119132 | ||
], | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987 | ||
] | ||
] | ||
] | ||
}, | ||
"links": [ | ||
{ | ||
"rel": "collection", | ||
"href": "../collection.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "root", | ||
"href": "../../../catalog.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "parent", | ||
"href": "../collection.json", | ||
"type": "application/json" | ||
} | ||
], | ||
"assets": { | ||
"ortho": { | ||
"href": "http://example.com/area-1-1_ortho.tif", | ||
"type": "image/vnd.stac.geotiff" | ||
}, | ||
"dsm": { | ||
"href": "http://example.com/area-1-1_dsm.tif", | ||
"type": "image/vnd.stac.geotiff" | ||
} | ||
}, | ||
"bbox": [ | ||
-2.5048828125, | ||
3.8916575492899987, | ||
-1.9610595703125, | ||
3.8916575492899987 | ||
], | ||
"stac_extensions": [], | ||
"collection": "area-1-1" | ||
} |
93 changes: 93 additions & 0 deletions
93
tests/data/test-case-1/country-1/area-1-1/area-1-1-labels/area-1-1-labels.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"type": "Feature", | ||
"stac_version": "1.1.0", | ||
"id": "area-1-1-labels", | ||
"properties": { | ||
"datetime": "2019-10-04T18:55:37Z", | ||
"label:description": "labels for area-1-1", | ||
"label:type": "vector", | ||
"label:properties": [ | ||
"label" | ||
], | ||
"label:classes": [ | ||
{ | ||
"name": "label", | ||
"classes": [ | ||
"one", | ||
"two" | ||
] | ||
} | ||
], | ||
"label:tasks": [ | ||
"classification" | ||
], | ||
"label:methods": [ | ||
"manual" | ||
] | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987 | ||
], | ||
[ | ||
-1.9610595703125, | ||
3.8916575492899987 | ||
], | ||
[ | ||
-1.9610595703125, | ||
4.275202171119132 | ||
], | ||
[ | ||
-2.5048828125, | ||
4.275202171119132 | ||
], | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987 | ||
] | ||
] | ||
] | ||
}, | ||
"links": [ | ||
{ | ||
"rel": "source", | ||
"href": "../area-1-1-imagery/area-1-1-imagery.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "collection", | ||
"href": "../collection.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "root", | ||
"href": "../../../catalog.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "parent", | ||
"href": "../collection.json", | ||
"type": "application/json" | ||
} | ||
], | ||
"assets": { | ||
"labels": { | ||
"href": "http://example.com/area-1-1-labels.geojson", | ||
"type": "application/geo+json" | ||
} | ||
}, | ||
"bbox": [ | ||
-2.5048828125, | ||
3.8916575492899987, | ||
-1.9610595703125, | ||
3.8916575492899987 | ||
], | ||
"stac_extensions": [ | ||
"https://stac-extensions.github.io/label/v1.0.1/schema.json" | ||
], | ||
"collection": "area-1-1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"type": "Collection", | ||
"id": "area-1-1", | ||
"stac_version": "1.1.0", | ||
"description": "test collection country-1", | ||
"links": [ | ||
{ | ||
"rel": "item", | ||
"href": "./area-1-1-imagery/area-1-1-imagery.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "item", | ||
"href": "./area-1-1-labels/area-1-1-labels.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "root", | ||
"href": "../../catalog.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "parent", | ||
"href": "../catalog.json", | ||
"type": "application/json" | ||
} | ||
], | ||
"stac_extensions": [], | ||
"extent": { | ||
"spatial": { | ||
"bbox": [ | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987, | ||
-1.9610595703125, | ||
4.275202171119132 | ||
] | ||
] | ||
}, | ||
"temporal": { | ||
"interval": [ | ||
[ | ||
"2019-10-04T18:55:37Z", | ||
null | ||
] | ||
] | ||
} | ||
}, | ||
"license": "other" | ||
} |
70 changes: 70 additions & 0 deletions
70
tests/data/test-case-1/country-1/area-1-2/area-1-2-imagery/area-1-2-imagery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"type": "Feature", | ||
"stac_version": "1.1.0", | ||
"id": "area-1-2-imagery", | ||
"properties": { | ||
"datetime": "2019-10-04T18:55:37Z" | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987 | ||
], | ||
[ | ||
-1.9610595703125, | ||
3.8916575492899987 | ||
], | ||
[ | ||
-1.9610595703125, | ||
4.275202171119132 | ||
], | ||
[ | ||
-2.5048828125, | ||
4.275202171119132 | ||
], | ||
[ | ||
-2.5048828125, | ||
3.8916575492899987 | ||
] | ||
] | ||
] | ||
}, | ||
"links": [ | ||
{ | ||
"rel": "collection", | ||
"href": "../collection.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "root", | ||
"href": "../../../catalog.json", | ||
"type": "application/json" | ||
}, | ||
{ | ||
"rel": "parent", | ||
"href": "../collection.json", | ||
"type": "application/json" | ||
} | ||
], | ||
"assets": { | ||
"ortho": { | ||
"href": "http://example.com/area-1-2_ortho.tif", | ||
"type": "image/vnd.stac.geotiff" | ||
}, | ||
"dsm": { | ||
"href": "http://example.com/area-1-2_dsm.tif", | ||
"type": "image/vnd.stac.geotiff" | ||
} | ||
}, | ||
"bbox": [ | ||
-2.5048828125, | ||
3.8916575492899987, | ||
-1.9610595703125, | ||
3.8916575492899987 | ||
], | ||
"stac_extensions": [], | ||
"collection": "area-1-2" | ||
} |
Oops, something went wrong.