Connect PgSTAC and TiTiler.
Project description
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:
We recommand using uv as project manager for development.
See https://docs.astral.sh/uv/getting-started/installation/ for installation
git clone https://github.com/stac-utils/titiler-pgstac.git
cd titiler-pgstac
uv sync --extra psycopg
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 PGUSER, PGPASSWORD, PGDATABASE, PGHOST, PGPORT variables set in your environment pointing to your Postgres database where pgstac has been installed.
export PGUSER=username
export PGPASSWORD=password
export PGDATABASE=postgis
export PGHOST=database
export PGPORT=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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file titiler_pgstac-2.0.0.tar.gz.
File metadata
- Download URL: titiler_pgstac-2.0.0.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e91f0adaeee07db87468b97fd59da5ba84c584df9f55b2b3bc0fa3211be1eb8
|
|
| MD5 |
aea84d6a6edee2cec20b5693622d61e4
|
|
| BLAKE2b-256 |
a079623a786e5e64e563a0ce64143c480b3db94a8503a47dfe4bc64a32c29279
|
File details
Details for the file titiler_pgstac-2.0.0-py3-none-any.whl.
File metadata
- Download URL: titiler_pgstac-2.0.0-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32dc894f4fdfd2547bd626b34e3366fd5ad9998114c0378728ad464f9ffc2cc1
|
|
| MD5 |
53f560380bcb0c2df19c8e894bac0882
|
|
| BLAKE2b-256 |
d4379959c24f22ea49956e5aeff8cc27f4702d01b4569030c764f2c1e76c807e
|