Coordinate Table To Line Of Bearing (Defense)

Summary

Creates lines of bearing from coordinates stored in a table.

Usage

  • The output line feature class will have fields for both bearing and distance values.

Parameters

LabelExplanationData Type
Input Table

The table containing the source coordinates.

Table View
Output Bearing Lines Feature Class

The feature class containing the output lines of bearing.

Feature Class
X Field (longitude, UTM, MGRS, USNG, GARS, GEOREF)

The field in the input table containing the x or longitude coordinates.

Field
Bearing Field

The field in the input table containing the bearing values.

Field
Distance Field

The field in the input table containing the distance values.

Field
Input Coordinate Format

Specifies the format of the input table coordinates.

  • Decimal Degrees - One FieldCoordinates will be formatted in a decimal degrees coordinate pair stored in a single field with coordinates separated by a space, comma, or slash.
  • Decimal Degrees - Two FieldsCoordinates will be formatted in a decimal degrees coordinate pair stored in two table fields. This is the default.
  • Degrees and Decimal Minutes - One FieldCoordinates will be formatted in a degrees and decimal minutes coordinate pair stored in a single table field with coordinates separated by a space, comma, or slash.
  • Degrees and Decimal Minutes - Two FieldsCoordinates will be formatted in a degrees and decimal minutes coordinate pair stored in two table fields.
  • Degrees, Minutes, and Seconds - One FieldCoordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in a single table field with coordinates separated by a space, comma, or slash.
  • Degrees, Minutes, and Seconds - Two FieldsCoordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in two table fields.
  • Global Area Reference SystemCoordinates will be formatted in Global Area Reference System.
  • World Geographic Reference System Coordinates will be formatted in World Geographic Reference System.
  • Universal Transverse Mercator BandsCoordinates will be formatted in Universal Transverse Mercator coordinate bands.
  • Universal Transverse Mercator ZonesCoordinates will be formatted in Universal Transverse Mercator coordinate zones.
  • United States National GridCoordinates will be formatted in United States National Grid.
  • Military Grid Reference SystemCoordinates will be formatted in Military Grid Reference System.
String
Bearing Units
(Optional)

Specifies the unit of measurement for the bearing angles.

  • DegreesThe angle will be degrees. This is the default.
  • MilsThe angle will be mils.
  • RadiansThe angle will be radians.
  • GradiansThe angle will be gradians.
String
Distance Units
(Optional)

Specifies the units of measurement for the distance.

  • MetersThe unit will be meters. This is the default.
  • KilometersThe unit will be kilometers.
  • MilesThe unit will be miles.
  • Nautical milesThe unit will be nautical miles.
  • FeetThe unit will be feet.
  • US survey feetThe unit will be U.S. survey feet.
String
Y Field (latitude)
(Optional)

The field in the input table containing the y or latitude coordinates.

The Y Field (latitude) parameter is used when the Input Coordinate Format parameter is set to Decimal Degrees - Two Fields, Degrees and Decimal Minutes - Two Fields, or Degrees Minutes and Seconds - Two Fields.

Field
Line Type
(Optional)

Specifies the output line type.

  • Geodesic lineThe shortest distance between any two points on the earth's spheroidal surface (ellipsoid) will be used. This is the default.
  • Great circle lineThe line on a spheroid (ellipsoid) defined by the intersection of a plane passing through the center of the spheroid will be used.
  • Rhumb lineA line of constant bearing or azimuth will be used.
  • Normal sectionA normal plane to the earth's ellipsoidal surface containing the start and end points will be used.
String
Output Coordinate System
(Optional)

The spatial reference of the output feature class. The default is GCS_WGS_1984.

Spatial Reference

arcpy.defense.CoordinateTableToLineOfBearing(in_table, out_feature_class, x_or_lon_field, bearing_field, distance_field, in_coordinate_format, {bearing_units}, {distance_units}, {y_or_lat_field}, {line_type}, {coordinate_system})
NameExplanationData Type
in_table

The table containing the source coordinates.

Table View
out_feature_class

The feature class containing the output lines of bearing.

Feature Class
x_or_lon_field

The field in the input table containing the x or longitude coordinates.

Field
bearing_field

The field in the input table containing the bearing values.

Field
distance_field

The field in the input table containing the distance values.

Field
in_coordinate_format

Specifies the format of the input table coordinates.

  • DD_1Coordinates will be formatted in a decimal degrees coordinate pair stored in a single field with coordinates separated by a space, comma, or slash.
  • DD_2Coordinates will be formatted in a decimal degrees coordinate pair stored in two table fields. This is the default.
  • DDM_1Coordinates will be formatted in a degrees and decimal minutes coordinate pair stored in a single table field with coordinates separated by a space, comma, or slash.
  • DDM_2Coordinates will be formatted in a degrees and decimal minutes coordinate pair stored in two table fields.
  • DMS_1Coordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in a single table field with coordinates separated by a space, comma, or slash.
  • DMS_2Coordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in two table fields.
  • GARSCoordinates will be formatted in Global Area Reference System.
  • GEOREF Coordinates will be formatted in World Geographic Reference System.
  • UTM_BANDSCoordinates will be formatted in Universal Transverse Mercator coordinate bands.
  • UTM_ZONESCoordinates will be formatted in Universal Transverse Mercator coordinate zones.
  • USNGCoordinates will be formatted in United States National Grid.
  • MGRSCoordinates will be formatted in Military Grid Reference System.
String
bearing_units
(Optional)

Specifies the unit of measurement for the bearing angles.

  • DEGREESThe angle will be degrees. This is the default.
  • MILSThe angle will be mils.
  • RADSThe angle will be radians.
  • GRADSThe angle will be gradians.
String
distance_units
(Optional)

Specifies the units of measurement for the distance.

  • METERSThe unit will be meters. This is the default.
  • KILOMETERSThe unit will be kilometers.
  • MILESThe unit will be miles.
  • NAUTICAL_MILESThe unit will be nautical miles.
  • FEETThe unit will be feet.
  • US_SURVEY_FEETThe unit will be U.S. survey feet.
String
y_or_lat_field
(Optional)

The field in the input table containing the y or latitude coordinates.

The y_or_lat_field parameter is used when the in_coordinate_format parameter is set to DD_2, DDM_2, or DMS_2.

Field
line_type
(Optional)

Specifies the output line type.

  • GEODESICThe shortest distance between any two points on the earth's spheroidal surface (ellipsoid) will be used. This is the default.
  • GREAT_CIRCLEThe line on a spheroid (ellipsoid) defined by the intersection of a plane passing through the center of the spheroid will be used.
  • RHUMB_LINEA line of constant bearing or azimuth will be used.
  • NORMAL_SECTIONA normal plane to the earth's ellipsoidal surface containing the start and end points will be used.
String
coordinate_system
(Optional)

The spatial reference of the output feature class. The default is GCS_WGS_1984.

Spatial Reference

Code sample

CoordinateTableToLineOfBearing example 1 (Python window)

The following Python window script demonstrates how to use the CoordinateTableToLineOfBearing function.

import arcpy
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.CoordinateTableToLineOfBearing_defense(r"C:CSV/TableToLineOfBearing.csv",
                                             "LOB",
                                             "x",
                                             "Orientation",
                                             "Distance",
                                             "DD_2",
                                             "DEGREES",
                                             "KILOMETERS",
                                             "y")
CoordinateTableToLineOfBearing example 2 (stand-alone script)

The following example uses the CoordinateTableToLineOfBearing function in an example workflow script.

# Description: Create lines of bearing from tabular data and then create 
#              bounding envelopes around each line.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.env.overwriteOutput = True

# Create lines of bearing
input_table = r"C:/CSV/TableToLineOfBearing.csv"
result_line = "Output_LOB"
arcpy.CoordinateTableToLineOfBearing_defense(input_table,
                                             result_line,
                                             "x",
                                             "Orientation",
                                             "Distance",
                                             "DD_2",
                                             "DEGREES",
                                             "KILOMETERS",
                                             "y")

# Create envelopes
result_envelope = "Output_Envelope"
arcpy.FeatureEnvelopeToPolygon_management(result_line, result_envelope)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics