def geo_shape(self, sides=<NUM_LIT:5>, center=None, distance=None):
assert isinstance(sides, int)<EOL>if distance is None:<EOL><INDENT>distance = self.random_int(<NUM_LIT:100>, <NUM_LIT:1000>)<EOL><DEDENT>else:<EOL><INDENT>assert isinstance(distance, int)<EOL>assert distance <= EARTH_RADIUS * math.pi,'<STR_LIT>'<EOL><DEDENT>if center is None:<EOL><INDENT>dp = distance * <NUM_LIT> / EARTH_RADIUS / math.pi<EOL>center = self.geo_point(lat_min=-<NUM_LIT> + dp, lat_max=<NUM_LIT> - dp)<EOL><DEDENT>else:<EOL><INDENT>assert -<NUM_LIT> <= center[<NUM_LIT:0>] <= <NUM_LIT>, '<STR_LIT>'<EOL>assert -<NUM_LIT> <= center[<NUM_LIT:1>] <= <NUM_LIT>, '<STR_LIT>'<EOL><DEDENT>angles = list(self.random_sample(range(<NUM_LIT>), sides))<EOL>angles.sort()<EOL>points = [_dest_point(center, distance, bearing, EARTH_RADIUS) for bearing in angles]<EOL>points.append(points[<NUM_LIT:0>])<EOL>path = '<STR_LIT:U+002CU+0020>'.join(['<STR_LIT:U+0020>'.join(p) for p in ([str(lon), str(lat)] for lon, lat in points)])<EOL>return f'<STR_LIT>'<EOL>
Return a WKT string for a POLYGON with given amount of sides.
The polygon is defined by its center (random point if not provided) and
the distance (random distance if not provided; in km) of the points to
its center.