I would like to vectorize a PNG containing lines (DN=1 for line, DN=0 for transparent background). See below. As the data is georeferenced I'm asking it here. I would like to automate the vectorization and I'm currently looking into Python/GDAL/QGIS solutions with a vector result in the form of a shapefile. I found gdal_polygonize but this tools creates a polygon shapefile while I would like to create polylines. Does anyone have an idea how to make this work?

UPDATE: Searching for an open source solution, so without using ArcGIS like this solution.

enter image description here

  • Suggested approach in the linked answer was r.to.vect but as you already have polygon Vector | Geometry Tools | Polygons to Lines can also be useful. – Kazuhito Mar 2 '17 at 21:21
  • Polygons to Lines creates lines of the polygon borders so that's not what I'm after unfortunately. – joosthoek Mar 2 '17 at 21:45
  • Yes I forgot to mention r.to.vect, my bad. I will try it out, and an other option may be found in: stackoverflow.com/questions/3713821/… – joosthoek Mar 2 '17 at 21:47

Browse other questions tagged or ask your own question.