In GIS work, sometimes you face issues that look simple on the surface but have a huge impact on the data. One of the main problems the team faced in one of our projects was with the manholes coming from CAD. From a distance, they looked aligned with the pipes, but when you actually started working properly, you’d discover they weren’t matching. A manhole could be off by 20 cm, 50 cm, or even a whole meter. A small visual difference, but it breaks the entire dataset.
When we tried solving the issue with normal snapping in ArcGIS Pro, we ran into many limitations. Regular snapping only lets you pick one of three options: Vertex, Edge, or End. So, if the manhole was closer to an End but you had Vertex snapping enabled, it wouldn’t snap correctly. Also, snapping relies on a tolerance. If the manhole is outside that distance, it won’t work. And if you increase the tolerance, it might snap to the wrong place. With hundreds or even thousands of manholes, the process became exhausting, full of manual work, and prone to mistakes.
Things got worse when we wanted to transfer the CAD annotations. If the manholes weren’t perfectly aligned with the pipes, the annotations would also shift incorrectly. Manhole names could end up far away or even linked to the wrong pipe. This created a lot of data confusion.
We needed a practical, automated solution. That’s where I wrote a Python script to solve the problem at its core. The script calculates all three options—Vertex, Edge, and End—and measures the distance between the manhole and each one. Then it automatically chooses the closest match. This means no need to manually set the snap type or worry about tolerance. The script works precisely and fixes the manholes in the right places.
I also added something important: the script records the type of snap used for each manhole. After running it, I can review the results and see which snapped to a Vertex, which to an Edge, and which to an End. That gave me confidence in the results and transparency in the process.
Afterwards, I turned it into a tool inside ArcGIS Pro. The advantage is that anyone on the team can use it, even if they’re not programmers. The tool has a simple interface: select the manhole layer, the pipe layer, choose an output location, and hit Run. In just minutes, all the manholes are correctly aligned automatically, without any manual effort.
This solution saved enormous time, reduced errors caused by standard snapping, and ensured the annotations were placed correctly since they were based on properly aligned manholes. Most importantly, it showed that GIS work isn’t just about data entry or editing points—it’s also about developing automated solutions and tools that make the workflow faster, more accurate, and beneficial for the whole team
Информация по комментариям в разработке