Esri / local-government-desktop-addins

A series of ArcGIS Desktop Add-ins used in the ArcGIS for Local Government editing maps.
Apache License 2.0
61 stars 56 forks source link

Issue with interpolated elevations when using "split line with selected point" tool in Water Utility Networking #248

Closed arthurcw closed 6 years ago

arthurcw commented 7 years ago

Hi, I am using the "Split Line with Selected Points" tool in "Water Utility Network Editing" with the "MergeSplitElev" option enabled. I matched the upstream and downstream elevation fields in the loaded.water.config file to the respective fields in my pipe GIS data. After splitting, the upstream elevation of upstream pipe and downstream elevation of downstream pipe is correct, but the interpolated mid-elevation seems off.

Here is an example. The pipe and split point are also in attached shapefiles. Pipe Up Elev Dn Elev Length Slope Original 151.03 150.83 394.63 0.05% '---------------------------------------------------- Split 1 151.03 150.97 281.46 0.02% Split 2 150.97 150.83 113.18 0.13%

If calculated by hand, the interpolated elevation (in asterisk) should be 150.89 if the split pipes maintain the same slope as original pipe.

I try to replicate the 150.97 number from the tool. It looks like the "percentSplit" was calculated incorrectly. For pipe "Split 2", percentSplit = 281.46 / 394.64 = 0.71 Mid Elev = Dn Elev + (Up Elev - Dn Elev) x percentSplit = 150.83 + (151.03 - 150.83) x 0.71 = 150.97

The "percentSplit" should be using 113.18 as splitDist instead of 281.46

If the correct percentSplit is used: percentSplit = 113.18 / 394.64 = 0.29 Mid Elev = Dn Elev + (Up Elev - Dn Elev) x percentSplit = 150.83 + (151.03 - 150.83) x 0.29 = 150.89

I also tested the tool with the storm sewer data (WaterUtilities.gdb) included with the Water Utility Networking Add-ins, and it gave me the same issue with interpolated elevation.

Have anyone run into similar issues before?

Pipe.zip

Regards, Art

MikeMillerGIS commented 7 years ago

Great find, def a bug. Checking in a fix for it

MikeMillerGIS commented 7 years ago

Test case to ensure slops are being maintained, you need to trigger the AA after the split.

SplitBug.zip

MikeMillerGIS commented 7 years ago

I updated the preview builds if you want to test out the fix

arthurcw commented 7 years ago

The preview build works. Thanks!

MikeMillerGIS commented 7 years ago

Thanks for reporting it. Been hiding in there for a long time