本文簡要介紹 python 語言中 arcgis.raster.RasterInfo 的用法。
用法:
class arcgis.raster.RasterInfo(raster_info_dict=None)RasterInfo類允許創建說明一組柵格屬性的RasterInfo對象,以便於使用Raster類創建本地柵格數據集注意:
RasterInfo類需要 ArcPy可以通過從字典實例化
RasterInfo對象,或者通過調用ImageryLayer或Raster對象的raster_info屬性來創建它。也可以通過
RasterInfo對象上的以下屬性設置有關柵格的信息:band_count,extent,pixel_size_x,pixel_size_y,pixel_type,block_height,block_width,no_data_values,spatial_reference要從字典構造
RasterInfo對象,請在此類上使用from_dict方法。例子:
# Usage Example 1: This example creates a new Raster object from the raster_info of another Raster object. (requires arcpy) raster_obj = Raster(<raster dataset path>) ras_info = RasterInfo(raster_obj.raster_info) rinfo_based_ras = Raster(rasInfo2) #To write pixel values to this temporary Raster object: rinfo_based_ras.write(<numpy_array>) #To save this temporary raster locally: rinfo_based_ras.save(r"C:\data\persisted_raster.crf")RasterInfo 對象也可用於將柵格信息作為參數的柵格函數中。 (不需要 arcpy)示例:作為
arcgis.raster.functions.constant_raster()和arcgis.raster.functions.random_raster()的 raster_info 參數的值
相關用法
- Python ArcGIS RasterInfo.from_dict用法及代碼示例
- Python ArcGIS Raster.remove_variables用法及代碼示例
- Python ArcGIS Raster.export_image用法及代碼示例
- Python ArcGIS Raster.get_dimension_values用法及代碼示例
- Python ArcGIS Raster.get_dimension_attributes用法及代碼示例
- Python ArcGIS Raster.read用法及代碼示例
- Python ArcGIS Raster.append_slices用法及代碼示例
- Python ArcGIS Raster.summarize用法及代碼示例
- Python ArcGIS RasterManager.add用法及代碼示例
- Python ArcGIS Raster.get_variable_attributes用法及代碼示例
- Python ArcGIS RasterCollection.filter_by_raster_property用法及代碼示例
- Python ArcGIS Raster.get_dimension_names用法及代碼示例
- Python ArcGIS Raster.get_statistics用法及代碼示例
- Python ArcGIS Raster.from_stac_item用法及代碼示例
- Python ArcGIS Raster.set_colormap用法及代碼示例
- Python ArcGIS Raster.set_histograms用法及代碼示例
- Python ArcGIS Raster.get_property用法及代碼示例
- Python ArcGIS RasterCollection.filter_by_time用法及代碼示例
- Python ArcGIS Raster用法及代碼示例
- Python ArcGIS RasterCollection用法及代碼示例
- Python ArcGIS Raster.set_variable_attributes用法及代碼示例
- Python ArcGIS RasterCollection.filter_by_geometry用法及代碼示例
- Python ArcGIS RasterManager.update用法及代碼示例
- Python ArcGIS Raster.save用法及代碼示例
- Python ArcGIS Raster.set_property用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.raster.RasterInfo。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
