ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for 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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Reclass by ASCII File

Available with Spatial 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 Tools 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.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

Syntax

ReclassByASCIIFile (in_raster, in_remap_file, {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
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

Return Value

NameExplanationData Type
out_raster

The output reclassified raster.

The output will always be of integer type.

Raster

Code Sample

ReclassByASCIIFile example 1 (Python window)

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

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

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

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

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

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

# Set local variables
inRaster = "slope"
inRemapFile = "remapslope.rmp"

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

# Execute Reclassify
outRaster = ReclassByASCIIFile(inRaster, inRemapFile)

# Save the output 
outRaster.save("C:/sapyexamples/output/recslope")

Environments

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

Licensing Information

  • ArcGIS for Desktop Basic: Requires Spatial Analyst or 3D Analyst
  • ArcGIS for Desktop Standard: Requires Spatial Analyst or 3D Analyst
  • ArcGIS for Desktop Advanced: Requires Spatial Analyst or 3D Analyst

Related Topics

  • An overview of the Reclass tools
  • Understanding reclassification
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal