Measure Distance Application Example

Case Description

Taking schools in Changchun as an example, calculate the nearest hospital to each school and the distance.

Data Description

Point data of schools and hospitals in Changchun.

Notes:

The data used in this case is located in SuperMapsample data Exercise Data\TrafficAnalysis. A separate installation package must be downloaded. For details, see Get Sample Data Package.

Operation Steps

  1. Open the Changchun.smwu file under the Exercise Data\TrafficAnalysis folder.
  2. Use the "Measure Distance" option to calculate the hospital ID and distance closest to each school. Select the School point dataset (School dataset) as the source data, the Hospital point dataset (Hospital dataset) as the proximity data, set the calculation method to "Closest Distance", and keep other parameters as default.
  3. The result is attribute table data, recording the school ID, the nearest hospital ID, and the distance. Use the "Append Column" function to append the Hospital_ID and Distance select fields from the result table to the School point dataset.
    Figure: Distance result table
    Figure: Append the ID and distance of the nearest hospital for each school
  4. Then, based on the hospital ID, append the corresponding hospital name to the School point dataset. The specific parameters are as follows:
    Figure: Append hospital names to the school data
  5. After completing the above append column operations, the School point data contains the hospital ID, name, and the distance between them. Create a matrix label thematic map for the School dataset to visually display the nearest hospital name and distance for each school. The result is shown below:
    Figure: The nearest hospitals to schools and the distances between them

Related Topics

Measure Distance Theory

Measure Distance