@classmethod
def from_geometry(cls, geometry):
    """ Return Extent instance. """
    x1, x2, y1, y2 = geometry.GetEnvelope()
    bbox = x1, y1, x2, y2
    sr = geometry.GetSpatialReference()
    return cls(bbox=bbox, sr=sr)
