dz1-spatial-query/stac-fastapi-pgstac/scripts/validate

29 lines
1001 B
Plaintext
Raw Normal View History

2025-07-03 20:29:02 +08:00
#!/usr/bin/env sh
#
# Validate a STAC server using [stac-api-validator](https://github.com/stac-utils/stac-api-validator).
#
# Assumptions:
#
# - You have stac-api-validator installed, e.g. via `pip install stac-api-validator`
# - You've loaded the joplin data, probably using `python ./scripts/ingest_joplin.py http://localhost:8082``
#
# Currently, item-search is not checked, because it crashes stac-api-validator (probably a problem on our side).
set -e
if [ $# -eq 0 ]; then
root_url=http://localhost:8082
else
root_url="$1"
fi
geometry='{"type":"Polygon","coordinates":[[[-94.6884155,37.0595608],[-94.6884155,37.0332547],[-94.6554565,37.0332547],[-94.6554565,37.0595608],[-94.6884155,37.0595608]]]}'
stac-api-validator --root-url "$root_url" \
--conformance core \
--conformance collections \
--conformance features \
--conformance filter \
--collection joplin \
--geometry "$geometry"
# --conformance item-search # currently breaks stac-api-validator