pyshp

作者: hehehehe | 来源:发表于2021-07-30 19:17 被阅读0次

https://github.com/GeospatialPython/pyshp

iterRecords,iterShapeRecords,iterShapes,
record,records,shapeRecord,shapeRecords,
numRecords,numShapes,fields,
bbox,close,dbf,encoding,encodingErrors,
load,load_dbf,load_shp,load_shx,mbox,
shape,shapeName,
shapeType,shapeTypeName,shapes,shp,shpLength,shx,zbox
>>> r = shapefile.Reader('shapefiles/test/polygon')

>>> w = shapefile.Writer('shapefiles/test/copy')
>>> w.fields = r.fields[1:] # skip first deletion field

>>> # adding existing Shape objects
>>> for shaperec in r.iterShapeRecords():
...     w.record(*shaperec.record)
...     w.shape(shaperec.shape)

>>> # or GeoJSON dicts
>>> for shaperec in r.iterShapeRecords():
...     w.record(*shaperec.record)
...     w.shape(shaperec.shape.__geo_interface__)

>>> w.close()   

相关文章

  • pyshp

    https://github.com/GeospatialPython/pyshp[https://github....

  • python geojson shapely互操作

    geojson 实现了 "_geo_interface_" 规范,该接口允许协作程序之间无缝传递数据pyshp...

网友评论

      本文标题:pyshp

      本文链接:https://www.haomeiwen.com/subject/utycvltx.html