导出mbtiles的光栅化插件命令

rio-mbtiles的Python项目详细描述


https://travis-ci.org/mapbox/rio-mbtiles.svg

一个插件 Rasterio CLI 将光栅数据集导出为MBtiles(版本1.1)格式。特征 包括自动重投影和并行处理

用法

$ rio mbtiles --help
Usage: rio mbtiles [OPTIONS] INPUT [OUTPUT]

  Export a dataset to MBTiles (version 1.1) in a SQLite file.

  The input dataset may have any coordinate reference system. It must have
  at least three bands, which will be become the red, blue, and green bands
  of the output image tiles.

  An optional fourth alpha band may be copied to the output tiles by using
  the --rgba option in combination with the PNG format. This option requires
  that the input dataset has at least 4 bands.

  If no zoom levels are specified, the defaults are the zoom levels nearest
  to the one at which one tile may contain the entire source dataset.

  If a title or description for the output file are not provided, they will
  be taken from the input dataset's filename.

  This command is suited for small to medium (~1 GB) sized sources.

  Python package: rio-mbtiles (https://github.com/mapbox/rio-mbtiles).

Options:
  -o, --output PATH               Path to output file (optional alternative to
                                  a positional arg).
  --overwrite                     Always overwrite an existing output file.
  --title TEXT                    MBTiles dataset title.
  --description TEXT              MBTiles dataset description.
  --overlay                       Export as an overlay (the default).
  --baselayer                     Export as a base layer.
  -f, --format [JPEG|PNG]         Tile image format.
  --tile-size INTEGER             Width and height of individual square tiles
                                  to create.  [default: 256]
  --zoom-levels MIN..MAX          A min...max range of export zoom levels. The
                                  default zoom level is the one at which the
                                  dataset is contained within a single tile.
  --image-dump PATH               A directory into which image tiles will be
                                  optionally dumped.
  -j INTEGER                      Number of worker processes (default: 3).
  --src-nodata FLOAT              Manually override source nodata
  --dst-nodata FLOAT              Manually override destination nodata
  --resampling [nearest|bilinear|cubic|cubic_spline|lanczos|average|mode|gauss|max|min|med|q1|q3]
                                  Resampling method to use.  [default:
                                  nearest]
  --version                       Show the version and exit.
  --rgba                          Select RGBA output. For PNG only.
  --help                          Show this message and exit.

性能

rio mbtiles命令适用于中小型(~1 GB)光栅源。 在MacBookAir上,1:10米比例的自然地球光栅 (21600 x 10800像素,700 MB TIFF)导出到mbtiles(级别1到5) 45秒后

$timeGDAL_CACHEMAX=256 rio mbtiles NE1_HR_LC.tif \
> -o ne.mbtiles --zoom-levels 1..5 -j 4
real    0m44.925s
user    1m20.152s
sys     0m22.428s

安装

pip install rio-mbtiles

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将jaxb插件扩展与gradlejaxbplugin一起使用   java Hibernate列表<Object[]>到特定对象   java使用多态性显示arraylist的输出   java水平堆叠卡,带有一定偏移量   java错误:找不到符号方法liesInt()   java客户机/服务器文件收发中的多线程流管理   在java中可以基于访问重载方法吗?   包含空元素的java排序数组   swing Java按钮/网格布局   java BottomNavigationView getmaxitemcount   java空指针异常字符串生成器   java Xamarin升级导致“类文件版本错误52.0,应为50.0”错误   java我正在尝试打印它,而不只是对每一行进行println   Tomcat7中的java是否需要复制上下文。将xml转换为conf/Catalina/locahost以使其生效   带有注入服务的java REST端点在何处引发自定义WebServiceException?   在Java中使用GPS数据   java如何将JFreeChart ChartPanel导出到包含添加的CrosshairOverlay的图像对象?   内置Eclipse期间的Java 8堆栈溢出   java在GWT编译的JavaScript中如何表示BigDecimal