Skip to main content

Simple and Fast Geospatial Features API for PostGIS.

Project description

Simple and Fast Geospatial Features API for PostGIS.

Test Coverage Package version License


Documentation: https://developmentseed.org/tifeatures/

Source Code: https://github.com/developmentseed/tifeatures


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.

Install

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

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.

Example of .env file can be found in .env.example

# 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

Contribution & Development

See CONTRIBUTING.md

License

See LICENSE

Authors

Created by Development Seed

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

tifeatures-0.1.0a2.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tifeatures-0.1.0a2-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file tifeatures-0.1.0a2.tar.gz.

File metadata

  • Download URL: tifeatures-0.1.0a2.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.1

File hashes

Hashes for tifeatures-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 d47281bbd0703aa9b214a7f346a3aee5b4d8df8609a9e9c9f62de03a8cb7a651
MD5 0f50458c178504e91cb97d628d5a36e5
BLAKE2b-256 406a8f348f66099fb13bd5fdcb4319db2116362e440f3371847b68f18a1547fc

See more details on using hashes here.

File details

Details for the file tifeatures-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: tifeatures-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.1

File hashes

Hashes for tifeatures-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d48ba598b51fc37f1d117a9a0551d4fdce5a3a1f6d9ed47bef74b93b1cd36f1
MD5 b5bb49149df359a9e367cdb3231377cd
BLAKE2b-256 d96ba3baeeff1eec9b76b3137b2d693d4e7a585c6271c27ba9452487e76cd779

See more details on using hashes here.

Supported by

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