Re: Convert table with xy coordinates to feature class in GIS
"Neal Norwitz" <[email protected]> Wed, 23 Jan 2008 11:59:58 -0800
| Newsgroups | gmane.comp.python.compiler |
|---|---|
| Message-ID | <[email protected]> |
Hi Barry. This mailing list is not a great place to ask this question. It would be best to direct it to [email protected] (the comp.lang.python newsgroup). Cheers, n On Jan 22, 2008 9:12 AM, Barry Guidry <[email protected]> wrote: > I am trying to convert a table with x,y coordinates to an ArcGIS feature > class. I am not experienced with Python scripting, so below is the > example of a python script exported from Modelbuilder. I cannot find a > way to change the tool "Create Feature Class" to get input from the > "SDE.WELL_TEST". Here is the order of parameters of the Create Feature > Class tool: (Note, the parameters in brackets like { } are optional). > > CreateFeatureClass_management <out_path> <out_name> {POINT | MULTIPOINT > | POLYGON | POLYLINE} {template;template...} {DISABLED | > SAME_AS_TEMPLATE | ENABLED} {DISABLED | SAME_AS_TEMPLATE | ENABLED} > {spatial_reference} {config_keyword} {spatial_grid_1} {spatial_grid_2} > {spatial_grid_3} > > Any help is appreciated. > > Python script: > > # > --------------------------------------------------------------------------- > # TabletoFeature.py > # Created on: Tue Jan 22 2008 10:50:51 AM > # (generated by ArcGIS/ModelBuilder) > # > --------------------------------------------------------------------------- > > # Import system modules > import sys, string, os, arcgisscripting > > # Create the Geoprocessor object > gp = arcgisscripting.create() > > # Load required toolboxes... > gp.AddToolbox("D:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data > Management Tools.tbx") > > > # Local variables... > Well_test = "D:\\test\\Well_Annotation.mdb\\Well_test" > SDE_WELL_TEST = "Database Connections\\apps1.sde\\SDE.WELL_TEST" > XYWells = "D:\\test\\Well_Annotation.mdb\\XYWells" > > # Process: Copy Rows... > gp.CopyRows_management(Well_test, SDE_WELL_TEST, "") > > # Process: Create Feature Class... > gp.CreateFeatureclass_management("", "XYWells", "POINT", "", > "DISABLED", "DISABLED", "", "", "0", "0", "0") > > > _______________________________________________ > Compiler-sig mailing list > [email protected] > http://mail.python.org/mailman/listinfo/compiler-sig >