new_flightlines.py 文件源码

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

项目:uncover-ml 作者: GeoscienceAustralia 项目源码 文件源码
def main():
    """Main demo."""

    # Load survey data
    llh, data = get_flightlines()

    decimate = 5
    llh = llh[::decimate]
    data = data[::decimate]


    # Select by height intervals  (57% of the data)
    hrange = [95., 105.]
    keep = np.bitwise_and(llh[:, 2] > hrange[0], llh[:,2] < hrange[1])
    llh = llh[keep]
    data = data[keep]

    # Write out the reduced llh, data
    sf = shapefile.Writer(shapefile.POINT)
    outname = data_root + 'new_flightlines'
    log.info('Writing shapefile')
    sf.field("K")
    sf.field("Th")
    sf.field("U")
    for ll, dat in tqdm(zip(llh, data)):
        sf.point(ll[0], ll[1], ll[2])
        sf.record(K=dat[0], Th=dat[1], U=dat[2])
    sf.save(outname)
    log.info('Done!')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号