#-*-coding : utf-8-*-' ' createdontuejun 2209336002:182021 @ author : deeep learning ' ' ' fromosgeoimportogrdedejun : " "判断一个向量文件是面、线,面的返回值在Polygon的情况下是线的返回值,在Line String的情况下是点的返回值, point ' ' ' _ ds=ogr.open (input _ shape file ) _lyr=_ds.GetLayer _ds.Destroy () return ogr.geometrytytypetopeton )新文件夹(2) dis _ bid=37 _ Guizhou _ anlong xian.shp ' print (judge _ geom _ type (input _ shp ) )