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...

Create Normal Raster

Available with Spatial Analyst license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Creates a raster of random values with a normal (gaussian) distribution within the extent and cell size of the analysis window.

Illustration

Create Normal Raster illustration
OutRas = CreateNormalRaster(1, 0 0 4 4)
Note: This output is representative. The actual values will be different each time the tool is executed.

Usage

  • The Create Normal Raster tool generates values for every cell in the output raster.

  • The output raster from this tool is always floating point.

  • The cell values will have up to 7 digits of precision after the decimal point.

  • The output values will have a mean of 0.0 and a standard deviation of 1.0. If a different standard deviation is desired, multiply the output raster by that value. If a different mean is desired, add that value to the raster. For example, to create a raster where the values are characterized by a mean of 39 and a standard deviation of 2.5, multiply the results of Create Normal Raster by 2.5, then add 39.

    • In Map Algebra, you could do something like:

      import arcpy
      from arcpy import env
      from arcpy.sa import *
      env.workspace = "C:/data"
      outNorm = CreateNormalRaster(1, Extent(0, 0, 100, 100)) * 2.5 + 39
      outNorm.save("C:/output/norm2")
      

  • The random number generator is automatically seeded with the current value of the system clock (seconds since January 1, 1970). Reseeding the Create Random Raster tool also reseeds Create Normal Raster.

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

Syntax

CreateNormalRaster ({cell_size}, {extent})
ParameterExplanationData Type
cell_size
(Optional)

The cell size for the output raster dataset.

This is the value in the environment if specifically set. If not specifically set, it is the shorter of the width or height of the environment extent in the output spatial reference, divided by 250.

Analysis Cell Size
extent
(Optional)

The extent for the output raster dataset.

The Extent is a Python class.

In this tool, it is in the form of Extent(XMin, YMin, XMax, YMax)

  • where XMin and YMin define the lower left coordinate of the extent, with XMax and YMax defining the upper right coordinate.

The coordinates are specified in the same map units as the Output coordinate system environment setting.

The extent will be the value in the environment if specifically set. If not specifically set, the default is 0, 0, 250, 250.

Extent

Return Value

NameExplanationData Type
out_raster

The output raster of normally distributed values with a mean of 0.0 and a standard deviation of 1.0.

Raster

Code Sample

CreateNormalRaster example 1 (Python window)

This sample creates an output raster of normally distributed values at the defined cell size and extent.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outNormalRaster = CreateNormalRaster(2, Extent(0, 0, 150, 150))
outNormalRaster.save("C:/sapyexamples/output/outnormal")
CreateNormalRaster example 2 (stand-alone script)

This sample creates an output raster of normally distributed values at the defined cell size and extent.

# Name: CreateNormalRaster_Ex_02.py
# Description: Creates a raster of random values from a normal distribution
# 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
cellSize = 2
extent = Extent(0, 0, 150, 150)

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

# Execute CreateNormalRaster
outNormalRaster = CreateNormalRaster(cellSize, extent) 

# Save the output 
outNormalRaster.save("C:/sapyexamples/output/outnormraster")

Environments

  • Auto Commit
  • Cell Size
  • 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
  • ArcGIS for Desktop Standard: Requires Spatial Analyst
  • ArcGIS for Desktop Advanced: Requires Spatial Analyst

Related Topics

  • An overview of the Raster Creation toolset
  • Create Random Raster
  • Create Random Raster
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