从光栅曲面创建矢量数据集
makesurface的Python项目详细描述
光栅–>;Python中的矢量曲面创建工具
安装
来自Github:
pip install -egit+git@github.com:mapbox/make-surface.git#egg=makesurface
来自Pypi
pip install makesurface --pre
手动
- 安装依赖项:
'单击'gt;=3.0'、'fiona'、'numpy'、'rasterio'、'shapely'、'scipy', “商业”,“Pyproj”
- 克隆此回购:
:控制台:git clone git@github.com:mapbox/make-surface.git
- CD进入:控制台:^{TT4}$然后^{TT5}$
用法-矢量化
makesurface vectorize [OPTIONS] INFILE
接受输入光栅,并转换为堆叠形状文件。某种程度上 像gdal polygonize一样,有更多的控件,针对矢量平铺进行了优化。 也可以打印出一个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.