This release is a pre-release and may not be stable for production use.
makesurface cool-tools
Raster –> vector surface creation tools in python
Installation
From GitHub:
pip install -e git+git@github.com:mapbox/make-surface.git#egg=makesurface
From PyPI
pip install makesurface --pre
Manual
Install dependencies:
‘click>=3.0’, ‘fiona’, ‘numpy’, ‘rasterio’, ‘shapely’, ‘scipy’, ‘mercantile’, ‘pyproj’
Clone this repo:
:console:git clone git@github.com:mapbox/make-surface.git
cd into :console:make-surface then pip install -e .
Usage - Vectorize
makesurface vectorize [OPTIONS] INFILE
Takes an input raster, and converts into a stacked shapefile. Sort of like gdal polygonize with more control, optimized for vector tiles. Also can print out a CartoCSS template for stylizing (one style for each class).
image
Options:
--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.
Usage - Triangulate
makesurface triangulate [OPTIONS] ZOOM
Creates an empty triangular lattice:
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.
Usage - fillfacets
makesurface fillfacets [OPTIONS] SAMPLERASTER [INFILE]
Use GeoJSON-like triangle geometry to get average regional raster value for that geometry
image
Options:
--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.
Metadata
Release files for makesurface 0.2.14dev
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| makesurface-0.2.14dev.tar.gz | 9.1 kB | Without provenance | Details |
Release files / makesurface-0.2.14dev.tar.gz
| Download URL | makesurface-0.2.14dev.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd56e72c685c68b4936145d8eb9b404bfcbd2535d7619533544e6af90086a38d
|
|
BLAKE2b-256 checksum How to use checksums |
7da8d6b3561d36bc45eaa6aba7b05624b9fa351430be7ac4b05cbb5d1c0958af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for makesurface 0.2.14dev
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.