measure distance

Instructions for use

Measure Distance can be used to calculate the distance from point to point, line, or area. It can calculate the distance from points, lines, or areas within a specified query range to the point being calculated. The calculation results are saved in a new attribute table, with fields including: the ID of the source data point, the proximity feature ID (point, line, or area feature), and the distance value between them.

Application Scenarios

The Measure Distance function can be used to view proximity relationships between two sets of things. For example, if you need to compare distances between various types of business points (such as cinemas, fast-food restaurants, engineering companies, or hardware stores) and locations of community issues (littering, broken windows, graffiti), you can limit the search to one kilometer to identify relationships. The calculated distances between businesses and community issues are then saved to an attribute table, and these results are used to arrange public trash bins or patrol officers.

Using Measure Distance, you can also find all wells and their distances within a specified range from a contaminated well.

Function Entry

  • Spatial Analysis Tab -> Vector Analysis -> Proximity Analysis -> measure distance
  • Toolbox -> Vector Analysis Tools -> Proximity Analysis -> measure distance;

Parameter description

  • Source Data:
    • Data Source: Select the data source containing the point dataset for Measure Distance.
    • Dataset: Select a point dataset or network dataset to serve as the starting point for Measure Distance. If a network dataset is selected, the node data within it participates in the calculation.
    • Filter Expression: You can use a filter expression to filter participating objects, ensuring only point objects meeting the conditions are included. For how to use SQL Expression, refer to SQL Expression.
  • Proximity Data:
    • Data Source: Select the data source containing the proximity data for Measure Distance.
    • Dataset: Select proximity data for Measure Distance, which can be point, line, area, or network datasets, serving as the endpoint.
    • Filter Expression: You can use a filter expression to filter participating objects, ensuring only objects meeting the conditions are included. For how to use SQL Expression, refer to SQL Expression.
  • Calculation Method: Click the drop-down button on the combo box to select the calculation method for Measure Distance, including closest distance and distance in range.
    • Closest Distance: From each point object in the source dataset, calculate distances to proximity objects within the set query range, and record the ID(s) and distance value(s) of the closest object(s).

      If "closest distance" is selected, you can check the minimum distance or maximum distance checkbox in "query range settings" to set values for Measure Distance, with units consistent with the dataset. After setting min and max distances, only proximity objects with distances greater than min and less than or equal to max from the source dataset point participate.

    • Distance in Range: From each point object in the source dataset, calculate distances to all proximity objects, and return all object IDs and distances within the set min and max range. After selecting "distance in range", set min and max distance values, with units consistent with the dataset.
    • Note: The distance from a point to a line object is the minimum distance to any point on the line, i.e., finding the closest point on the line. Similarly, the distance from a point to an area object is the minimum distance to the entire boundary of the area, as shown below:
    • The source dataset and proximity dataset must have the same coordinate system.
    • When calculating distance between objects, if they contain or overlap (partially), the distance is 0. For example, if a point is on a line, the distance is 0.
  • Set the result dataset name and data source for saving:
    • Data Source: Select the data source to save the result dataset.
    • Dataset: Enter the name for the resulting dataset. If the name already exists, it will prompt as invalid and require re-entry.
  • After setting the above parameters, click the "Run" button to execute Measure Distance. The figure below shows the result for closest distance calculation:
    Figure: Measure Distance Result

Related Topics

Principle of Measure Distance

Application Example of Measure Distance