Lookup (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Creates a new raster by looking up values found in another field in the table of the input raster.

Illustration

Lookup illustration
Lookup_3d (InRas1, "Category", OutRas)

Usage

Syntax

Lookup_3d (in_raster, lookup_field, out_raster)
ParameterExplanationData Type
in_raster

The input raster that contains a field from which to create a new raster.

Raster Layer
lookup_field

Field containing the desired values for the new raster.

It can be a numeric or string type.

Field
out_raster

The output raster whose values are determined by the specified field of the input raster.

Raster Dataset

Code Sample

Lookup example 1 (Python window)

This example creates a new raster determined by the specified field of the input raster.

import arcpy
from arcpy import env  
env.workspace = "C:/data"
arcpy.Lookup_3d("mycity", "land_code", "C:/output/mylandcode.img")
Lookup example 2 (stand-alone script)

This example creates a new raster determined by the specified field of the input raster.

# Name: Lookup_3d_Ex_02.py
# Description: Creates a new raster by looking up values found in another 
#     field in the table of the input raster.
# Requirements: 3D Analyst Extension

# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
inRaster = "mycity"
lookupField = "land_code"
outRaster = "C:/output/mylandcode"

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

# Execute Lookup
arcpy.Lookup_3d(inRaster, lookupField, outRaster)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst or Spatial Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst or Spatial Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst or Spatial Analyst
3/7/2014