adapter.py 文件源码

python
阅读 49 收藏 0 点赞 0 评论 0

项目:django 作者: alexsukhrin 项目源码 文件源码
def __init__(self, obj, geography=False):
        """
        Initialize on the spatial object.
        """
        self.is_geometry = isinstance(obj, (Geometry, PostGISAdapter))

        # Getting the WKB (in string form, to allow easy pickling of
        # the adaptor) and the SRID from the geometry or raster.
        if self.is_geometry:
            self.ewkb = bytes(obj.ewkb)
            self._adapter = Binary(self.ewkb)
        else:
            self.ewkb = to_pgraster(obj)

        self.srid = obj.srid
        self.geography = geography
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号