I'm integrating Shapely into my code, and I have to deal with several different kinds of geometric objects. Most of my needs are satisfied with Lines, Polygons and LineStrings, but I need to use ellipses. Is there a way to create an ellipse in Shapely by a bounding box or by semi axis, without having to discretize the ellipse into lines?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
For those who are interested, here is an example to create an ellipse with axis length of 15 and 20.
There isn't any way to represent a polygon in Shapely without discretizing it.
At the base level Shapely deals with points. Everything from a LineString to a Polygon is just a list of points. A good example of this is what happens when you take a
Point
and buffer it out:As you can see, the circle is made up of 65 points that are spaced
0.0966
units from each other.