geolib.py 文件源码

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

项目:pygeotools 作者: dshean 项目源码 文件源码
def geom_dup(geom):
    """Create duplicate geometry

    Needed to avoid segfault when passing geom around. See: http://trac.osgeo.org/gdal/wiki/PythonGotchas
    """
    g = ogr.CreateGeometryFromWkt(geom.ExportToWkt())
    g.AssignSpatialReference(geom.GetSpatialReference())
    return g 

#This should be a function of a new geom class
#Assumes geom has srs defined
#Modifies geom in place
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号