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 which connect to pgstac STAC database in order to create dynamic mosaics based on Search Query.
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:
pip install titiler.pgstac["psycopg"]: pure pythonpip install titiler.pgstac["psycopg-c"]: use the C wrapper (requires development packages installed on the client machine)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
$ 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
It runs titiler.pgstac using Gunicorn web server. To run Uvicorn based version:
$ 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
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-0.4.0.tar.gz.
File metadata
- Download URL: titiler.pgstac-0.4.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81404e5e5b4e46672f7f98c4fd6b5d540e3f0e01e326cce3fa38239dd2f0359
|
|
| MD5 |
0e032417a46879cb30dfb1d290c2658e
|
|
| BLAKE2b-256 |
9686555c3f900e2b9bb694a989e2bc7649f63845e7a2f736014b6bd68934a393
|
File details
Details for the file titiler.pgstac-0.4.0-py3-none-any.whl.
File metadata
- Download URL: titiler.pgstac-0.4.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
067cde18e15d1969dbab1d78c1b4c81bc6a3fe3c1160bce5e040477a69f28849
|
|
| MD5 |
ec5445312b212f078f0df84a292af80a
|
|
| BLAKE2b-256 |
1e21295ef75f3c02e1508dea43f0c0ce22d7fc352e0b8d3c6ae1348403101fd7
|