Skip to main content

Create Line Features by Azimuth and Distance (Planar)

Overview

This tool creates planar straight line features in batches from table records. Each table row represents one line: the tool reads the start X coordinate, start Y coordinate, distance, and azimuth, calculates the endpoint using trigonometric functions in planar coordinates, and generates a line feature from the start point to the endpoint.

This tool is suitable for local projected coordinates, engineering coordinates, or other planar coordinate systems. Unlike the geodesic line tool, this tool does not perform ellipsoidal distance calculations and does not account for Earth curvature.

How It Works

The tool calculates the endpoint coordinates using the following formulas:

x2=x1+dsin(θ)x_2 = x_1 + d \cdot \sin(\theta) y2=y1+dcos(θ)y_2 = y_1 + d \cdot \cos(\theta)

Where (x1,y1)(x_1, y_1) is the start-point coordinate, dd is the distance field value, and θ\theta is the azimuth. Azimuth is expressed in decimal degrees and follows the surveying azimuth convention: it is measured clockwise from true north. 0 indicates the positive Y-axis direction, and 90 indicates the positive X-axis direction.

The Length field of the output line feature comes from the planar length of the geometry itself, and its unit is the same as the input XY coordinate unit.

Use Cases

  • Generate boundary lines or survey lines from a start point, azimuth, and distance in engineering surveying, cadastral surveying, or local construction coordinates.
  • Quickly construct short line segments from direction and distance in a projected coordinate system.
  • Convert azimuth-distance data from field record tables into line features that can be displayed, edited, and analyzed.
  • Batch-generate direction lines within a local area instead of manually drawing them one by one.

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 X coordinate field.Required. The interface name keeps "longitude"; in this planar tool, it is used as the X coordinate.
Start latitude fieldThe start Y coordinate field.Required. The interface name keeps "latitude"; in this planar tool, it is used as the Y coordinate.
Distance fieldThe distance extended from the start point along the specified azimuth.Required. The value directly participates in planar coordinate calculation and should usually use the same unit as the input XY coordinates.
Azimuth fieldThe planar azimuth field.Required. Unit: decimal degrees, measured clockwise from true north.
Preserve attribute fieldsWhether to write line-construction 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 generated line feature dataset.Required.

Output

The output is a line feature dataset. Each output line consists of two vertices, a start point and an endpoint. The endpoint is calculated from the planar coordinate formulas. The output attributes include the Length field, which stores the planar length of the output line.

warning

The current implementation marks the coordinate system as EPSG:4326 when creating output features. If the input table actually uses projected coordinates or engineering coordinates, redefine or convert the output to the correct coordinate system as needed after the tool finishes.

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 (Planar) 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 start coordinate fields: Set Start longitude field as the X coordinate and Start latitude field as the Y coordinate.
  4. Specify measurement fields: Set Distance field and Azimuth field, and confirm that the distance unit matches the coordinate unit.
  5. Set attributes and output: Select Preserve attribute fields as needed, and specify Output vector file.
  6. Run and check the result: Click Run. After the tool finishes, check whether the line direction, length, and spatial position meet expectations.

Notes

  • This tool is intended for planar coordinate calculations. It is not suitable for directly using longitude and latitude coordinates to generate long-distance survey lines.
  • The distance field and coordinate fields must use consistent or converted units. If the coordinate unit is meters, the distance field should usually also be in meters.
  • Azimuth uses the surveying azimuth definition, measured clockwise from true north. It is not a mathematical angle measured counterclockwise from the X axis.
  • If you need to account for Earth curvature and ellipsoid parameters, use the Create Line Features by Azimuth and Distance (Geodesic) tool.
  • It is recommended to validate quadrant, angle direction, and units with a small set of sample records before batch-generating official line features.