Sadly the answer to Can you access ArcScan from a python script? suggests that it is not possible to script ArcScan from within a python script.

Therefore, does anyone know of any alternatives to ArcScan (either within ArcGIS, or within another GIS, or anything really...) that are scriptable? The functionality that I am in need of is the ability to convert from raster to vector by 'intelligently' vectorising lines. For example, ArcScan allows you to set a distance tolerance so that any lines that are vectorised and are less than that distance apart will be joined together. It also does various other sensible things with raster lines (for example, if a line is 3 pixels wide it vectorises it to a single line placed in the middle of the raster line).

Any ideas?


I doubt there is anything that does exactly what ArcScan does automatically, without introducing multiple steps -- the process is a complex one which requires decisions, so each package will likely take a slightly different approach. That said, GRASS has a tutorial on contour line conversions which should fit the bill, within that guide only a few commands form the actual conversion and should be easily scriptable.

The OSM folks have used Potrace to perform automated conversion to vectors (in this example, polygons), but I'm sure the same approach could be used to emulate the specifics of ArcScan. One challenge of using closed source software is it can be difficult to replicate the results elsewhere, since we don't know what the 'merchandise 7X' is within the steps, unless the tools are extremely well documented.


GDAL, Grass, and R all have very powerful tools within them. They are/can all be scripted.

There have been several threads here touting some of the functionality of each.

OSGeo.org will get you info on gdal and grass.

R has some of the most eloquently written help/howto documentation I have seen anywhere.
r-projects.org is where you start for that.

  • Thanks for the pointers. I was wondering particularly whether there were any other tools that did what ArcScan does in one step, rather than as a complex combination of various tools. Do you know if Grass, GDAL or R have a tool that allows this to be done easily? – robintw Jan 18 '11 at 22:58
  • I have attempted polygonal vectorization from gdal. It is very easy. I have lost the link to the command line (but it was actually for line vectorization). Did I say it is very easy? – Brad Nesom Jan 18 '11 at 23:25
  • From what I can see of the GDAL documentation there is a polygonal vectorisation command, but nothing for line vectorisation. I will investigate these commands. – robintw Jan 19 '11 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.