'Transforms the value to a Geometry object.'

def to_python(self, value):

    try:
        return GEOSGeometry(value)
    except (GEOSException, ValueError, TypeError):
        raise forms.ValidationError(self.error_messages[u'invalid_geom'])
