ArcGIS Python rename batch grid data, arcgispython
I. Code
[Python]View plaincopyprint?
- Import arcpy
- Arcpy. env. workspace = "F :\\ NDVI \\"
- Rasters = arcpy. ListRasters ("*", "grid ")
- For raster in rasters:
- Rename = "Re _" + raster
- Arcpy. Rename_management (raster, Rename, "RasterDataset ")
- Print (raster + "---->" + Rename)
- Print ("All done ")
import arcpyarcpy.env.workspace = "F:\\NDVI\\"rasters = arcpy.ListRasters("*", "grid")for raster in rasters: Rename="Re_"+raster arcpy.Rename_management(raster, Rename, "RasterDataset") print(raster+"---->"+Rename)print("All done")
Ii. Description
1. Raster data is processed this time. It can also be used to process ShapeFile and TextFile)
2. Do not change the data format;
3. You can only rename the original data and cannot generate new files.
Iii. Running
How to rename the grid dataset file in arcgis?
Arc catalog
How does arcgis generate cost grid data?
You do not need to add the permission in the distance process.
Make the permission, such as elevation, into another grid file. The coordinate system is consistent with the distance result.
Multiply the two grids. Run the raster calculator command.
Out = distance × elevation