Skip to main content

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:

Heightmap with contour lines Heightmap with contour lines

Heightmap with contour lines Heightmap with contour lines

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 and poetry
    • added cli tool to make library available from command line

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

contourheightmap-1.1.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contourheightmap-1.1.1-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file contourheightmap-1.1.1.tar.gz.

File metadata

  • Download URL: contourheightmap-1.1.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.7.9 Linux/5.13.0-35-generic

File hashes

Hashes for contourheightmap-1.1.1.tar.gz
Algorithm Hash digest
SHA256 eabbec957d16ad5e5cc00c2efa35ab489dfe4b29ed3e756df3c97bedf850bc46
MD5 5914c0e9c31af4167e08d91a81bc3185
BLAKE2b-256 e4ea45203f53cf0d6c913f1921b01c675a88e734ec62de7b2bfc650ba2767782

See more details on using hashes here.

File details

Details for the file contourheightmap-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: contourheightmap-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.7.9 Linux/5.13.0-35-generic

File hashes

Hashes for contourheightmap-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0fac81f2243563af8bd0c286453611d754553bdfa4820b8b7c4bd033dbf40b7
MD5 24c4597f92c8670f9da434a3e6de7a78
BLAKE2b-256 7fcac5341e5b3402432c72db2d1395422d7ce0fe7b03fd27ce535478f46e8779

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page