Production Mapping ライセンスで利用できます。
概要
Computes the magnetic field at point locations for given date and altitude.
使用法
The Input Features parameter value must be points. You can filter input points by applying a layer definition query or selection set.
The Altitude parameter specifies the elevation as a linear unit of the input points. The Altitude value must be a numeric value above sea level. Do not use decimal degrees or unknown units.
The Altitude parameter applies the same elevation value to all points in the Input Features parameter. To use a different altitude value for each input point, use the Iterate Feature Selection or Iterate Field Value tool in ModelBuilder. The iterator can pass a value to the Altitude parameter. In this configuration, the tool runs once per input point.
Magnetic field values are written to existing fields. This tool does not create fields. To add a field, use the Add Field tool.
The Magnetic Component parameter field controls the type of magnetic field calculation. You must specify a magnetic component and an existing field to write to. You can calculate up to nine magnetic component types.
To use the Grid variation magnetic component, you must set the ArcGIS Pro data frame coordinate system to Lambert Conformal Conic. If you specify Grid variation with another coordinate system, the tool will fail.
This tool uses the World Magnetic Model 5-year epoch specific to the data provided. For example, if the data specified is from 2020, the model epoch released at the end of 2019 is used.
注意:
このツールを実行すると、入力データが変更されます。詳細と不要なデータの変更を回避するための方法については、「入力データを変更または更新するツール」をご参照ください。
構文
arcpy.topographic.CalculateMagneticComponents(in_features, altitude, date, magnetic_component)
パラメーター | 説明 | データ タイプ |
in_features | The point features for which magnetic field values will be calculated. | Feature Layer |
altitude | The elevation of the in_features value including the linear unit. Do not use decimal degrees or unknown units. The default is 0 meters. | Linear Unit |
date | The date for which magnetic field values will be calculated. The date must be valid for the specified World Magnetic Model. The format must use two digits for the month, two digits for the day, and four digits for the year. The default is the system current date. | Date |
magnetic_component [[component, field],...] | The magnetic component to calculate and the field to which the values will be written.
| Value Table |
派生した出力
名前 | 説明 | データ タイプ |
updated_features | The in_features layer with the chosen fields updated. | Feature Layer |
コードのサンプル
The following code sample demonstrates how to use the CalculateMagneticComponents tool in Python.
# Name: CalculateMagneticComponents_sample.py
# Description: Calculates four types of magnetic component fields for a feature class.
# Import System Modules
import arcpy
# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
# Setting Data Variables
ElevP2 = r'C:\Data\Edit_Sample.gdb\Features\ElevP'
ElevP_Layer = 'ElevP_Layer'
# Make Feature Layer from the ElevP feature class
arcpy.MakeFeatureLayer_management(ElevP2, ElevP_Layer)
# Add four magnetic component fields
arcpy.AddField_management('ElevP_Layer', 'Declination', 'LONG')
arcpy.AddField_management('ElevP_Layer', 'Annual_Drift', 'LONG')
arcpy.AddField_management('ElevP_Layer', 'Inclination', 'LONG')
arcpy.AddField_management('ElevP_Layer', 'Horizontal', 'LONG')
# Setting Local Variables
altitude = '1 Feet'
date = '1/1/2010'
magnetic_component = 'DECLINATION Declination;ANNUAL_DRIFT Annual_Drift;INCLINATION Inclination;HORIZONTAL Horizontal'
# Execute Calculate Magnetic Components
arcpy.CalculateMagneticComponents_topographic('ElevP_Layer', altitude, date, magnetic_component)
# Check In Extensions
arcpy.CheckInExtension('Foundation')
ライセンス情報
- Basic: いいえ
- Standard: 次のものが必要 Production Mapping
- Advanced: 次のものが必要 Production Mapping