用于处理placekeys的SQL函数
项目描述
datasette-placekey
用于处理placekeys的SQL函数。
安装
在Datasette相同的环境中安装此插件。
$ datasette install datasette-placekey
用法
以下SQL函数已公开 - 在此处查看文档。
select
geo_to_placekey(33.0896104,129.7900839),
placekey_to_geo('@6nh-nhh-kvf'),
placekey_to_geo_latitude('@6nh-nhh-kvf'),
placekey_to_geo_longitude('@6nh-nhh-kvf'),
placekey_to_h3('@6nh-nhh-kvf'),
h3_to_placekey('8a30d94e4c87fff'),
placekey_to_geojson('@6nh-nhh-kvf'),
placekey_to_wkt('@6nh-nhh-kvf'),
placekey_format_is_valid('@6nh-nhh-kvf');
开发
要本地设置此插件,首先检出代码。然后创建一个新的虚拟环境
cd datasette-placekey
python3 -mvenv venv
source venv/bin/activate
或者如果您正在使用pipenv
pipenv shell
现在安装依赖项和测试
pip install -e '.[test]'
要运行测试
pytest