本文整理汇总了Python中nansat.Nansat.export_band方法的典型用法代码示例。如果您正苦于以下问题:Python Nansat.export_band方法的具体用法?Python Nansat.export_band怎么用?Python Nansat.export_band使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nansat.Nansat
的用法示例。
在下文中一共展示了Nansat.export_band方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: band
# 需要导入模块: from nansat import Nansat [as 别名]
# 或者: from nansat.Nansat import export_band [as 别名]
# undo resize
n.resize()
# make image with map of the file location
n.write_map(oFileName + '04_map.png')
# Writes an 8-bit GeoTiff image for a given band
n.write_geotiffimage(oFileName + '05_geotiff.tif', bandID=1)
# create a NetCDF file with all bands
n.export(oFileName + '06a.nc')
n.export(oFileName + '06b.nc', bottomup=True)
# create a GTiff file with one band (default driver is NetCDF)
n.export_band(oFileName + '07.tif', bandID=1, driver='GTiff')
# get array with watermask (landmask)
# -- Get Nansat object with watermask
wm = n.watermask()[1]
# -- Reproject with cubic interpolation
d = Domain(4326, "-te 27 70.3 31 71.5 -ts 300 300")
n.reproject(d, 2)
# -- Write image
n.write_figure(oFileName + '08_pro.png', clim='hist')
# Get transect of the 1st and 2nd bands corresponding to the given points
values, lonlat, pixlinCoord = n.get_transect(
points=((29.287, 71.153),
(29.275, 71.145),