ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Reclass by ASCII File

Available with Spatial Analyst license.

Available with 3D Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Reclassifies (or changes) the values of the input cells of a raster using an ASCII remap file.

Learn more about how Reclass by ASCII File works

Usage

  • The input raster must have valid statistics. If the statistics do not exist, they can be created using the Calculate Statistics tool in the Data Management toolbox.

  • The output raster will always be of integer type. If the output assignment values in the ASCII file are floating-point values, an error message will be returned and the program will halt.

Syntax

arcpy.ddd.ReclassByASCIIFile(in_raster, in_remap_file, out_raster, {missing_values})
ParameterExplanationData Type
in_raster

The input raster to be reclassified.

Raster Layer
in_remap_file

ASCII remap file defining the single values or ranges to be reclassified and the values they will become.

Allowed extensions for the ASCII remap files are .rmp, .txt, and .asc.

File
out_raster

The output reclassified raster.

The output will always be of integer type.

Raster Dataset
missing_values
(Optional)

Denotes whether missing values in the reclass file retain their value or get mapped to NoData.

  • DATA —Signifies that if any cell location on the input raster contains a value that is not present or reclassed in the remap file, the value should remain intact and be written for that location to the output raster. This is the default.
  • NODATA — Signifies that if any cell location on the input raster contains a value that is not present or reclassed in the remap file, the value will be reclassed to NoData for that location on the output raster.
Boolean

Code sample

ReclassByASCIIFile example 1 (Python window)

This example uses an ASCII remap file to reclassify the input raster.

import arcpy
from arcpy.sa import *
from arcpy import env  
env.workspace = "C:/data"
arcpy.ReclassByASCIIFile_3d("slope","remapslope.rmp","C:/output/recslope")
ReclassByASCIIFile example 2 (stand-alone script)

This example uses an ASCII remap file to reclassify the input raster.

# Name: ReclassByASCIIFile_Ex_02.py
# Description: Reclassifies  values of the input raster using an ASCII remap 
#    file.
# Requirements: 3D Analyst Extension

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
inRaster = "slope"
inRemapFile = "remapslope.rmp"
outRaster = "C:/output/recslope"

# Check out the ArcGIS 3D Analyst extension license
arcpy.CheckOutExtension("3D")

# Execute Reclassify
arcpt.ReclassByASCIIFile_3d(inRaster, inRemapFile, outRaster)

Environments

  • Auto Commit
  • Cell Size
  • Cell Size Projection Method
  • Compression
  • Current Workspace
  • Extent
  • Geographic Transformations
  • Mask
  • Output CONFIG Keyword
  • Output Coordinate System
  • Scratch Workspace
  • Snap Raster
  • Tile Size

Licensing information

  • Basic: Requires 3D Analyst or Spatial Analyst
  • Standard: Requires 3D Analyst or Spatial Analyst
  • Advanced: Requires 3D Analyst or Spatial Analyst

Related topics

  • An overview of the Raster Reclass toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal