Skip to main content

Connect PgSTAC and TiTiler

Project description

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 which connect to pgstac STAC database in order to create mosaics in response to a STAC-api search query.

Installation

To install from PyPI and run:

# Make sure to have pip up to date
$ python -m pip install -U pip

# Install psycopg2 or psycopg2-binary
$ python -m pip install psycopg2-binary  # or psycopg2

$ 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 .

psycopg2 requirement

titiler.pgstac depends on the psycopg2 library. Because there are two ways of installing this package (psycopg2 or psycopg2-binary), the user must install this separately from titiler.pgstac. psycopg2-binary is a binary wheel distribution of the psycopg2 package and is simpler for development. psycopg2 is generally recommended for production use. Note that to install psycopg2, you'll need to have Postgres headers installed and available for the compilation process.

Launch

You'll need to have POSTGRES_USER, POSTGRES_PASS, POSTGRES_DBNAME, POSTGRES_HOST_READER, POSTGRES_HOST_WRITER, 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_READER=database
export POSTGRES_HOST_WRITER=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 build
$ docker-compose up

Contribution & Development

See CONTRIBUTING.md

License

See LICENSE

Authors

See contributors for a listing of individual contributors.

Changes

See CHANGES.md.

Project details


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-0.1.0a1.tar.gz (14.2 kB view details)

Uploaded Source

File details

Details for the file titiler.pgstac-0.1.0a1.tar.gz.

File metadata

  • Download URL: titiler.pgstac-0.1.0a1.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for titiler.pgstac-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 84bac0c41e7dae9e65a676d3c3db7d60d015e1bacf2cffd631483266100eb803
MD5 2855e2a349675869396449caaecfddbc
BLAKE2b-256 0e949c1be10d5dda491483f9e1aa951af961e3355554ec08eda58128da1f0690

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page