В Python вы можете генерировать случайные координаты в определенном многоугольнике, как показано ниже
import numpy as np
import random
from shapely.geometry import Polygon, Point
poly = Polygon([(23.789642, 90.354714), (23.789603, 90.403000), (23.767688, 90.403597),(23.766510, 90.355448)])
def random_points_within(poly, num_points):
min_x, min_y, max_x, max_y = poly.bounds
points = []
while len(points) < num_points:
random_point = Point([random.uniform(min_x, max_x), random.uniform(min_y, max_y)])
if (random_point.within(poly)):
points.append(random_point)
return points
points = random_points_within(poly,1000)
for p in points:
print(p.x,",",p.y)