Random offset for points using max distance and constrain to polygons

Discussion created by sablanchard on Jan 11, 2012
Latest reply on Jan 12, 2012 by sablanchard
Hello I hope this is the correct forum to post this question:

This is my situation:
I have a point shapefile with each point representing a patient that has been geocoded to the census block centroid and I have overlapping points because there are multiple people living in the same block. What I am trying to do is randomly offset the patient points to a specified max distance of 10 m and constrain the offset so that the points in a particular block are kept in that same block and are not offset into a different adjoining block. The issue is that I have tried this tool: and it successfully offset the points from the block centroid using my specified 10 m max but after checking the offset distances points were offset up to 14 m away from their original locations - this seems to be systematic as this happened to single points that do not have overlapping points. This may be a result of how the hypotenuse is calculated. While 4 m off from my max is not that bad the tool did not stick to my rigid max distance. The tool is also unable to constrain the offset to be within the same census block polygons. I am stuck on how to actually offset the points by 10 m max while constraining them to the census block they are in.

I know in ArcGIS with the Create Random Points tool you can create random points inside polygons using a max distance and also specify the number of points in each polygon; I can do exactly what I want to do with this tool with the exception that the created random points would not have a identifier or field that I could join the patient data with. Using a spatial join would not work either because in some cases patients in adjacent blocks may be closer to the new random points and there would be a mismatch in joining the data. If there was a way to transfer the attributes from the original patient data to the new random points this would work well. Tools in Hawths and Geospatial Modelling Environment also cannot do the particular operation I am seeking to do.

Does anyone have any suggestions on how to go about doing this or can suggest a tool, script, or additional open source/ free software that can do this? I know I could probably write my own code to do this but this is my first shot at seeing what is out there after finding not much on the web or forums.