Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sadly the answer to this question 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?

share|improve this question

2 Answers 2

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.

share|improve this answer
    
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

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.

share|improve this answer
    
I like the potrace approach used in OSM. –  maning Mar 16 '11 at 12:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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