ArcGIS Python rename batch grid data, arcgispython

Source: Internet
Author: User

ArcGIS Python rename batch grid data, arcgispython

I. Code

[Python]View plaincopyprint?
  1. Import arcpy
  2. Arcpy. env. workspace = "F :\\ NDVI \\"
  3. Rasters = arcpy. ListRasters ("*", "grid ")
  4. For raster in rasters:
  5. Rename = "Re _" + raster
  6. Arcpy. Rename_management (raster, Rename, "RasterDataset ")
  7. Print (raster + "---->" + Rename)
  8. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.