The default of "merge all nodes regardless of elevation" is preserved. This PR simply adds an option for the user to choose: whether they want to make nodes with the same (X,Y) but different Z to be considered separate nodes.
This has a basic assumption that the provided node elevation is consistent, as shown below in the examples.
After enabling the --consider-elevation option:
Example 1
If we started with the following candidate nodes:
(0, 0)
(0, 0)
(0, 0)
(0, 0)
(0, 0)
Then we will get the resulting unique nodes:
(0, 0)
Example 2
If we started with the following candidate nodes:
(0, 0, 1)
(0, 0, 2)
(0, 0, 1)
Then we will get the resulting unique nodes:
(0, 0, 1)
(0, 0, 2)
Example 3
If we started with the following candidate nodes:
(0, 0) (i.e., elevation data is missing)
(0, 0, 1)
(0, 0, 2)
(0, 0)
(0, 0)
(0, 0, 1)
Fixes #36 .
Explainer
The default of "merge all nodes regardless of elevation" is preserved. This PR simply adds an option for the user to choose: whether they want to make nodes with the same (X,Y) but different Z to be considered separate nodes.
This has a basic assumption that the provided node elevation is consistent, as shown below in the examples.
After enabling the
--consider-elevation
option:Example 1
If we started with the following candidate nodes:
Then we will get the resulting unique nodes:
Example 2
If we started with the following candidate nodes:
Then we will get the resulting unique nodes:
Example 3
If we started with the following candidate nodes:
Then we will get the resulting unique nodes: