Hey all!
I designed a model using Model Bilder- in this model, and I'm using the "Random point" function. I want to set the model to run and, each time, change the value of the points until it reaches a specific value ( from 100 up to 10,000 exponentially).
After the random point function, there are more functions, so I need the model to keep running for the following functions according to the point values.
I looked at the "iterator" options, and I don't know if they suit what I'm doing. Maby I need to create a loop, but I never did one using the model builder tool.
I appreciate your help!
I assume you want to randomly fill the Field for "Number of Points" before running "Create Random Points" (inside a model builder). And the number of features in each polygon should change every time you run the model.
If my assumption is correct, you need to add a "Calculate Field" geoprocessing tool in the model, and connect it prior to "Create Random Points" tool.
Your Calculate Field expression (Python Parser) could look like this.
Code Block
import random
def randnum():
return random.randint(100, 10000)
Expression:
randnum()
My field looks something like this.
first run:
second run:
Your model will then use this field to create the specified number of random points.
Hey Jayanta Poddar , thank you for your answer.
I will focus on my question- this is my model (image attached). I have two rasters (same size and location), and I use the "random point" tool to extract the values of the rasters and operate the GWR tool from there. The number of points will affect the GWR tool.
I want to see the change in GWR as a function of the point number; this is why I want the point number to change to 10,000 gradually.
Is the "Calculate Field" will would fit in this case? If I'm not using Python Parser how can I add the "Calculate Field" to my model?
Thank you for being so helpful!