Algorithm for generating a Poisson process on a complicated 2d geometry I am looking at some count data by geographic counties in California. As a starting point, a Poisson process came to mind--though there are other good choices like negative binomial, etc.
Given a $\lambda$ parameter for a county, I need to simulate a Poisson realization of events on that county geometry. Since the geometry of a county is rather irregular, I was wondering what a good algorithm might be to do something like this.
If I was using a simple rectangular county--for the sake of simplicity--then I was multiply the area of the rectangle $A$ times the intensity parameter $\lambda$, compute the number of events, and then generate that number of draws from a bivariate uniform distribution. That would give me the coordinates $(length*x, height*y)$ for the random event locations in a rectangle.
However if I have an irregular geometry, then the algorithm will generate points outside of the boundaries of a county.
I had a couple of ideas, but I was not sure if there were any unintended consequences of such approaches.

*

*I could discretize the 2d county boundaries into a grid of coordinates. Then I would just have to pick the Poisson number of coordinates from this list randomly. Likely I would have to sample with replacement.


*I could just sample points from a bounding box around the county boundaries. Then I could use the algorithm above to choose points in the bounding box. For the points that fall outside of the country boundaries, I would just count and discard those. Then I would try and again randomly assign the count of discarded points back to that bounding box. This time some of the new points will fall within the country boundaries and others would fall outside again. Repeat the process till all the points are assigned inside of the boundary.
These are just a couple of ideas. Can anyone tell me if one approach is better than the other. The question I am concerned with is how to ensure that I am still generating a
poisson process and not introducing some unintentional dependencies through the generation process.

A very simple solution (in the same spirit as the answer by @jbowman) is to generate a Poisson point process in the bounding box and then restrict to the irregular region. This is valid since for a Poisson process on any region the restriction to any sub-region is also a Poisson process. So the steps are:

*

*Find bounding box and calculate area

*Calculate mean = lambda * area_of_box

*Generate n from Poisson distribution with mean given above

*Place the n points uniformly in box

*Remove points outside the region of interest

The first four steps are computationally trivial while step 5 contains a point-in-polygon check which may be costly. However, you avoid having to make a triangulation.
