My ultimate goal is to automate kernel density analysis on xy data from a table. I am trying to learn Python but I am very new. I built a simple model to take table data and display xy data. When I attempt to export the model as a Python script, the script fails. I do not have a programming background but I have programmers available to me.
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# test.py
# Created on: 2014-02-12 13:14:37.00000
# (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------
# Import arcpy module
import arcpy
# Local variables:
Input_Table = "C:\\Users\\cbriglia\\Desktop\\GIS\\Worksheets\\accidents_jan_2013.xls\\Sheet1$"
Sheet1__Layer = "Sheet1$_Layer"
Ouput_Feature_Class = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\acc_jan_2013_builder.shp"
# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(Input_Table, "longitude", "latitude", Sheet1__Layer, "GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision", "")
# Process: Copy Features
arcpy.CopyFeatures_management(Sheet1__Layer, Ouput_Feature_Class, "", "0", "0", "0")
Runtime error Traceback (most recent call last): File "", line 19, in File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 6348, in MakeXYEventLayer raise e ExecuteError: ERROR 000582: Error occurred during execution.