129
130
# Setting the class depending upon the OGR Geometry Type
130
131
self.__class__ = GEO_CLASSES[self.geom_type.num]
148
ptr = capi.from_wkb(wkb, None, byref(c_void_p()), len(wkb))
134
155
"Constructs a Polygon from a bounding box (4-tuple)."
136
157
return OGRGeometry( 'POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' % (
137
158
x0, y0, x0, y1, x1, y1, x1, y0, x0, y0) )
143
160
### Geometry set-like operations ###