Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Feature Class toolset > Tools

Create Random Points (Data Management) (ArcInfo only)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This tool is available with an ArcView or ArcEditor license, if the Spatial Analyst extension or the 3D Analyst extension is installed.


Creates a user specified number of random points in an extent, in the polygons of a feature class or along the lines of a feature class. Learn more about how Create Random Points works.


Usage tips

Command line syntax
An overview of the Command Line window
CreateRandomPoints_management <out_path> <out_name> {constraining_feature_class} {constraining_extent} {number_of_points_or_field}

Parameter Explanation Data Type
<out_path>

The ArcSDE, personal or file geodatabase, or workspace in which the output feature class will be created. This workspace must already exist.

Workspace | Raster Catalog
<out_name>

The name of the feature class to be created.

String
{constraining_feature_class}

The feature class which contains the features into which the random points will be placed. If a polygon feature class is specified, points will be randomly placed into the polygons. If a line feature class is specified, points will be randomly placed along the lines.

Feature Layer
{constraining_extent}

The extent into which points will be randomly placed. The extent will only be used if no constraining feature class is specified.

Extent
{number_of_points_or_field}

The number of points to be randomly placed. When a single number is specified, each feature in the feature class will have the same number of randomly placed points. When a field is specified, the number of randomly placed points is equal to the value of the field specified for that feature.

Field | Long
Data types for geoprocessing tool parameters


Command line example

CreateRandomPoints c:\data\project samplepoints # c:\data\project\studyarea.shp 500

Scripting syntax
About getting started with writing geoprocessing scripts
CreateRandomPoints_management (out_path, out_name, constraining_feature_class, constraining_extent, number_of_points_or_field)

Parameter Explanation Data Type
out_path (Required)

The ArcSDE, personal or file geodatabase, or workspace in which the output feature class will be created. This workspace must already exist.

Workspace | Raster Catalog
out_name (Required)

The name of the feature class to be created.

String
constraining_feature_class (Optional)

The feature class which contains the features into which the random points will be placed. If a polygon feature class is specified, points will be randomly placed into the polygons. If a line feature class is specified, points will be randomly placed along the lines.

Feature Layer
constraining_extent (Optional)

The extent into which points will be randomly placed. The extent will only be used if no constraining feature class is specified.

Extent
number_of_points_or_field (Optional)

The number of points to be randomly placed. When a single number is specified, each feature in the feature class will have the same number of randomly placed points. When a field is specified, the number of randomly placed points is equal to the value of the field specified for that feature.

Field | Long

Data types for geoprocessing tool parameters


Script example

# Create geoprocessor
import arcgisscripting
gp = arcgisscripting.create()
gp.overwriteoutput = 1

# Create random points in an extent defined simply by numbers
gp.outputcoordinatesystem = r"Coordinate Systems\Projected Coordinate Systems\World\Miller Cylindrical (world).prj"
gp.CreateRandomPoints("C:/temp", "myRandPnts.shp", "", "0 0 1000 1000", 100)
gp.outputcoordinatesystem = ""

# Create random points in an extent defined by another feature class
gp.CreateRandomPoints("C:/data", "testpoints.shp", "", "C:/data/studyarea.shp", 100)

# Create random points in the features of a contstraining feature class
# Number of points for each feature determined by the value in the field specified
gp.CreateRandomPoints("C:/data/county.gdb", "randpeople", "C:/data/county.gdb/blocks", "", "POP2000")

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.