A PgSTAC Backend for TiPG.
Documentation:
Source Code: https://github.com/developmentseed/tipgstac
Create a simple STAC API using TiPg
and PgSTAC database. The API should be OGC Features compliant (see: https://github.com/developmentseed/tipg#ogc-specifications)
git clone https://github.com/developmentseed/tipgstac.git
cd tipgstac
python -m pip install -e .
To be able to work, the application will need access to the database. tipgstac
uses Starlette's configuration pattern, which makes use of environment variables or a .env
file to pass variables to the application.
An example of a .env
file can be found in .env.example
# you need to define the DATABASE_URL directly
DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis
By default, pgstac does not have the context
extension enabled (ability to return number of matched items). To enable this you'll need to access the database and run this:
INSERT INTO pgstac_settings (name, value)
VALUES ('context', 'on')
ON CONFLICT ON CONSTRAINT pgstac_settings_pkey DO UPDATE SET value = excluded.value;
$ pip install uvicorn
# Set your PostGIS database instance URL in the environment
$ export DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis
$ uvicorn tipgstac.main:app
# or using Docker
$ docker-compose up app
See CONTRIBUTING.md
See LICENSE
Created by Development Seed
See CHANGES.md.