PXM摄入质量控制
tilecontrol的Python项目详细描述
tilecontrol包含用于卫星基础地图质量控制的实用程序。我们 使用它捕获tileset中的nodata和http错误。
安装
pip install tilecontrol
要求
场景缓存
s3://mapbox-pxm/scenes内容的最新列表是 要求进行准确的质量控制工作。生成该列表可能非常 耗时,大约几个小时。
替代地,使用现有的缓存。
$ aws s3 ls mapbox/playground/satellite-qc/scene_caches/ 2015-11-03 10:13:21 2864329827 2015-10-11.log 2015-10-27 10:33:36 4712506108 2015-10-26.log 2015-11-04 11:51:02 6533519570 2015-11-04.log
一个api令牌
您自己的令牌应该足够用于公共数据集。供私人使用 马赛克(像DG),我们在 https://github.com/mapbox/dg-utils/issues/140。
命令行界面
$ tlc Usage: tlc [OPTIONS] COMMAND [ARGS]... Utilities for Satellite basemap quality control Options: --help Show this message and exit. Commands: check Catch HTTP and Nodata errors. edges Finds the edges of a set of tiles. init Bootstrap the QC process. parse_checker_results Legacy - Parse `checker` output.
init
tlc init启动qc进程。除了s3 场景缓存,它创建qc的其余部分 进程正在运行。
它接受以下参数:找到的马赛克的-source_id。 在pxm-sources中。- ^拼接的{tt5}$,例如mapbox.satellite-test。- cache引用s3 scene list,并应为本地 文件。-destination表示希望输出文件 储存起来。
tlc init有一个重要的选项,--token,让您 指定要用于查询的$MapboxAccessToken。你的 个人密钥可能对公用tileset有效,但对私有tileset有效 通常需要使用特殊的密钥。例如,DG QC工作 需要使用在 https://github.com/mapbox/dg-utils/issues/140。
例如:
tlc init dg_vivid_latam_caribbean digitalglobe.vivid-latam-caribbean 2015-10-11.log output --token $token
将生成以下文件:
dg_vivid_latam_caribbean_awsparse_outputs.json dg_vivid_latam_caribbean_edges_2015_11_09 dg_vivid_latam_caribbean_geojsons_2015_11_09 dg_vivid_latam_caribbean_sourceimgGeojsons_2015_11_09 dg_vivid_latam_caribbean_sourceimgnames_2015_11_09 dg_vivid_latam_caribbean_zxy_2015_11_09
edges
tlc edges通常作为init子命令的一部分调用。 对于任何形状的镶嵌图,它将识别存在于上面的那些瓦片。 马赛克的边缘。
- 输入是zxy的列表
- 输出是zxy的列表
check
tlc check执行qc过程,该过程包括检查 我们希望存在的URL的HTTP或HTTP错误。
它接受以下参数:马赛克的-layer_id,例如 mapbox.satellite-test。-inzxy要检查的zxy列表。- edges马赛克边缘的zxy列表。-geojsons 我们希望在scene cache中找到的文件名列表。
此外,它还需要一个--token选项,如 tlc init。
例如:
tlc check dg_vivid_eastern_europe dg_vivid_eastern_europe_zxy_2015_10_27 dg_vivid_eastern_europe_edges_2015_10_27 dg_vivid_eastern_europe_geojsons_2015_10_27 --token $token
将生成以下文件:
dg_vivid_eastern_europe_missing_and_nodata_zxy dg_vivid_eastern_europe_missing_and_nodata_sourceimgs
贡献
针对tilecontrol:
开发git clone git@github.com:mapbox/tilecontrol.git cd tilecontrol pip install -e ".[test]"
可以使用py.test
运行测试