https://github.com/developmentseed/tifeatures
Simple and Fast Geospatial Feature Server for PostGIS.
https://github.com/developmentseed/tifeatures
Last synced: 10 months ago
JSON representation
Simple and Fast Geospatial Feature Server for PostGIS.
- Host: GitHub
- URL: https://github.com/developmentseed/tifeatures
- Owner: developmentseed
- License: mit
- Created: 2022-04-27T13:26:16.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T08:12:34.000Z (about 3 years ago)
- Last Synced: 2025-05-29T08:17:28.163Z (11 months ago)
- Language: PLpgSQL
- Homepage: https://developmentseed.org/tifeatures/
- Size: 13.3 MB
- Stars: 49
- Watchers: 5
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Simple and Fast Geospatial Features API for PostGIS.
---
**Documentation**: https://developmentseed.org/tifeatures/
**Source Code**: https://github.com/developmentseed/tifeatures
---
> :warning: This project is on pause while we focus on [`developmentseed/tipg`](https://github.com/developmentseed/tipg) :warning:
>
> ref: https://github.com/developmentseed/timvt/discussions/96
---
`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](https://github.com/opengeospatial/ogcapi-features).
---
## Install
```bash
$ python -m pip install pip -U
$ python -m pip install tifeatures
# or from source
$ git clone https://github.com/developmentseed/tifeatures.git
$ cd tifeatures
$ python -m pip install -e .
```
## OGC Specification
Specification | Status | link |
| -- | -- | -- |
Part 1: Core | ✅ | https://docs.ogc.org/is/17-069r4/17-069r4.html
Part 2: CRS by Reference | ❌ | https://docs.ogc.org/is/18-058r1/18-058r1.html
Part 3: Filtering / CQL2 | ✅ | https://docs.ogc.org/DRAFTS/19-079r1.html
Notes:
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.
```sql
SELECT name, default_version,installed_version
FROM pg_available_extensions WHERE name LIKE 'postgis%' or name LIKE 'address%';
```
```sql
CREATE EXTENSION postgis;
```
### Configuration
To be able to work, the application will need access to the database. `tifeatures` uses [starlette](https://www.starlette.io/config/)'s configuration pattern which make use of environment variable and/or `.env` file to pass variable to the application.
Example of `.env` file can be found in [.env.example](https://github.com/developmentseed/tifeatures/blob/master/.env.example)
```
# you need define the DATABASE_URL directly
DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis
```
## Launch
```bash
$ 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
```
## Contribution & Development
See [CONTRIBUTING.md](https://github.com/developmentseed/tifeatures/blob/master/CONTRIBUTING.md)
## License
See [LICENSE](https://github.com/developmentseed/tifeatures/blob/master/LICENSE)
## Authors
Created by [Development Seed]()
## Changes
See [CHANGES.md](https://github.com/developmentseed/tifeatures/blob/master/CHANGES.md).