Original User: luke.kaimI am getting errors when I run this bit of code and can not figure out why. Is this because of the variables I am using?
import arcpy, sys, os, re, time
from arcpy import env
from arcpy.sa import *
import arcpy
print "Start time = " + time.asctime()
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:\\Users\\Luke Kaim\\Documents\\university_of_maine\\research4\\test7"
# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
APPROACH_ContourLine_Clip="C:\\Users\\Luke Kaim\\Documents\\university_of_maine\\research4\\test5\\APPROACH_HARBOR_DEPCNT_line.shp"
# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
APPROACH_ContourLine_Project_shp = "APPROACH_ContourLine_Project.shp"
Generalize_ContourLine5meter_shp = "Generalize_ContourLine5meter.shp"
allinputpoints_shp = "allinputpoints2.shp"
test = "test.shp"
# Process: Simplify Line
arcpy.SimplifyLine_cartography(APPROACH_ContourLine_Clip, Generalize_ContourLine5meter_shp, "POINT_REMOVE", "5 Meters", "RESOLVE_ERRORS", "NO_KEEP", "CHECK")
# Process: Feature Vertices To Points
arcpy.FeatureVerticesToPoints_management(Generalize_ContourLine5meter_shp, test, "ALL")
# Process: Add Field (4)
arcpy.AddField_management(test, "input", "SHORT", "", "", "", "", "NON_NULLABLE", "NON_REQUIRED", "")
# Process: Calculate Field (4)
arcpy.CalculateField_management(test, "input", "4", "PYTHON_9.3", "")
print "start projection"
# Process: Project (5)
arcpy.Project_management(test, APPROACH_ContourLine_Project_shp, "PROJCS['NAD_1983_UTM_Zone_19N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-69.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]", "NAD_1983_To_WGS_1984_1", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]")
print "finsihed projection"