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 hashes)

Uploaded Source

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