Geo-Visualization Tools

geotiff2shp potrace wrapper script

Here you can find a simple wrapper shell script invoking potrace to vectorize a geotiff file and generate a shapefile with the same coordinate system as the geotiff. You can either use it directly or use it as an example how to invoke potrace for geodata applications.

The script uses gdal_translate to convert the source file to PGM and to read the coordinate system information and ogr2ogr to convert the potrace output to a shapefile and assign the correct coordinate system information. So GDAL and OGR are required for this script to work.

The script takes four parameters, the last two of them are optional:

  1. The source file (can be any GDAL supported file format that contains coordinate system information) This file should have the same resolution in both coordinate system directions.
  2. The output vector file
  3. The output file type (any file type supported by OGR for writing can be used). Defaults to 'ESRI Shapefile'
  4. Potrace options to use. Defaults to '-z black -a 1.5 -t 1 -i'.

This program is licensed under the external linkGNU General Public License version 3.

Visitor comments:

no comments yet.

Leave a comment
You have to enable Javascript to be able to write comments.
human verification Please enter the code you can see in the image on the left to verify you are a human and not a spamming script.
* * Required field
Information about you
will not be made public
will be displayed with your posting
Your comment (no HTML)


If you want to send a private message to the author of this website you can do so via Email.

The comments will be reviewed before they are added to the site. So you might need to wait some time until your entry turns up.

Please note this comment function is intended for commenting on the text and images, not for discussing political or religious views. Comments with no relation to the content of this site will not be approved.

By submitting your comment you agree to the privacy policy and agree to the information you provide (except for the email address) to be published on this website.