from osgeo import ogr wkt = "LINESTRING (1181866.263593049 615654.4222507705, 1205917.1207499576 623979.7189589312, 1227192.8790041457 643405.4112779726, 1224880.2965852122 665143.6860159477)" geom = ogr.CreateGeometryFromWkt(wkt) for i in range(0, geom.GetPointCount()): # GetPoint returns a tuple not a Geometry pt = geom.GetPoint(i) print "%i). POINT (%d %d)" %(i, pt[0], pt[1])
循环访问几何中的点
Copyright © Since 2014.
开源地理空间基金会中文分会
吉ICP备05002032号
Powered by TorCMS