Magnetic Calculator (Production Mapping)
Zusammenfassung
Computes the magnetic field at point locations for a date you specify. You must provide an altitude or specify a field of type double in your data that contains altitude data. The date must be between 1/1/2005 and 12/31/2014. The magnetic value is calculated using the World Magnetic Model.
Verwendung
Point locations come from a point feature class. You can filter input points using the Selection Set parameter. You can also filter input points by applying a layer definition query to Input Feature Class.
You can specify a double value or a double type field for the Altitude parameter. Specifying a field for this parameter lets the tool use an elevation value specific to each input point. The default value is 0.
Any value specified in the Altitude parameter must be between 0 and 1000000 meters. Null values will fail the calculation and return Altitude Z Value not found in FeatureClass. Apply a layer definition query to Input Feature Class to filter out null or invalid values.
-
This tool has nine optional output field parameters. When populating these parameters, you can specify existing double type fields or enter new field names. If you enter new field names, the tool will generate double type fields with those names in the Output Feature Class.
The Output Grid Variation parameter requires the Lambert Conformal Conic projected coordinate system. The tool will check the following environments, in order, for this coordinate system:
- ArcMap data frame
- Geoprocessing Environment Settings > Cartography > Cartographic Coordinate System
- Geoprocessing Environment Settings > Output Coordinates > Output Coordinate System
- The coordinate system of Input Feature Class
Syntax
Parameter | Erläuterung | Datentyp |
in_feature_class |
The point features for which you want to calculate magnetic field values. | Feature Layer |
in_SQL_Set (optional) |
A Structured Query Language (SQL) where clause that filters input_feature_class features based on attribute values. | SQL Expression |
in_linear_Unit |
The linear unit of measurement to use for in_altitude. Linear units include CENTIMETERS | DECIMAL DEGREES | DECIMETERS | FEET | INCHES | KILOMETERS | METERS | MILES | MILLIMETERS | NAUTICAL MILES | POINTS | UNKNOWN | YARDS. | String |
in_altitude | Specifies an altitude value or field to use to calculate a point's magnetic field. If you specify a value, the tool applies that value to all points during the calculation. If you specify a field, the tool uses each point's value from that field during calculation. The tool only accepts double type fields. The default value is 0. | Double;Field |
in_date |
The date for which you want magnetic field values to be calculated. The date must be between 1/1/2005 and 12/31/2014. Type the date in MM/DD/YYYY format. The default value is the system current date. | Date |
output_feature_class (optional) | The path to and name of a new feature class that will store the calculated magnetic field values. To overwrite Input_Feature_Class, set this parameter to an empty string ("") and specify at least one of the output field parameters. | Feature Class |
in_output_declination_field (optional) |
The name of the field that will store magnetic declination angle values. The declination angle is the angle between magnetic north and true north. It varies by location on the globe. | String |
in_output_annual_drift_field (optional) |
The name of the field that will store annual drift values. Annual drift is the average change in a year in magnetic declination due to changes in currents in the earth's core. Annual drift varies based on your location on the globe. | String |
in_output_inclination_field (optional) |
The name of the field that will store inclination values. Inclination is the angle between a compass needle and the plane of the horizon; it changes as you change latitude. This is also known as magnetic dip or the dip of the compass needle. | String |
in_output_horizontal_field (optional) |
The name of the field that will store magnetic field horizontal strength values. This is also known as horizontal intensity, or H. Horizontal strength is determined using north and east components. Horizontal strength varies based on your location on the globe. | String |
in_output_east_component_field (optional) |
The name of the field that will store east component values. The east component is the easterly intensity of the geomagnetic field and is also known as Y. This value varies by location on the globe. | String |
in_output_north_component_field (optional) |
The name of the field that will store north component values. The north component is the northerly intensity of the geomagnetic field and is also known as X. This value varies by location on the globe. | String |
in_output_vertical_intensity_field (optional) |
The name of the field that will store vertical strength values. Vertical Component is the vertical intensity of the geomagnetic field and is also known as Z. This value varies by location on the globe. | String |
in_output_total_intensity_field (optional) |
The name of the field that will store the calculated total strength of the magnetic field. Total intensity, also known as F, is calculated using horizontal and vertical components. This value varies by location on the globe. | String |
in_output_grid_variation_field (optional) |
The name of the field that will store grid variation values. Grid variation is the angle between magnetic north and grid north. This calculation requires you to use the Lambert Conformal Conic projected coordinate system in the ArcMap data frame, geoprocessing environment, or in the Input_Feature_Class. | String |
Codebeispiel
The following ArcGIS Python window example demonstrates how to use the MagneticCalculator function with Production Mapping sample data. Execute this code from ArcMap or ArcCatalog. Enable the Production Mapping extension first. The code creates an output feature class with Elev features that have a zv2 value less than 500. It also adds and populates a declination and annual drift field.
arcpy.MakeFeatureLayer_management(r'C:\data\SoCal.gdb\SoCal\ElevP',"elevs_less_500","zv2<500") # import the production mapping toolbox - you may have to alter this path arcpy.ImportToolbox('C:/Program Files/ArcGIS/Desktop10.0/ArcToolbox/Toolboxes/Production Mapping Tools.tbx') outFc = "c:/data/magnetic.gdb/MagneticCalc" arcpy.MagneticCalculator_production("elevs_less_500", "", "Feet", "100", "3/29/2010", outFc,"declination","annualdrift")