跳转到主要内容

为PostGIS数据库提供简单快速的地理空间功能API。

项目描述

为PostGIS数据库提供简单快速的地理空间功能API。

Test Coverage Package version License


文档: https://developmentseed.org/tifeatures/

源代码: https://github.com/developmentseed/tifeatures


:warning: 我们专注于 developmentseed/tipg,因此该项目处于暂停状态 :warning

参考:https://github.com/developmentseed/timvt/discussions/96


TiFeatures,发音为 T[ee]Features,是一个 python 包,它帮助创建为PostGIS数据库创建轻量级 功能 服务器。该API是根据 OGC Features API规范 设计的。


安装

$ 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规范

规范 状态 链接
第1部分:核心 https://docs.ogc.org/is/17-069r4/17-069r4.html
第2部分:参考CRS https://docs.ogc.org/is/18-058r1/18-058r1.html
第3部分:过滤/ CQL2 https://docs.ogc.org/DRAFTS/19-079r1.html

备注

项目作者选择不实现规范的第2部分,以避免引入基于CRS的GeoJSON。这可能会在未来改变。

虽然作者试图严格按照规范(第1部分和第3部分)执行,但某些API端点可能具有更多功能(例如,选择几何列)。

PostGIS/PostgreSQL

TiFeatures大量依赖ST_* PostGIS函数。您需要确保您的PostgreSQL数据库已安装PostGIS。

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

配置

为了能够工作,应用程序需要访问数据库。《code>tifeatures使用starlette的配置模式,该模式利用环境变量和/或.env文件将变量传递给应用程序。

.env文件的示例可以在.env.example中找到

# you need define the DATABASE_URL directly
DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis

启动

$ 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

贡献与发展

请参阅CONTRIBUTING.md

许可证

请参阅LICENSE

作者

Development Seed创建

变更

请参阅CHANGES.md

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

tifeatures-0.1.0a4.tar.gz (35.3 kB 查看哈希值)

上传时间

构建分布

tifeatures-0.1.0a4-py3-none-any.whl (43.9 kB 查看哈希值)

上传时间 Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面