You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TiFeatures, pronounced T[ee]Features, is a python package which helps creating lightweight Features server for PostGIS Database. The API has been designed with respect to OGC Features API specification.
The project authors choose not to implement the Part 2 of the specification to avoid the introduction of CRS based GeoJSON. This might change in the future.
While the authors tried to follow the specification (part 1 and 3) to the letter, some API endpoints might have more capabilities (e.g geometry column selection).
PostGIS/PostgreSQL
TiFeatures rely a lot of ST_* PostGIS functions. You need to make sure your PostgreSQL database has PostGIS installed.
SELECT name, default_version,installed_version
FROM pg_available_extensions WHERE name LIKE'postgis%'or name LIKE'address%';
CREATE EXTENSION postgis;
Configuration
To be able to work, the application will need access to the database. tifeatures uses starlette's configuration pattern which make use of environment variable and/or .env file to pass variable to the application.
# you need define the DATABASE_URL directly
DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis
Launch
$ pip install uvicorn
# Set your postgis database instance URL in the environment
$ export DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis
$ uvicorn tifeatures.main:app
# or using Docker
$ docker-compose up