🖥
🖥
🖥
🖥
AugeLab Studio Manual
English
K
Comment on page

# Measure Position Distance

This block takes two pixel position values as input. It calculates x, y and linear distance between two points and outputs it.
In the example below, we calculated the positions of the two corners of the square with the Get Pixel Mouse function. ## Measure Position Distance Node Documentation

The `Measure Position Distance` node in AugeLab Studio calculates the distance between two positions given in the (x, y) format. It measures the difference in the x-coordinate, y-coordinate, and the overall distance between the two positions.

### Node Overview

The `Measure Position Distance` node takes two positions as input and calculates the x-distance, y-distance, and the total distance between the positions. The positions are expected to be in the (x, y) format, where x and y represent the coordinates.

### Node Interaction

1. 1.
Drag and drop the `Measure Position Distance` node from the node library onto the canvas in AugeLab Studio.
2. 2.
Connect the first position to the "First Position" input socket.
3. 3.
Connect the second position to the "Second Position" input socket.
4. 4.
The node will output the x-distance, y-distance, and the total distance between the positions to the respective output sockets.

### Input and Output Sockets

The `Measure Position Distance` node has two input sockets to receive the two positions for distance calculation. The positions should be provided as tuples in the (x, y) format. The node also has three output sockets: "X Distance", "Y Distance", and "Distance". The "X Distance" output socket represents the absolute difference in the x-coordinate of the positions. The "Y Distance" output socket represents the absolute difference in the y-coordinate of the positions. The "Distance" output socket represents the Euclidean distance between the positions.

### Implementation Details

The `Measure Position Distance` node uses the Pythagorean theorem to calculate the distance between two positions. The steps involved in the calculation are as follows:
1. 1.
Input Retrieval: The node retrieves the two positions from the input sockets.
2. 2.
Distance Calculation: The node calculates the x-distance, y-distance, and the total distance between the positions using the Pythagorean theorem.
3. 3.
Output Generation: The node generates the x-distance, y-distance, and distance values as outputs.
4. 4.
Output: The node outputs the x-distance, y-distance, and distance values to the respective output sockets.

### Usage

1. 1.
Drag and drop the `Measure Position Distance` node from the node library onto the canvas in AugeLab Studio.
2. 2.
Connect the first position to the "First Position" input socket.
3. 3.
Connect the second position to the "Second Position" input socket.
4. 4.
Run the pipeline or execute the node to calculate the distance.
5. 5.
Retrieve the x-distance, y-distance, and distance values from the respective output sockets.
6. 6.
Use the distance values in downstream nodes or calculations as needed.
• The `Measure Position Distance` node enables you to calculate the distance between two positions in your data processing pipeline.
• It expects the positions to be provided as tuples in the (x, y) format.
• The node calculates the absolute difference in the x-coordinate and y-coordinate between the positions.
• It also calculates the Euclidean distance between the positions using the Pythagorean theorem.
• The node outputs the x-distance, y-distance, and distance values as separate values.
• The `Measure Position Distance` node is useful in various applications, such as image processing, computer vision, and spatial analysis.
• It helps in measuring spatial relationships, distances between objects, and analyzing geometric data.
• The node provides a simple and efficient way to incorporate position distance calculations in your data pipeline.
• It can be combined with other nodes and operations to perform complex spatial analyses and measurements.
• The `Measure Position Distance` node enhances the capabilities of AugeLab Studio for working with spatial data and coordinates.