

ARCGIS PYTHON API HOW TO
This book will target ArcGIS for Desktop 10.1 and later, and will demonstrate how to make use of Python and its powerful programming libraries (or modules) when crafting complex geospatial analyses. ArcPy has been the official ArcGIS scripting language since ArcGIS 10.0 and has steadily improved in functionality and implementation. Most importantly to GIS Analysts, Python can be used to control ArcGIS tools and Map Documents to produce geospatial data and maps in an organized and speedy manner using the excellent ArcPy module.ĪrcPy is installed with ArcGIS for desktop and ArcGIS for server. It is used in web development, database administration, and even to program robots. Today, Python is a major programming language. It's certainly more fun to say than C, the language on which Python is based. So he settled on Python, feeling it was a bit edgy and catchy as well.
ARCGIS PYTHON API TV
His work group at the time had a tradition of naming programs after TV shows, and he wanted something irreverent and different from its predecessors - ABC, Pascal, Ada, Eiffel, FORTRAN, and others. Python, created by Guido van Rossum in 1989, was named after his favorite comedy troupe, Monty Python. SaveToLayerFile_management ( out_Layer, saved_Layer ) except Exception as err : print ( err. GetCount_management ( out_Layer )) # Save to a layer file arcpy. MakeXYEventLayer_management ( in_Table, x_coords, y_coords, out_Layer, spRef, z_coords ) # Print the total rows print ( arcpy. workspace = "C:/data" try : # Set the local variables in_Table = "firestations.dbf" x_coords = "POINT_X" y_coords = "POINT_Y" z_coords = "POINT_Z" out_Layer = "firestations_layer" saved_Layer = r"c:\output\firestations.lyr" # Set the spatial reference spRef = r"Coordinate Systems\Projected Coordinate Systems\Utm\Nad 1983\NAD 1983 UTM Zone 11N.prj" # Make the XY event layer. # MakeXYLayer.py # Description: Creates an XY layer and exports it to a layer file # import system modules import arcpy # Set environment settings arcpy.

Syntax MakeXYEventLayer_management (table, in_x_field, in_y_field, out_layer, ) Parameter Many delimited text files or tables from OLE DS connections do not have ObjectID fields. If the input table does not have an ObjectID field, you will not be able to make selections or add joins to the resulting layer. Learn more about working with tabular text files To use an input table with a nonstandard delimiter, you must first specify the correct delimiter used in the table using a schema.ini file. The standard delimiter for tabular text files with extensions. Alternatives to directly moving these points are to change the x- and y-coordinate attributes in the input table, then re-create the event layer, or save the event layer to a feature class on disk, then perform edits on the feature class. It is not possible to interactively move the output layer's points through editing controls, since event layers are not editable. You can export this event layer to a feature class on disk using the Copy Features, Feature to Point, or Feature Class to Feature Class tool. The output point feature layer created by this tool is temporary and will not persist after the session ends. Learn more about adding x,y coordinate data to a map Usage The layer created by this tool is temporary.

If the source table contains z-coordinates (elevation values), that field can also be specified in the creation of the event layer. Creates a new point feature layer based on x- and y-coordinates defined in a source table.
