The tool Create Random Point is able to generate a certain number of points within polygons. I am wondering, given a bounding box, is there any way that I can generate random points outside those polygon?
Personally I do not like the random point algorithm in ArcGIS. Alternatively, use Geospatial Modelling Environment's (GME)
genrandompnts function. You will be able to identify specific polygons where random points will be excluded (see highlighted area in attached .jpg). Best of all this software is free.
GME provides you with a suite of analysis and modelling tools, ranging from small 'building blocks' that you can use to construct a sophisticated work-flow, to completely self-contained analysis programs. It also uses the extraordinarily powerful open source software R as the statistical engine to drive some of the analysis tools. One of the many strengths of R is that it is open source, completely transparent and well documented: important characteristics for any scientific analytical software.
You are going to have to create a donut polygon with the donut hole representing the interior non-point space and some spatial extent representing the bounding area of the polygonal area.
Sorry, I just can't resist. Since it is always good to know what is going on under the hood with something like GME, here is a solution in actual R code.
require(sp) require(rgeos) # Create example polygon data x <- readWKT("POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))") y <- readWKT("POLYGON ((3 3, 7 3, 7 7, 3 7, 3 3))") # Calculate difference in polygon geometries to create null polygon d <- gDifference(x,y) # Create random sample in non-null polygon rs <- spsample(d, 20, type="random") # Plot results plot(d, col="red") plot(rs,pch=19,col="black",add=TRUE)
This approach is likely very different than how GME does this but is using native R sp spatial classes and a fairly new topology library making the code very efficient. This also gives an example that can easily be wrapped in a for loop.