If the rationale is privacy this is probably not the algorithm you want to use, especially if it's possible to force the generation of multiple random points (e.g. by refreshing the map). If you're using a circle with a fixed radius just 3 points would be enough to exactly locate the center. A variable radius could take more, but since the distribution is uniform each additional point would significantly improve the…
I imagine its for something like AirBnb where the site doesn't want the users to the location the property so they only way to book it is via the site.
How to generate random geo-coordinates within a given radius
11–20 of 57 posts
Re: How to generate random geo-coordinates within a given radius
#12If the rationale is privacy this is probably not the algorithm you want to use, especially if it's possible to force the generation of multiple random points (e.g. by refreshing the map). If you're using a circle with a fixed radius just 3 points would be enough to exactly locate the center. A variable radius could take more, but since the distribution is uniform each additional point would significantly improve the…
Re: How to generate random geo-coordinates within a given radius
#13If for some reason the data needs to appear random, you have to store a fixed random offset/alternative per point so that there cannot be multiple observations.
If for some reason the data needs to appear randomized between repeated lookups, you need to store a fixed offset/alternative per point and then apply an additional random offset per lookup. Repeated lookups will only leak the (badly) hidden permanently randomized stored alternative.
Re: How to generate random geo-coordinates within a given radius
#14Re: How to generate random geo-coordinates within a given radius
#15Buffer your point to create a polygon then use ST_PointOnSurface (or equivalent) in any competent spatially-enabled DBMS to create a point guaranteed to intersect the bounding polygon. Trivial in SQLite, PostGIS, etc.
https://gis.stackexchange.com/questions/76498/how-is-st-poin...
Re: How to generate random geo-coordinates within a given radius
#16> On a previous project we needed to show markers on a map to indicate there was a property, but for privacy reasons we wanted to show the marker on the map close to the property but not at the exact location of the property. So we needed to generate random points within a fixed distance of the original point location.
At those distances, you can treat the surface as a plane and calculate points on a circle. Sure, it won’t be accurate for large distances but that is not a requirement. Nor is accuracy for that matter since the whole point is to obfuscate the original point.
Re: How to generate random geo-coordinates within a given radius
#17> On a previous project we needed to show markers on a map to indicate there was a property, but for privacy reasons we wanted to show the marker on the map close to the property but not at the exact location of the property. So we needed to generate random points within a fixed distance of the original point location This raises a couple of interesting questions. 1. How do you stop someone from finding the actual pr…
Re: How to generate random geo-coordinates within a given radius
#18Earlier quoted context omitted.
I imagine its for something like AirBnb where the site doesn't want the users to the location the property so they only way to book it is via the site.
What's funny with Airbnb is that if you are looking at the map in search, it is approximate. However, if you save the property to your favorites and then go to your favorite list and look at the map, you get the exact location.
Re: How to generate random geo-coordinates within a given radius
#19> On a previous project we needed to show markers on a map to indicate there was a property, but for privacy reasons we wanted to show the marker on the map close to the property but not at the exact location of the property. So we needed to generate random points within a fixed distance of the original point location This raises a couple of interesting questions. 1. How do you stop someone from finding the actual pr…
Re: How to generate random geo-coordinates within a given radius
#20If the rationale is privacy this is probably not the algorithm you want to use, especially if it's possible to force the generation of multiple random points (e.g. by refreshing the map). If you're using a circle with a fixed radius just 3 points would be enough to exactly locate the center. A variable radius could take more, but since the distribution is uniform each additional point would significantly improve the…