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:
- 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.
- The output vector file
- The output file type (any file type supported by OGR for writing can be used). Defaults to 'ESRI Shapefile'
- Potrace options to use. Defaults to '-z black -a 1.5 -t 1 -i'.
This program is licensed under the GNU General Public License version 3.
Visitor comments:
no comments yet.
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.