Connect PgSTAC and TiTiler.
Documentation: https://stac-utils.github.io/titiler-pgstac/
Source Code: https://github.com/stac-utils/titiler-pgstac
TiTiler-PgSTAC is a TiTiler extension that connects to a PgSTAC database to create dynamic mosaics based on search queries.
Installation
To install from PyPI and run:
# Make sure to have pip up to date
$ python -m pip install -U pip
# Install `psycopg` or `psycopg["binary"]` or `psycopg["c"]`
$ python -m pip install psycopg["binary"]
$ python -m pip install titiler.pgstac
To install from sources and run for development:
$ git clone https://github.com/stac-utils/titiler-pgstac.git
$ cd titiler-pgstac
$ python -m pip install -e .
PgSTAC version
titiler.pgstac depends on pgstac >=0.3.4 (https://github.com/stac-utils/pgstac/blob/main/CHANGELOG.md#v034).
psycopg requirement
titiler.pgstac depends on the psycopg library. Because there are three ways of installing this package (psycopg or , psycopg["c"], psycopg["binary"]), the user must install this separately from titiler.pgstac.
psycopg: no wheel, pure python implementation. It requires thelibpqinstalled in the system.psycopg["binary"]: binary wheel distribution (shipped with libpq) of thepsycopgpackage and is simpler for development. It requires development packages installed on the client machine.psycopg["c"]: a C (faster) implementation of the libpq wrapper. It requires thelibpqinstalled in the system.
psycopg[c] or psycopg are generally recommended for production use.
In titiler.pgstac setup.py, we have added three options to let users choose which psycopg install to use:
python -m pip install titiler.pgstac["psycopg"]: pure pythonpython -m pip install titiler.pgstac["psycopg-c"]: use the C wrapper (requires development packages installed on the client machine)python -m pip install titiler.pgstac["psycopg-binary"]: binary wheels
Launch
You'll need to have POSTGRES_USER, POSTGRES_PASS, POSTGRES_DBNAME, POSTGRES_HOST, POSTGRES_PORT variables set in your environment pointing to your Postgres database where pgstac has been installed.
export POSTGRES_USER=username
export POSTGRES_PASS=password
export POSTGRES_DBNAME=postgis
export POSTGRES_HOST=database
export POSTGRES_PORT=5432
$ python -m pip install uvicorn
$ uvicorn titiler.pgstac.main:app --reload
Using Docker
$ git clone https://github.com/stac-utils/titiler-pgstac.git
$ cd titiler-pgstac
$ docker compose up --build tiler
# or
$ docker compose up --build tiler-uvicorn
Contribution & Development
See CONTRIBUTING.md
License
See LICENSE
Authors
See contributors for a listing of individual contributors.
Changes
See CHANGES.md.
Metadata
Release files for titiler-pgstac 1.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| titiler_pgstac-1.7.1.tar.gz | 38.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| titiler_pgstac-1.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.5 kB
Release files / titiler_pgstac-1.7.1.tar.gz
| Download URL | titiler_pgstac-1.7.1.tar.gz |
|---|---|
| Size | 38.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f086bcf9bab9221a4a74458844fffc7a322fa654dc2434d30a7bec104c04f26
|
|
BLAKE2b-256 checksum How to use checksums |
bc4886257dfbcfd7cb3e3c60d2abdfaaeb396debf7320850724e67427e5f0261
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / titiler_pgstac-1.7.1-py3-none-any.whl
| Download URL | titiler_pgstac-1.7.1-py3-none-any.whl |
|---|---|
| Size | 42.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6222be92c6f8401751f7361faa549c8809120b00b8ad56e3c335959b01e3b2b
|
|
BLAKE2b-256 checksum How to use checksums |
d76ca808562464a52d05bdb79cca964e04dc4a83503ced8ab6180b74ffb66d48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|