Skip to main content

A fast python library for generating topographic contour maps from heightmaps and images.

Project description

Contour Heightmap

A fast python library 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.

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 contourheightmap import ContourHeightmap

c = ContourHeightmap()
c.contour("path/to/heightmap.png")

Result will be in output.png and output.svg

provide an output filename?

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

output a contoured image from the command line?

contourheightmap.sh examples/heightmap.png 

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.0.2.tar.gz (15.5 kB view hashes)

Uploaded Source

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