WebbI have a Shapely polygon. I want to cut these polygon into n polygons, which all have more-or-less equally sized areas. Equally sized would be best, but an approximation would be okay too. I have tried to use the two methods described here, which both are a step in the right direction by not what I need.Both don't allow for a target n. I looked into voronoi, … WebbPerforming the Triangulation The function triangulate (..) of the shapely.ops module is used to perform the triangulation. The result is a list of polygons consisting of three …
The Shapely User Manual — Shapely 2.0.1 documentation …
Webb16 jan. 2012 · There are many algorithms to triangulate a polygon that do not need partitioning into monotone polygons first. One is described in my textbook … WebbWhat you are testing is whether your point is on the object LineString. If you want to test that the point is in the polygon you must use the contains methods of class Polygon. from shapely import geometry polygon = [ (-1571236.8349707182, 8989180.222117377), (1599362.9654156454, 8924317.946336618), (-1653179.0745812152, … green mark platinum super low energy
How do you triangulate a polygon in Shapely? - Stack …
WebbEARTH_POLYGON = MultiPoint(POINTS).convex_hull def _get_start_coord (): """ Get a top-left point to start our downward-rightward crop that is inside the Earth polygon Returns: coordinate tuple (0,0 being top-left) """ while True: p = Point(random.randint(1, 4219), random.randint(732, 5499)) if p.within(EARTH_POLYGON): # When returning the Y … WebbSorted by: 6. Here is some Python code that does what you want. First, building the alpha shape (see my previous answer ): def alpha_shape (points, alpha, only_outer=True): """ Compute the alpha shape (concave hull) of a set of points. :param points: np.array of shape (n,2) points. :param alpha: alpha value. :param only_outer: boolean value to ... WebbHere is the result using the code given in here. It is not working well! 3) To me the best solution should be something like the following figure in which a square is being … green mark on baby bottom