stuckhere

Convert SHPs to Coverage using List ArcMap 9.3.1

Discussion created by stuckhere on Apr 23, 2013
Latest reply on Apr 23, 2013 by stuckhere
I'm new to Python and am attempting to create coverages from a list of shapefiles in a folder using 9.3.1.  I tried to borrow/modify code from a similar process.  When I run the script I get, "<type 'exceptions.SyntaxError'>: invalid syntax" for the gp.FeatureClassToCoverage.... line of my script.  I'm sure its something obvious but I'm running out of ideas.  Any help is appreciated.  Thanks!

# Import system modules
import sys, string, os, datetime, arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

# Load required toolboxes...
gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolBox/Toolboxes/Data Management Tools.tbx")
gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")


# Local variables...


InDir = "D:\\Workspace\\Directory\\OUTPUTS\\SHP"
print "InDir: " + InDir
OutRootDir = "D:\\Workspace\\Directory\\OUTPUTS\\COV"
print "OutRootDir: " + OutRootDir

OutDir = OutRootDir
if not os.path.exists(OutDir):
        os.makedirs(OutDir)
       
print "OutDir: " + OutDir

count = 1

# Process files in input directory
lstFiles = os.listdir(InDir)
for inputSHP0 in lstFiles:

    if( inputSHP0.endswith(".SHP") ):
            print "Process file: " + inputSHP0

            inputSHP1 = inputSHP0.replace(".SHP","$")
            print "table: " +inputSHP1

           inputSHP10 = inputSHP0.replace(".SHP", "")
            i = len(inputSHP10) - 2
           inputSHP1 = inputSHP10[0:i] + "$"

            inputSHP = InDir + "\\" + inputSHP0 + "\\" + input1
            print "path: " + inputSHP


            out_cover = inputSHP0.replace(".SHP","")
            count += 1

          
            #Process: Convert to Coverage
            print "Convert to Coverage..."
            gp.FeatureclassToCoverage_conversion (inputSHP POINT; out_cover; "0 Decimal Degrees", "Double")
          
print "Finished"

Outcomes