Skip to main content

Create Line Features by Azimuth and Distance (Geodesic)

Overview

This tool creates geodesic line features in batches from table records. Each table row represents one line: the tool reads the start longitude, start latitude, distance, and azimuth, calculates the endpoint on the reference ellipsoid, and generates a geodesic line from the start point to the endpoint.

The output is a line feature dataset in the EPSG:4326 coordinate system and includes a Length field that describes the line length. This tool is suitable for creating long-distance direction lines from longitude and latitude coordinates, especially for heading lines, observation lines, radar detection directions, and target position estimation.

How It Works

The tool uses the direct geodetic calculation method to calculate the endpoint from the start point, azimuth, and distance:

P2=f(P1,α,s,a,rf)P_2 = f(P_1, \alpha, s, a, rf)

Where P1P_1 is the start-point longitude and latitude, α\alpha is the azimuth, ss is the distance, aa is the semi-major axis of the ellipsoid, rfrf is the inverse flattening, and P2P_2 is the calculated endpoint.

Azimuth is expressed in decimal degrees and measured clockwise from true north by geographic direction: 0 is north, 90 is east, 180 is south, and 270 is west. The distance field is in meters.

To make the output line more closely follow the ellipsoidal path, the tool generates intermediate geodesic points between the start point and endpoint, then connects the start point, intermediate points, and endpoint into a line feature. The Length field of the output line is calculated from the ellipsoidal line length.

Use Cases

  • Batch-generate observation direction lines or search lines from observation stations, heading angles, and distances.
  • Estimate target positions from a start point, azimuth, and range result while preserving a linear representation of the process.
  • Generate cross-region survey lines from longitude and latitude coordinates while avoiding the obvious deviation of planar straight lines over long distances.
  • Convert field record tables, route plan tables, or survey result tables into line features that can be used in GIS analysis.

Parameters

ParameterDescriptionNotes
Input table fileA table that contains start-point coordinate, distance, and azimuth fields.Required. Supports CSV and Excel tables.
Start longitude fieldThe start longitude field.Required. Field values should be longitudes in decimal degrees.
Start latitude fieldThe start latitude field.Required. Field values should be latitudes in decimal degrees.
Distance fieldThe distance traveled from the start point along the azimuth.Required. Unit: meters.
Azimuth fieldThe starting azimuth of the line feature.Required. Unit: decimal degrees, measured clockwise from true north.
Ellipsoid semi-major axisThe semi-major axis of the reference ellipsoid.Required. Unit: meters. Default value: 6378137.0.
Ellipsoid inverse flatteningThe inverse flattening of the reference ellipsoid.Required. Default value: 298.257223563.
Preserve input attributesWhether to write input fields to the output.Optional. Default value: False. The current implementation preserves fields related to the start point, distance, and azimuth, and additionally writes Length.
Output vector fileThe output geodesic line feature dataset.Required. The output coordinate system is EPSG:4326.

Output

The output is a line feature dataset. Each output line corresponds to one record in the input table, and its geometry consists of the start point, intermediate geodesic points, and endpoint. The output attributes include the Length field, which stores the line length calculated on the reference ellipsoid in meters.

If Preserve input attributes is not enabled, the output attributes mainly include the Length field. If it is enabled, the output also writes fields used to create the line, such as start longitude, start latitude, distance, and azimuth.

Steps

  1. Start the tool: Open the Geoprocessing Toolbox toolbox, go to Vector Tools > Feature Processing > Build, and open the Create Line Features by Azimuth and Distance (Geodesic) tool pane.
  2. Select the input table: In Input table file, select the CSV or Excel table that contains start points, distances, and azimuths.
  3. Specify coordinate fields: Set Start longitude field and Start latitude field.
  4. Specify measurement fields: Set Distance field and Azimuth field, and confirm that distance is in meters and azimuth is in decimal degrees.
  5. Confirm ellipsoid parameters: The default WGS84 parameters are usually suitable for EPSG:4326 data. If the project uses another ellipsoid, modify the semi-major axis and inverse flattening.
  6. Set attributes and output: Select Preserve input attributes as needed, and specify Output vector file.
  7. Run and check the result: Click Run. After the tool finishes, check whether the line direction, line length, and endpoint position meet business expectations.

Notes

  • Input longitude and latitude values must be in decimal degrees. Do not use degree-minute-second text or projected coordinate values.
  • The distance field must be numeric and in meters. If the source table uses kilometers, nautical miles, or other units, convert the values first.
  • Azimuth starts from true north at 0 degrees and increases clockwise. It is not a mathematical angle measured counterclockwise from the X axis.
  • The current output coordinate system is EPSG:4326. If you need to continue length or area analysis in a projected coordinate system, project the output to an appropriate coordinate system first.
  • If you only need to calculate straight-line endpoints in planar coordinates, use the Create Line Features by Azimuth and Distance (Planar) tool.