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:
Where is the start-point longitude and latitude, is the azimuth, is the distance, is the semi-major axis of the ellipsoid, is the inverse flattening, and 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
| Parameter | Description | Notes |
|---|---|---|
| Input table file | A table that contains start-point coordinate, distance, and azimuth fields. | Required. Supports CSV and Excel tables. |
| Start longitude field | The start longitude field. | Required. Field values should be longitudes in decimal degrees. |
| Start latitude field | The start latitude field. | Required. Field values should be latitudes in decimal degrees. |
| Distance field | The distance traveled from the start point along the azimuth. | Required. Unit: meters. |
| Azimuth field | The starting azimuth of the line feature. | Required. Unit: decimal degrees, measured clockwise from true north. |
| Ellipsoid semi-major axis | The semi-major axis of the reference ellipsoid. | Required. Unit: meters. Default value: 6378137.0. |
| Ellipsoid inverse flattening | The inverse flattening of the reference ellipsoid. | Required. Default value: 298.257223563. |
| Preserve input attributes | Whether 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 file | The 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
- 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.
- Select the input table: In Input table file, select the CSV or Excel table that contains start points, distances, and azimuths.
- Specify coordinate fields: Set Start longitude field and Start latitude field.
- Specify measurement fields: Set Distance field and Azimuth field, and confirm that distance is in meters and azimuth is in decimal degrees.
- Confirm ellipsoid parameters: The default WGS84 parameters are usually suitable for
EPSG:4326data. If the project uses another ellipsoid, modify the semi-major axis and inverse flattening. - Set attributes and output: Select Preserve input attributes as needed, and specify Output vector file.
- 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.