A fast python library and command line tool for generating topographic contour maps from heightmaps and images.
Project description
Contour Heightmap
A fast python library and command line tool for generating contour maps from heightmaps and images.
Given an image file (preferably RGB PNG), it will output a PNG with topographic contour lines and an SVG file of the contour lines.
If viewing this document on the gitlab page, you should see some example images below:
Questions? Contributions? Bug reports? Open an issue on the gitlab page for the project.
We are very interested in hearing your use cases for contourheightmap
to help drive the roadmap.
Roadmap
- More control on the output image
- More control on the output svg
Contributors
- Luke Miller
Installing
pip install contourheightmap
or
py -m pip install contourheightmap
Source
git clone https://gitlab.com/dodgyville/contourheightmap
Quick Start
How do I...
Contour an image from the shell command line?
contourheightmap path/to/heightmap.png
Result will be in output.png and output.svg
Provide an output file from the shell command line?
contourheightmap path/to/heightmap.png my-output.png
Result will be in my-output.png and my-output.svg
Contour an image from within python?
from contourheightmap import ContourHeightmap
c = ContourHeightmap()
c.contour("path/to/heightmap.png")
Result will be in output.png and output.svg
Provide an output filename within python?
from contourheightmap import ContourHeightmap
c = ContourHeightmap()
c.contour("path/to/heightmap.png", "path/to/output.png")
Output will also be in path/to/output.svg
Changelog
- 1.1.0
- begin switch from setup.py to
pyproject
andpoetry
- added cli tool to make library available from command line
- begin switch from setup.py to
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for contourheightmap-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0fac81f2243563af8bd0c286453611d754553bdfa4820b8b7c4bd033dbf40b7 |
|
MD5 | 24c4597f92c8670f9da434a3e6de7a78 |
|
BLAKE2b-256 | 7fcac5341e5b3402432c72db2d1395422d7ce0fe7b03fd27ce535478f46e8779 |