栅格转点 (转换)

许可等级:BasicStandardAdvanced

摘要

将栅格数据集转换为点要素。

用法

语法

RasterToPoint_conversion (in_raster, out_point_features, {raster_field})
参数说明数据类型
in_raster

输入栅格数据集。

栅格数据可为整型或浮点型。

Raster Layer
out_point_features

包含已转换点的输出要素类。

Feature Class
raster_field
(可选)

此字段用于将输入栅格中像元值指定给输出数据集中的点。

栅格字段可为整型、浮点型或字符串型字段。

Field

代码实例

RasterToPoint 示例(Python 窗口)

将栅格数据集转换为点要素。

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.RasterToPoint_conversion("source.img", "c:/output/source.shp", "VALUE")
RasterToPoint 示例(独立脚本)

将栅格数据集转换为点要素。

# Name: RasterToPoint_Ex_02.py
# Description: Converts a raster dataset to point features.
# Requirements: None

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
inRaster = "source.img"
outPoint = "c:/output/source.shp"
field = "VALUE"

# Execute RasterToPoint
arcpy.RasterToPoint_conversion(inRaster, outPoint, field)

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 是
ArcGIS for Desktop Standard: 是
ArcGIS for Desktop Advanced: 是
5/10/2014