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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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