从栅格表面创建矢量数据集
项目描述
Python中的栅格到矢量表面创建工具
安装
从GitHub
pip install -e git+git@github.com:mapbox/make-surface.git#egg=makesurface
从PyPI
pip install makesurface --pre
手册
安装依赖项
‘click>=3.0’,‘fiona’,‘numpy’,‘rasterio’,‘shapely’,‘scipy’,‘mercantile’,‘pyproj’
克隆此仓库
:console:git clone git@github.com:mapbox/make-surface.git
cd进入 :console:make-surface 然后 pip install -e .
用法 - 向量化
makesurface vectorize [OPTIONS] INFILE
接受一个输入栅格,并将其转换为叠加的shapefile。类似于< span class="docutils literal">gdal polygonize span>,但具有更多控制,针对矢量瓦片进行了优化。还可以打印出用于风格的CartoCSS模板(每个类一个样式)。
图像
选项
--outfile TEXT Write to GeoJSON
-b, --bidx INTEGER Input band to vectorize. [default = 1]
-cl, --classes TEXT Number of output classes, OR "all" for rounded
input values (ignored if class file specified)
[default = 10]
-cf, --classfile TEXT One-line CSV of break values [default = None]
-w, --weight FLOAT Weighting between equal interval and quantile
breaks [default = 1 / equal interval]
-s, --smoothing INTEGER Value by which to zoom and smooth the data [default
= None]
-n, --nodata TEXT Manually defined nodata value - can be any number
or "min" [default = None]
-ov, --outvar TEXT Name of output variable [Default = value]
-set, --setnodata FLOAT Value to set nodata to (eg, if nodata / masked, set
pixel to this value) [default = None]
-c, --carto
-ni, --nibble Expand mask by 1 pixel
--axonometrize FLOAT EXPERIMENTAL
-ns, --nosimple
--help Show this message and exit.
用法 - 三角化
makesurface triangulate [OPTIONS] ZOOM
创建一个空的三角形网格:
Options:
--bounds FLOAT... Bounding Box ("w s e n") to create lattice in
--tile INTEGER... Tile ("x y z") to create lattice in
--output TEXT File to write to (.geojson)
--tableid TEXT static id for databases
--help Show this message and exit.
用法 - 填充面片
makesurface fillfacets [OPTIONS] SAMPLERASTER [INFILE]
使用类似GeoJSON的三角形几何形状来获取该几何形状的平均区域栅格值
图像
选项
--output TEXT Write output to .json [default - print to stdout]
-b, --bidxs TEXT... Band to sample [default=1]
--zooming INTEGER Manual upsampling of raster for sampling [Default =
upsampling by estimated polygon density]
-np, --noproject Do not project data
-ogjs, --outputgeojson Output updated GeoJSON
-bp, --batchprint TEXT
-cl, --color
--help Show this message and exit.
项目详情
关闭
makesurface-0.2.14dev.tar.gz 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | fd56e72c685c68b4936145d8eb9b404bfcbd2535d7619533544e6af90086a38d |
|
| MD5 | 4063cada77607fd7ed2d0d3e3833b613 |
|
| BLAKE2b-256 | 7da8d6b3561d36bc45eaa6aba7b05624b9fa351430be7ac4b05cbb5d1c0958af |