Posts

Showing posts from June, 2015
My Geotagged Photos Extracted From FLICKR using loc.alize.us

Renaming (include adding prefix or suffix) tons of feature classes/datasets/rasters/files ( The Power Of Phyton Part 4)

Hello,hey its been a while, today im going to post another phyton codes for your geoprocessing boooring routines. this time I will give short code that is very useful to batch renaming bunch of feature classes in your geodatabases. The code itself just be done few minutes ago when I must renaming tons of feature classes in my current project at office (its about preparing basemap for 50.000 scale Infrastructure map) so lets rideeee # name = batch_renaming.py # Description = rename feature classes in a feature dataset in a fast way # Import System Modules import arcpy from arcpy import env # Set Workspace env.workspace = "E:/Workspace2015/BASEMAP_PII2015/Procdir/SBA Batas_admin_Kabupaten_2013_1/SBA.gdb" # Calling All feature classess list_Fcs = arcpy.ListFeatureClasses() # And Call the Loop Processor for name in list_Fcs:arcpy.Rename_management(name,('batas_kabupaten_'+name)) Explanation : 1. Calling arcpy modules and env (environment), means ArcGIS w