当前位置: 首页>>代码示例>>Python>>正文


Python Nansat.write_geotiffimage方法代码示例

本文整理汇总了Python中nansat.Nansat.write_geotiffimage方法的典型用法代码示例。如果您正苦于以下问题:Python Nansat.write_geotiffimage方法的具体用法?Python Nansat.write_geotiffimage怎么用?Python Nansat.write_geotiffimage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nansat.Nansat的用法示例。


在下文中一共展示了Nansat.write_geotiffimage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_write_geotiffimage

# 需要导入模块: from nansat import Nansat [as 别名]
# 或者: from nansat.Nansat import write_geotiffimage [as 别名]
    def test_write_geotiffimage(self):
        n1 = Nansat(self.test_file_stere, logLevel=40)
        tmpfilename = os.path.join(ntd.tmp_data_path,
                                   'nansat_write_geotiffimage.tif')
        n1.write_geotiffimage(tmpfilename)

        self.assertTrue(os.path.exists(tmpfilename))
开发者ID:WYC19910220,项目名称:nansat,代码行数:9,代码来源:test_nansat.py

示例2: write_geotiff

# 需要导入模块: from nansat import Nansat [as 别名]
# 或者: from nansat.Nansat import write_geotiffimage [as 别名]
    def write_geotiff(self, filename, landmask=True, icemask=True):

        sar_windspeed, palette = self._get_masked_windspeed(landmask, icemask)

        nansat_geotiff = Nansat(array=sar_windspeed, domain=self,
                                parameters = {'name': 'masked_windspeed',
                                              'minmax': '0 20'})
                        
        nansat_geotiff.write_geotiffimage(filename)
开发者ID:knutfrode,项目名称:openwind,代码行数:11,代码来源:sar_wind.py

示例3: band

# 需要导入模块: from nansat import Nansat [as 别名]
# 或者: from nansat.Nansat import write_geotiffimage [as 别名]
# undo resize
n.resize()

# Resize the data to 50% using CubicSpline
n.resize_lite(0.5, eResampleAlg=3)
# make simple indexed image from 1st band with default colormap
n.write_figure(oFileName + '02CubicSpline.png', clim='hist')
# 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)
开发者ID:yuxiaobu,项目名称:nansat,代码行数:33,代码来源:test_nansat.py

示例4: Domain

# 需要导入模块: from nansat import Nansat [as 别名]
# 或者: from nansat.Nansat import write_geotiffimage [as 别名]
lonmin, latmin, lonmax, latmax





d = Domain("+proj=latlong +datum=WGS84 +ellps=WGS84 +no_defs", \
           "-lle 20.01092086474455, 54.46124717815684, 33.75349240659604, 67.79294542296294 -ts 2000 2000")

print d

n.reproject(d)


n.resize(0.1)
n.write_geotiffimage(oPath + fileName + '_pro_latlon.tif', bandID=1)
n.resize()

#n.write_figure(oPath + fileName + '_preview.png', clim='hist', ratio=0.95, cmapName='gray')







"""
Figures
"""

row = proc_data.shape[0]`
开发者ID:lelou6666,项目名称:PySOL,代码行数:33,代码来源:nansatExampleASAR.py


注:本文中的nansat.Nansat.write_geotiffimage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。