摘要將多個(gè)柵格數(shù)據(jù)集鑲嵌到一個(gè)新的柵格數(shù)據(jù)集中,。 用法
語(yǔ)法MosaicToNewRaster_management
(input_rasters, output_location, raster_dataset_name_with_extension,
{coordinate_system_for_the_raster}, {Pixel_type}, {cellsize},
Number_of_bands, {mosaic_method}, {mosaic_colormap_mode})
代碼示例
MosaicToNewRaster 示例 1(Python 窗口)
這是 MosaicToNewRaster 工具的 Python 示例。 import arcpy from arcpy import env env.workspace = "c:/data" arcpy.MosaicToNewRaster_management("land1.tif;land2.tif", "Mosaic2New", "landnew.tif", "World_Mercator.prj", "8_BIT_UNSIGNED", "40", "1", "LAST","FIRST")
MosaicToNewRaster 示例 2(獨(dú)立腳本)
這是 MosaicToNewRaster 工具的 Python 腳本示例,。 ##================================== ##Mosaic To New Raster ##Usage: MosaicToNewRaster_management inputs;inputs... output_location raster_dataset_name_with_extension {coordinate_system_for_the_raster} ## 8_BIT_UNSIGNED | 1_BIT | 2_BIT | 4_BIT | 8_BIT_SIGNED | 16_BIT_UNSIGNED | 16_BIT_SIGNED | 32_BIT_FLOAT ## 32_BIT_UNSIGNED | 32_BIT_SIGNED | | 64_BIT {cellsize} number_of_bands {LAST | FIRST | BLEND | MEAN ## | MINIMUM | MAXIMUM} {FIRST | REJECT | LAST | MATCH} try: import arcpy arcpy.env.workspace = r"\\MyMachine\PrjWorkspace\RasGP" ##Mosaic several TIFF images to a new TIFF image arcpy.MosaicToNewRaster_management("landsatb4a.tif;landsatb4b.tif","Mosaic2New", "landsat.tif", "World_Mercator.prj", "8_BIT_UNSIGNED", "40", "1", "LAST","FIRST") except: print "Mosaic To New Raster example failed." print arcpy.GetMessages() 環(huán)境
|
|
來(lái)自: LibraryPKU > 《制圖》