Skip to main content

Connect PgSTAC and TiTiler.

Test Coverage Package version License


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 the libpq installed in the system.
  • psycopg["binary"]: binary wheel distribution (shipped with libpq) of the psycopg package 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 the libpq installed 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 python
  • python -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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

titiler_pgstac-1.8.1.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

titiler_pgstac-1.8.1-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file titiler_pgstac-1.8.1.tar.gz.

File metadata

  • Download URL: titiler_pgstac-1.8.1.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for titiler_pgstac-1.8.1.tar.gz
Algorithm Hash digest
SHA256 cab064a0b949e3c4de39b9256bec32091341f66cf37d60f516bfa77e01c88150
MD5 1b8e3d2f7d381cabd4d98d72aee5b884
BLAKE2b-256 4d71ae26465126797e5737499d6ad38ff9db30689b86241d0f07aa842a7b95c5

See more details on using hashes here.

File details

Details for the file titiler_pgstac-1.8.1-py3-none-any.whl.

File metadata

  • Download URL: titiler_pgstac-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 41.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for titiler_pgstac-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 774522af50522186656b14cc4c07e50a63df24ce9341297f4e82272d313f67ff
MD5 5a97eea7a514da9e61ccbe91f9231aa3
BLAKE2b-256 692c197b3a9cfb31b1aaa28806489d4ef6e36473b39a7925d92d66ac8fdafb76

See more details on using hashes here.

Release history Release notifications | RSS feed

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.1.0

2 files

2.0.0

2 files

1.9.0

2 files

This release

1.8.1 This release

2 files

1.8.0

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.4

2 files

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page