Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.
Project description
Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.
Documentation: https://developmentseed.org/tipg/
Source Code: https://github.com/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.
Install
$ python -m pip install pip -U
$ python -m pip install tipg
# or from source
$ git clone https://github.com/developmentseed/tipg.git
$ cd tipg
$ python -m pip install -e .
OGC Specifications
Specification | Status | link |
---|---|---|
OGC Common Part 1: Core | ✅ | https://docs.ogc.org/DRAFTS/19-072.html |
OGC Common Part 2: Geospatial Data | ✅ | http://docs.ogc.org/DRAFTS/20-024.html |
OGC Features Part 1: Core | ✅ | https://docs.ogc.org/is/17-069r4/17-069r4.html |
OGC Features Part 2: CRS by Reference | ❌ | https://docs.ogc.org/is/18-058r1/18-058r1.html |
OGC Features Part 3: Filtering / CQL2 | ✅ | https://docs.ogc.org/DRAFTS/19-079r1.html |
OGC Tiles Part 1: Core | ✅ | https://docs.ogc.org/is/20-057/20-057.html |
Notes:
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).
PostGIS/PostgreSQL
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%';
CREATE EXTENSION postgis;
Configuration
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:password@0.0.0.0:5432/postgis
More info about configuration options at https://developmentseed.org/tipg/user_guide/configuration/
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 tipg.main:app
# or using Docker
$ docker-compose up app
Contribution & Development
See CONTRIBUTING.md
License
See LICENSE
Authors
Created by Development Seed
Changes
See CHANGES.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tipg-0.4.4.tar.gz
.
File metadata
- Download URL: tipg-0.4.4.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d23b7c0ea2d3b351aac1fbcd91f6041d0aa768c1774ac61ef4de5a726027e43 |
|
MD5 | dcfd9aa88342b349499a48445c08b516 |
|
BLAKE2b-256 | 7e0ec7e9e53a1aec562b9da2cc753b6e50edc56935c0b02c874cee2611b399f7 |
File details
Details for the file tipg-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: tipg-0.4.4-py3-none-any.whl
- Upload date:
- Size: 67.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a01a7aacf2c04d7d52b7247dd543eca4cc87ae893c750f73551f57b3f0c35c6d |
|
MD5 | 02097901ede9f3ee4fc1373e6a9440ce |
|
BLAKE2b-256 | f83a00cd4cb420f183c55229db1ce9702483b6d7237f6c84d3dbce0bbce410f5 |