Skip to content


Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.

Test Coverage Package version License


Source Code: developmentseed/tipg

tipg, pronounced T[ee]pg, is a Python package that helps create lightweight OGC Features and Tiles API with a PostGIS Database backend. The API has been designed for OGC Features and OGC Tiles specifications.

Note This project is the result of the merge between tifeatures and timvt.


$ python -m pip install pip -U
$ python -m pip install tipg

# or from source
$ git clone
$ cd tipg
$ python -m pip install -e .

OGC Specifications

Specification Status link
OGC Common Part 1: Core
OGC Common Part 2: Geospatial Data
OGC Features Part 1: Core
OGC Features Part 2: CRS by Reference
OGC Features Part 3: Filtering / CQL2
OGC Tiles Part 1: Core


We chose to avoid implementing the second part of the specification to prevent the introduction of CRS-based GeoJSON. We may review this decision in the future.

While we tried to follow OGC specifications to the letter, some API endpoints might have more capabilities (e.g., geometry column selection).


tipg relies greatly on PostGIS' ST_* functions. PostGIS must be installed on your PostgreSQL database.

SELECT name, default_version,installed_version
FROM pg_available_extensions WHERE name LIKE 'postgis%' or name LIKE 'address%';


To be able to work, the application will need access to the database. tipg uses Starlette's configuration pattern, which makes use of environment variables or a .env file to pass variables to the application.

An example of a .env file can be found in .env.example

# you need to define the DATABASE_URL directly
DATABASE_URL=postgresql://username:[email protected]:5432/postgis

More info about configuration options at


$ pip install uvicorn

# Set your PostGIS database instance URL in the environment
$ export DATABASE_URL=postgresql://username:[email protected]:5432/postgis
$ uvicorn tipg.main:app

# or using Docker

$ docker-compose up app

Docker images

We are publishing two different docker images on tag and on every commit to main branch:

Gunicorn Uvicorn
main commit
dockerfile /dockerfiles/Dockerfile.gunicorn /dockerfiles/Dockerfile.uvicorn

See all version at

# Gunicorn image
$ docker run \
    -p 8081:8081 \
    -e PORT=8081 \
    -e DATABASE_URL=postgresql://username:[email protected]:5432/postgis \

# or Uvicorn image
$ docker run \
    -p 8081:8081 \
    -e PORT=8081 \
    -e DATABASE_URL=postgresql://username:[email protected]:5432/postgis \

Note: If you are planning to use the docker image in a kubernetes deployment you may want to use the uvicorn image (ref:

Contribution & Development





Created by Development Seed