Hydrogeological boundaries, such as recharge boundaries (e.g., rivers) and impervious boundaries (e.g., faults), significantly influence groundwater flow and resource management. Previous methods have improved the estimation of aquifer parameters and the distance from the observation well to the image well; however, they do not address boundary type identification within a unified framework and require graphical steps to determine the locations of the image well and the boundary. Hence, this study develops an analytical approach for confined aquifers by using piecewise linear regression combined with a Bayesian classification to determine the boundary type. It then integrates the Theis method, image well theory, and simulated annealing to simultaneously identify the image well location and aquifer parameters, including transmissivity and storage coefficient. Finally, the boundary location and orientation are separately delineated by equations developed based on known locations of the pumping well and the image well. The proposed framework is applied to pumping test data from two field sites — near the Tongue River in Montana and Dry Lake in Nevada (U.S. Bureau of Reclamation) — demonstrating its accuracy and practical applicability. By unifying boundary type classification, boundary location determination, and parameter estimation within a single analytical framework, this method provides a more comprehensive and time-efficient solution than existing approaches. Its implementation can improve groundwater resource management and support infrastructure development in settings where hydrogeological boundaries play a crucial role.