Select to view content in your preferred language

Faster Way to build FC from Table

849
4
09-13-2012 10:22 AM
CameronWallace
Deactivated User
I'm looking for a faster way to build a Feature Class from a table in a python script.
arcpy.MakeXYEventLayer_management(NonExceed, "Easting", "Northing", NonExceed_Layer, spRef, "")
arcpy.CopyFeatures_management(NonExceed_Layer, NonExceed_New, "", "0", "0", "0")


Works... just goes painfully slow. It's much quicker to "Make feature class from XY table" in Catalogue.

Suggestions?
Tags (2)
0 Kudos
4 Replies
GeorgeNewbury
Frequent Contributor
In the 'Military Analyst' toolbox, 'Geometry' toolset, there are tools for Table to Point, Table to Polyline, and Table to Polygon.
0 Kudos
ChristopherThompson
Frequent Contributor
In the 'Military Analyst' toolbox, 'Geometry' toolset, there are tools for Table to Point, Table to Polyline, and Table to Polygon.

Those tools do you exactly zero good if you don't have that extension, and in fact there probably isn't a Military Analyst toolbox without the extension.

I suppose you could use a search cursor on a table of XY data, create a point from reading the XY coordinates (arcpy.Point) and then an insert cursor to put that point into a new feature class.  This topic may lead you down the right path.
http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000001v000000

Would be interesting to know if this is faster. Also if you have 3DAnalyst, you could use the ASCII 3D to Feature Class tool (Ascii3DToFeatureClass_3d(args) for scripting purposes)- your data would have to be in a specific format for this to work so you would want to read up on that.
0 Kudos
michaelcollins1
Frequent Contributor
0 Kudos
ChristopherThompson
Frequent Contributor
Military Analyst is free
http://www.esri.com/software/arcgis/defense-solutions/download

A free extension?! I never even thought such a thing might exist! Thanks for that information!
0 Kudos