Skip to content

Commit fe83534

Browse files
authored
Merge pull request #136 from stac-utils/update-readme-item-collection
Update readme with information about new cli options: --item-collection, --collections, --pages
2 parents 7f50eee + 34b56e9 commit fe83534

File tree

1 file changed

+80
-6
lines changed

1 file changed

+80
-6
lines changed

README.md

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The intent of this project is to provide a validation tool that also follows the
3535
- [Link and Asset Validation](#link-and-asset-validation)
3636
- [Invalid STAC](#invalid-stac)
3737
- [Using HTTP Headers](#using-http-headers)
38+
- [STAC API Validation](#stac-api-validation)
3839
- [Development](#development)
3940
- [Sponsors and Supporters](#sponsors-and-supporters)
4041
- [Contributing](#contributing)
@@ -110,6 +111,12 @@ Options:
110111
multiple times.
111112
--pydantic Use stac-pydantic for enhanced validation with Pydantic models.
112113
--verbose Show verbose error messages.
114+
--item-collection Validate item collection response. Can be combined with
115+
--pages. Defaults to one page.
116+
--collections Validate collections endpoint response. Can be combined with
117+
--pages. Defaults to one page.
118+
-p, --pages INTEGER Maximum number of pages to validate via --item-collection
119+
or --collections. Defaults to one page.
113120
--help Show this message and exit.
114121
```
115122

@@ -221,7 +228,7 @@ stac-check sample_files/0.9.0/landsat8-sample.json
221228

222229
Please upgrade from version 0.9.0 to version 1.1.0!
223230

224-
Validator: stac-validator 3.5.0
231+
Validator: stac-validator 3.9.1
225232

226233
Valid ITEM: True
227234

@@ -253,7 +260,7 @@ stac-check https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-f
253260

254261
Please upgrade from version 0.9.0 to version 1.1.0!
255262

256-
Validator: stac-validator 3.5.0
263+
Validator: stac-validator 3.9.1
257264

258265

259266
Recursive: Validate all assets in a collection or catalog
@@ -299,7 +306,7 @@ stac-check sample_files/1.0.0/core-item.json --assets
299306

300307
Please upgrade from version 1.0.0 to version 1.1.0!
301308

302-
Validator: stac-validator 3.5.0
309+
Validator: stac-validator 3.9.1
303310

304311
Valid ITEM: True
305312

@@ -337,7 +344,7 @@ stac-check sample_files/1.0.0/core-item-bad-links.json --links --assets
337344

338345
Please upgrade from version 1.0.0 to version 1.1.0!
339346

340-
Validator: stac-validator 3.5.0
347+
Validator: stac-validator 3.9.1
341348

342349
Valid ITEM: True
343350

@@ -384,7 +391,7 @@ stac-check sample_files/0.9.0/bad-item.json
384391

385392
Please upgrade from version 0.9.0 to version 1.1.0!
386393

387-
Validator: stac-validator 3.5.0
394+
Validator: stac-validator 3.9.1
388395

389396
Valid : False
390397

@@ -413,7 +420,7 @@ stac-check https://stac-catalog.eu/collections/sentinel-s2-l2a/items/item1 --ass
413420

414421
Please upgrade from version 1.0.0 to version 1.1.0!
415422

416-
Validator: stac-validator 3.5.0
423+
Validator: stac-validator 3.9.1
417424

418425
Valid ITEM: True
419426

@@ -431,6 +438,73 @@ No ASSET format errors!
431438
This object has 4 links
432439
</pre>
433440

441+
### STAC API Validation
442+
443+
stac-check can validate STAC API endpoints, including item collections and collections endpoints. It supports pagination and can validate multiple pages of results.
444+
445+
**Validating an Item Collection Endpoint:**
446+
447+
```bash
448+
stac-check https://stac.geobon.org/collections/chelsa-clim/items --item-collection
449+
```
450+
451+
<pre><b>stac-check: STAC spec validation and linting tool</b>
452+
453+
Validator: stac-validator 3.9.1
454+
455+
Item Collection: Validate all assets in a feature collection
456+
Pages = 1
457+
458+
Valid ITEM: True
459+
460+
Schemas validated:
461+
https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json
462+
463+
This object has 10 items
464+
</pre>
465+
466+
**Validating Multiple Pages of an Item Collection:**
467+
468+
```bash
469+
stac-check https://stac.geobon.org/collections/chelsa-clim/items --item-collection --pages 3
470+
```
471+
472+
<pre><b>stac-check: STAC spec validation and linting tool</b>
473+
474+
Validator: stac-validator 3.9.1
475+
476+
Item Collection: Validate all assets in a feature collection
477+
Pages = 3
478+
479+
Valid ITEM: True
480+
481+
Schemas validated:
482+
https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json
483+
484+
This object has 30 items
485+
</pre>
486+
487+
**Validating a Collections Endpoint:**
488+
489+
```bash
490+
stac-check https://stac.geobon.org/collections --collections
491+
```
492+
493+
<pre><b>stac-check: STAC spec validation and linting tool</b>
494+
495+
Validator: stac-validator 3.9.1
496+
497+
Collections: Validate all collections in a STAC API
498+
Pages = 1
499+
500+
Valid COLLECTION: True
501+
502+
Schemas validated:
503+
https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json
504+
505+
This object has 5 collections
506+
</pre>
507+
434508
## Development
435509

436510
Create local docs in the /docs folder:

0 commit comments

Comments
 (0)