The problem of finding the best path trajectory in a graph is highly complex due to its combinatorial nature, making it difficult to solve. Standard search algorithms focus on selecting the best path trajectory by introducing constraints to estimate a suitable solution, but this approach may overlook potentially better alternatives. Despite the number of restrictions and variables in path planning, no solution minimizes the computational resources used to reach the goal. To address this issue, a framework is proposed to compute the best trajectory in a graph by introducing the mathematical morphology concept. The framework builds a lattice over the graph space using mathematical morphology operators. The searching algorithm creates a metric space by applying the morphological covering operator to the graph and weighing the cost of traveling across the lattice. Ultimately, the cumulative traveling criterion creates the optimal path trajectory by selecting the minima/maxima cost. A test is introduced to validate the framework’s functionality, and a sample application is presented to validate its usefulness. The application uses the structure of the avenues as a graph. It proposes a computable approach to find the most suitable paths from a given start and destination reference. The results confirm that this is a generalized graph search framework based on morphological operators that can be compared to the Dijkstra approach.