developmentseed/geojson-pydantic

Add `from_bbox` class method for Polygon geometry

vincentsarago opened this issue · 1 comments

Creating a Polygon from a bounding box (xmin, ymin, xmax, ymax) is something user will do quite often. I think adding a simple class method would make life easier for some people

Polygon.from_bbox(xmin, ymin, xmax, ymax)

class Polygon(_GeometryBase):

What about 'from_bounds' to align the syntax with other libs like shapely?