I want to create 100000 coordinates within my region bounds. The points should look like GPS data, minimum distance of consecutive points should be within 10m - 1000m, minimum distance should also be randomized. What condition I can apply to the code in order to get points close to one another?
# find the bounds of your geodataframe
x_min, y_min, x_max, y_max = tallinn84.total_bounds
# set sample size
n = 10000
# generate random data within the bounds
x = np.random.uniform(x_min, x_max, n)
y = np.random.uniform(y_min, y_max, n)
# convert them to a points GeoSeries
gdf_points = gpd.GeoSeries(gpd.points_from_xy(x, y))
# only keep those points within polygons
gdf_points = gdf_points[gdf_points.within(tallinn84.unary_union)]
This code works fine but it provides random points where distance between two points are higher. Please provide your suggestion and code if possible