Random points may be within the minimum allowed distance if they were generated inside or along different constraining feature parts. The field option is only valid for polygon or line constraining features. This value will determine the minimum allowed distance between random points within each input feature. The Minimum Allowed Distance parameter can be specified as a linear unit or a field from the constraining features containing numeric values. When unable to place anymore random points within a constraining area without breaking the minimum allowed distance specified, the number of random points in the constraining area will be reduced to the maximum possible under the minimum allowed distance. If both a constraining feature class and constraining extent are specified, the constraining feature class value will be used and the constraining extent value will be ignored. The Constraining Extent parameter can be entered as a set of minimum and maximum x- and y-coordinates or as equal to the extent of a feature layer or feature class.
#Filelocator pro boolean within lines code#
In the code block, import the random module using the expression import random. To generate a random float number between a and b (exclusively), use the Python expression random.uniform(a,b). To generate a random integer between a and b (inclusively), use the Python expression random.randint(a,b). Third, use the Calculate Field tool to assign random values to the empty field in the random points feature class. Suggested field types are long integer or float. Second, use the Add Field tool to create a new numeric field in the random points feature class. To assign random values to randomly placed points, first generate random points using this tool.