This question already has an answer here:
I would like to achieve something similar to the ArcGIS Create Random Points tool using
rasterio. I aim to have a polygon with some holes in it (removed by subtracting buffered points). I would then like to randomly sample from the remaining polygon.
The procedure is (broadly) explained in this link however this is not detailed enough to actually implement in python.
Perhaps there is a more rudimentary, or fit-for purpose method. How can I start building a function that does this?