ArcEngine代码GP邻域分析之焦点

本文详细介绍了地理信息系统中的Viewshed分析工具,涉及参数解释(如输入栅格、观察点、输出栅格、Z因子、曲率修正和折射系数)、命令行示例以及编程脚本示例,展示了如何在ArcGIS中执行Viewshed计算。
摘要由CSDN通过智能技术生成

(2)文档参考

Viewshed_sa <in_raster> <in_observer_features> <out_raster> {z_factor} {FLAT_EARTH | CURVED_EARTH} {refractivity_coefficient}

ParameterExplanationData Type
<in_raster>

Input raster.

Composite Geodataset
<in_observer_features>

Observer point or polyline features.

Composite Geodataset
<out_raster>

The raster to be created.

The output will only record the number of times each in_raster location can be seen by the in_observer_features observation points (or vertices for polylines). The observation frequency will be recorded in the VALUE item in the output raster's attribute table.

Raster Dataset
{z_factor}

The number of ground x,y units in one surface z unit.

The z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.

If the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default.

If the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect.

For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).

Double
{FLAT_EARTH | CURVED_EARTH}

Allows correction for the earth's curvature.

  • FLAT_EARTH  — No curvature correction will be applied.
  • CURVED_EARTH  — Curvature correction will be applied.

Boolean
{refractivity_coefficient}

Coefficient of the refraction of visible light in air.

The default value is 0.13.

Double

Data types for geoprocessing tool parameters

Command line example

Viewshed_sa C:/data/dem C:/data/observers.shp C:/data/viewshed

Scripting syntax
About getting started with writing geoprocessing scripts
Viewshed_sa (in_raster, in_observer_features, out_raster, z_factor, curvature_correction, refractivity_coefficient)

ParameterExplanationData Type
in_raster (Required)

Input raster.

Composite Geodataset
in_observer_features (Required)

Observer point or polyline features.

Composite Geodataset
out_raster (Required)

The raster to be created.

The output will only record the number of times each in_raster location can be seen by the in_observer_features observation points (or vertices for polylines). The observation frequency will be recorded in the VALUE item in the output raster's attribute table.

Raster Dataset
z_factor (Optional)

The number of ground x,y units in one surface z unit.

The z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.

If the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default.

If the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect.

For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).

Double
curvature_correction (Optional)

Allows correction for the earth's curvature.

  • FLAT_EARTH  — No curvature correction will be applied.
  • CURVED_EARTH  — Curvature correction will be applied.

Boolean
refractivity_coefficient (Optional)

Coefficient of the refraction of visible light in air.

The default value is 0.13.

Double


Data types for geoprocessing tool parameters

(3)代码参考 
/// <summary>
        /// GP视域
        /// </summary>
        /// <param name="in_before_surface">输入填/挖之前的栅格表面</param>
        /// <param name="in_observer_point_features">输入观察点或观察折线要素</param>
        /// <param name="out_raster">输出栅格</param>Viewshed
        /// <param name="z_factor">Z 因子 (可选)</param>
        /// <param name="curvature_correction">输出地平面以上的栅格 (可选)</param>
        /// <param name="refractivity_coefficient">折射系数 (可选)</param>
        private void GPViewshed(string in_before_surface, string in_observer_features, string out_raster, double z_factor, string curvature_correction, double refractivity_coefficient)
        {
            Geoprocessor gp = new Geoprocessor();


            Viewshed op = new Viewshed();
            op.in_raster = in_before_surface;
            op.in_observer_features = in_observer_features;
            op.out_raster = out_raster;
            op.z_factor = z_factor;
            op.curvature_correction = curvature_correction;
            op.refractivity_coefficient = refractivity_coefficient;
            try
            {
                gp.Execute(op, null);
            }
            catch { }
        }

  • 12
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值