VectorField

サマリー

Visualize flow direction and magnitude information in your raster with vector symbols.

説明

For more information about how this function works, see the Vector Field raster function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.

構文

VectorField (raster_u_mag, raster_v_dir, {input_data_type}, {angle_reference_system}, {output_data_type})
パラメーター説明データ タイプ
raster_u_mag

The first input raster, which is either the U value or the magnitude.

Raster
raster_v_dir

The second input raster, which is either the V value or the direction.

Raster
input_data_type

The type of vector field your inputs represent.

  • UnknownIt is unknown whether the inputs represent U-V or Magnitude-Direction.
  • Vector-UVInput data represents U and V components.
  • Vector-MagDir Input data represents magnitude and direction.

(デフォルト値は次のとおりです Vector-UV)

String
angle_reference_system

Specifies how the direction component was measured.

  • Geographic0° points due north, and 90° points due east.
  • Arithmetic 0° points due east, and 90° points due north.

(デフォルト値は次のとおりです Geographic)

String
output_data_type

Specifies the type of vector field your output will represent.

  • Vector-UVOutput data represents U and V components.
  • Vector-MagDirOutput data represents magnitude and direction.

(デフォルト値は次のとおりです Vector-UV)

String
戻り値
データ タイプ説明
Raster

The output raster.

コードのサンプル

VectorField example 1

This example creates a vector field for a multidimensional dataset.

from arcpy.ia import *
out_vectorfield_raster = VectorField("magnitude", "direction", "Vector-MagDir",
                                 None, "Vector-UV)
out_vectorfield_raster.save("C:/arcpyExamples/outputs/vector_field_UV.crf")
VectorField example 2

This example creates a vector field for a multidimensional dataset.

# Import system modules
import arcpy
from arcpy.ia import *

# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"

# Set the local variables
# create a multidimensional raster object from hycom.nc that
# contains 2 variables water_u and water_v
hycom_raster = arcpy.Raster("C:/data/hycom.nc", True)

# choose the 2 variables from hycom_raster as 2 multidimensional raster
in_raster_u_mag = Subset(hycom_raster, variables = "water_u")
in_raster_v_dir = Subset(hycom_raster, variables = "water_v")

# Execute VectorField function
out_vectorField_raster = VectorField(in_raster_u_mag, in_raster_v_dir,
                                     "Vector-UV", "Geographic", "Vector-MagDir")

# Save the output
out_vectorField_raster.save("C:/arcpyExamples/vector_field_magdir.crf")