1,000 missing survey data points to be fixed by interpolation

kashifjillani

New Member
Joined
Jul 26, 2011
Messages
47
Hello experts,

Tried all methods without success

I have large data of around 10,000 drainage pipe segments and 10,000 junctions in ArcGIS layer

The problem is: due to some reason certain junctions could not be accessed for survey, thus 1,000+ entries are missing for pipes (up stream and d/s invert elevation) and junctions' surface elevation

Logically, interpolation should work here. (based on slope, u/s tag invert level or two junction u/s tag invert level or likewise)

Tried to do it manually in excel, but quite tiring and with less confidence (unprofessional too)

Any clue how to fix it?



e.g.
<table border="0" cellpadding="0" cellspacing="0" width="531"><tbody><tr style="height:12.75pt" height="17"><td style="height:12.75pt;width:48pt" height="17" width="64"> <table border="0" cellpadding="0" cellspacing="0" width="960"><colgroup><col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:2560;width:53pt" width="70"> <col style="mso-width-source:userset;mso-width-alt:3291; width:68pt" span="2" width="90"> <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> <col style="mso-width-source:userset;mso-width-alt:2560; width:53pt" span="2" width="70"> <col style="width:48pt" span="2" width="64"> <col style="mso-width-source:userset;mso-width-alt:3620;width:74pt" width="99"> <col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:5046;width:104pt" width="138"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td style="height:12.75pt;width:48pt" height="17" width="64">ASSETID</td> <td class="xl24" style="width:53pt" width="70">LENGTH</td> <td class="xl24" style="width:68pt" width="90">US_INVERT</td> <td class="xl24" style="width:68pt" width="90">DS_INVERT</td> <td class="xl24" style="width:58pt" width="77">PIPE_DIA</td> <td class="xl24" style="width:53pt" width="70">US_TAG</td> <td class="xl24" style="width:53pt" width="70">DS_TAG</td> <td style="width:48pt" width="64">TYPEID</td> <td style="width:48pt" width="64">PIPEMATERI</td> <td style="width:74pt" width="99">US_PIT_NAM</td> <td style="width:48pt" width="64">TYPEDESCRI</td> <td style="width:104pt" width="138">ASSETDESCR</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196934</td> <td align="right">11.13</td> <td align="right">37.46</td> <td align="right">37.34</td> <td align="right">300</td> <td align="right">7798</td> <td align="right">7797</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td align="right">17</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 7798 - 7797</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196935</td> <td align="right">5.29</td> <td align="right">37.34</td> <td align="right">37.32</td> <td align="right">300</td> <td align="right">7797</td> <td align="right">7722</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td align="right">16</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 7797 - 7722</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196936</td> <td align="right">12.95</td> <td align="right">40.25</td> <td align="right">40.2</td> <td align="right">300</td> <td align="right">7642</td> <td align="right">7641</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td align="right">16</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 7642 - 7641</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196937</td> <td align="right">25.93</td> <td align="right">39.61</td> <td align="right">0</td> <td align="right">375</td> <td align="right">7821</td> <td align="right">7846</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td>D</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7821 - 7846</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196938</td> <td align="right">10.45</td> <td align="right">40.61</td> <td align="right">40.46</td> <td align="right">375</td> <td align="right">7783</td> <td align="right">7771</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td align="right">22</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7783 - 7771</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196939</td> <td align="right">76.51</td> <td align="right">0</td> <td align="right">40.42</td> <td align="right">375</td> <td align="right">7772</td> <td align="right">7771</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td align="right">2</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7772 - 7771</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196940</td> <td align="right">8.26</td> <td align="right">39.88</td> <td align="right">39.84</td> <td align="right">300</td> <td align="right">7735</td> <td align="right">7734</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td align="right">11</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 7735 - 7734</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196941</td> <td align="right">10.11</td> <td align="right">49.48</td> <td align="right">49.42</td> <td align="right">300</td> <td align="right">8023</td> <td align="right">8022</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td>SE</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 8023 - 8022</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196942</td> <td align="right">7.41</td> <td align="right">41.56</td> <td align="right">41.47</td> <td align="right">300</td> <td align="right">7710</td> <td align="right">7709</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td align="right">16</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 7710 - 7709</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196943</td> <td align="right">9.54</td> <td align="right">0</td> <td align="right">40.62</td> <td align="right">300</td> <td align="right">7659</td> <td align="right">7658</td> <td align="right">1505</td> <td>RCP Class (2)</td> <td align="right">40</td> <td>RCP Class (2) 300 mm diameter</td> <td>Pipe - 7659 - 7658</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196944</td> <td align="right">28.87</td> <td align="right">46.64</td> <td align="right">0</td> <td align="right">450</td> <td align="right">70108</td> <td align="right">8004</td> <td align="right">1507</td> <td>RCP Class (2)</td> <td align="right">28</td> <td>RCP Class (2) 450 mm diameter</td> <td>Pipe - 70108 - 8004</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196945</td> <td align="right">37.83</td> <td align="right">40.96</td> <td align="right">40.66</td> <td align="right">375</td> <td align="right">7912</td> <td align="right">7911</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td align="right">11</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7912 - 7911</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196946</td> <td align="right">21.53</td> <td align="right">40.28</td> <td align="right">0</td> <td align="right">375</td> <td align="right">7645</td> <td align="right">7644</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td align="right">23</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7645 - 7644</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196947</td> <td align="right">48.5</td> <td align="right">38.99</td> <td align="right">38.3</td> <td align="right">450</td> <td align="right">7907</td> <td align="right">7906</td> <td align="right">1507</td> <td>RCP Class (2)</td> <td align="right">6</td> <td>RCP Class (2) 450 mm diameter</td> <td>Pipe - 7907 - 7906</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196948</td> <td align="right">80.65</td> <td align="right">0</td> <td align="right">39.88</td> <td align="right">375</td> <td align="right">7823</td> <td align="right">7822</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td>F</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7823 - 7822</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196949</td> <td align="right">37.62</td> <td align="right">39.19</td> <td align="right">0</td> <td align="right">450</td> <td align="right">7633</td> <td align="right">7632</td> <td align="right">1507</td> <td>RCP Class (2)</td> <td align="right">8</td> <td>RCP Class (2) 450 mm diameter</td> <td>Pipe - 7633 - 7632</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17" align="right">196950</td> <td align="right">18.29</td> <td align="right">0</td> <td align="right">40.28</td> <td align="right">375</td> <td align="right">7881</td> <td align="right">7880</td> <td align="right">1506</td> <td>RCP Class (2)</td> <td align="right">5</td> <td>RCP Class (2) 375 mm diameter</td> <td>Pipe - 7881 - 7880</td> </tr> </tbody></table></td><td class="xl22" style="width:53pt" width="70">
</td><td class="xl22" style="width:68pt" width="90">
</td><td class="xl22" style="width:68pt" width="90">
</td><td class="xl22" style="width:58pt" width="77">
</td><td class="xl22" style="width:53pt" width="70">
</td><td class="xl22" style="width:53pt" width="70">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr><tr style="height:12.75pt" height="17"><td style="height:12.75pt" height="17" align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td><td align="right">
</td></tr></tbody></table>

Can send the table if required

Thanks in advance,

regards,

Kashif
:confused:
 
Hi p45cal,

Sorry couldnt find your name,

Thanks for your effort,

You are right, in my previous post it was stated that both ways are valid (either by trigonometry or arithmetic as you said)

Yes, we can put value of DS-TAG of AssetID 7850 ( 13.97 ) straightaway, because the TAGs are same.

However, it is not the typical case, if a tag (manhole) was not accessed, we wouldnt have any value. May be something special about this case (other pipe fully immersed that couldnt be surveyed). BUT, yet we can take this value anyway.

The main challenge is automation of these calculations, as you can see from the size of data, manual calculations for each are next to impossible!

ANOTHER, WAY I CAN SEE IS (just clicked):

I HAVE GOT GROUND SURFACE ELEVATION OF EACH TAG,

IF WE CAN DRAW GRAPHS OF CONNECTING TAGS (SURFACE ELEVATIONS AND PIPE INVERTS). THEN, FROM THE GRAPH WE CAN DRAG THE VALUES TO MATCH THE UPSTREAM AND DWONSTREAM TREND.

SO, WE NEED TO FIND THE ASSETS AND ARRANGE IN AN ORDER, US_TAG DS_TAG OF ONE ASSET THEN US_TAG DS_TAG OF NEXT AND SO ON UNTIL WE FIND NO DS_TAG VALUE AS MAIN/MW/OPEN DRAIN/OUTLET OR SOMETHING

THEN WE CAN FIX ALL THE 0 VALUES.

IT MIGHT NEED 20+ GRAPHS WITH TWO LINES IN EACH, (SURFACE ELEVATION LINE AND US_INVERT OR DS_INVERT)

TAGS AGAINST SURFACE ELEVATION VALUES ARE UPLOADED HERE

http://www.mediafire.com/?vus1lw0rktjonja

Note: The whole drainage network is not just one interconnected network but there are 20+ standalone networks.



I HOPE YOU GET THE IDEA.

THANKS AGAIN, AND I REALLY ACKNOWLEDGE YOUR EFFORT :-)
I am not sure if we can play with lines in a graph in a manner that table values are also changed accordingly.
 
Upvote 0
Hello all who attempted to solve this "mystery" problem,

It seems there are many issues which prevent reaching a sure shot solution

Another approach, which is a bit simple but require human intervention is: to draw a graph and manually adjust the missing data to match the trend of available data.

But, the data needs to be sorted link wise as shown in spreadsheet

http://www.mediafire.com/?2tqu3ovmxcqqced

You would see data in raw form (as copied from gis layer) and sorted (as required for adjustment)

Any, clue how to sort this data from two different layers

Regards,





 
Upvote 0
It seems there are many issues which prevent reaching a sure shot solution
I've been looking at the data and it's got plenty of problem data. We'll look at how to deal with that later.
But, the data needs to be sorted link wise as shown in spreadsheet
Well, the data seems to be treatable, more or less, as a linked list (or more accurately several linked lists). Linked lists is/was actually programming terminology for a way of sorting data without moving it about; just add a link to the next record in the form of a record no., then you can move through the records in order by jumping from one record to another using the added link(s) for each record.
In this case the links are already there in the form of downstrean and upswtream tags, it's just a matter of following them. Take any asset, look at its downstream tag, look for that tag amongst the upstream tags in the list, when you've found it, look at its downstream tag, look for that in the upstream tags. etc. etc. Of course, because more than one asset may have the same upstream tag this means there's a branch into more directions.

Anyway, in preparation to do this I thought I'd check the integrity of the data to see that no asset had the same upstream and downstream tag; 3 had:
Excel Workbook
BCDEFG
2ASSETIDLENGTHUS_INVERTDS_INVERTUS_TAGDS_TAG
236119931352.660033033303
451320428751.318.7218.34916916
559721515829.6627.8527.6525562556
Sheet


Is this normal? A pipe of 52 metres starting and finishing in the same place?
 
Upvote 0
I've been looking at the data and it's got plenty of problem data. We'll look at how to deal with that later.
How to deal with this?:
Below is a selection of some of the anomalies. I've highlighted in grey those tags which are the same and the corresponding us/ds tag. You'd expect the values to be more or less the same. I've highlighted in red the ones that seem at variance, though you can't always be sure which is the value at variance.
These values are potentially to be used to calculate interpolated heights.
In yellow, it looks like two are at variance! How do you tell the computer this?!
In purple, not sure which one is wrong.

[I'll have a look at getting assets sorted according to the links tomorow or the day after (I may not get time). This might shed light on which values are more likely to be correct.]
Excel Workbook
ABCDEFG
24row no.ASSETIDLENGTHUS_INVERTDS_INVERTUS_TAGDS_TAG
Sheet
Excel Workbook
ABCDEFG
25759021931216.4117.22082628261
2677262194481.0518.081804701728262
27785721957959.317.817.2782638262
28
29773321945562.3599899783128311
30782921955166.200194958312
3178372195595.0414.0213.9783338312
32
33757921930111.6716.516.4440204019
3476722193945.31099782754020
35
36773321945562.3599899783128311
3777392194614.3113.3513.383114012
3878202195424.8214.1613.3195088311
39
40767521939767.5115.5414.8782598258
41775921948157.8599899782588256
4277832195055.71015.2483058258
43
44774121946366.5514.43082564013
45775921948157.8599899782588256
4677812195033.9214.6314.4683028256
4778792196011.8715.1315.1182448256
48
49440620418037.0816.89018301829
504575204349149.39303.91018291828
51470420447864.7717.6216.8118241829
52
53457320434723.83303.91303.6118274211
54480020457448.2914.9814.8542124211
55480220457613.3914.76042114210
56
57463720441120.010303.6118744222
5847112044857.7115.8715.6342234222
59471320448727.7615.6315.5842224221
60
61457620435029.1303.91303.6118811880
62461120438537.4916.99303.6118821881
63486720464114.2217.6617.4918871881
64
6585922482618.1313.8413.75296287
66945025326267.1-272.390287286
67949825352481.86013.75288287
68
6921419715080.57303.61079247923
7026619720575.99303.61303.379257924
7130019723942.53038.2579267924
72
73725421723473.1115.9315.7113921391
74725521723538.460303.6147581392
75732221733642.9401613981392
76746321749823.3116.3116.1513931392
77
78368920064188.04088.2150004999
79369520064739.7530.7730.5649994998
80
81576021532116.2466.9166.1922762268
82576121532232.5919.5119.2922682267
83601021557145.821.5120.1722692268
84
856019699211.68041.13784571106
8620419714048.29-0.59-0.597110571106
8729219723192.6400711067847
Sheet
Excel Workbook
89506020560837.3442.2342.062052920528
90517220572044.2842.5542.232040520529
91528420583224.85-0.59-0.592053020529
92
9397602613514.05001228312253
94976126135214.0637.9401225312277
9597752613833.8707.511225412253
96
974880204654111.8924.1822.58579478
98927225227540.8712.9512.67479478
99944825325666.8112.612.34478477
100
101189919885028.4146.5846.09689412284
102976926136833.0337.3837.471228412286
103
10411681981172.8230.9530.8167326
105394220089443.922.43064
106
107399520094714.7320.7815.2423672366
108424220119414.0920.7820.6323662365
Sheet
 
Last edited:
Upvote 0
Thanks p45cal,

You are right, the data has errors, off course these are human input.

Thats why, the fully automated methods wont work.

As in my last post, I picked up a network manually to work on it.

This way is laboursome, but we have no choice.

If there is any way to sort the data, I am ready to pick the data and keep apply certain command which would just sort the data for me.

And then, one can fix it graphically (also check for corrections simultaneously)

Regards,
 
Upvote 0
But, the data needs to be sorted link wise as shown in spreadsheet < snip >
Any, clue how to sort this data from two different layers
Yes, using the linked list method alluded to earlier. Using only the data in DrainagePipes.xls I got the same sequence as in your AdjustingDataGraphical example.
This bit of (1st draft) code, which you should run after selecting a cell in column F, will try and follow the pipe sequence in one direction and select the cell in column F that is the end of the sequence:
Code:
Sub findaroot()
Set c = ActiveCell  'cell in colm F
Do
  Set c = Range("G:G").Find(what:=c.Value, LookIn:=xlValues, lookat:=xlWhole)  '.Offset(, -1)
  If Not c Is Nothing Then Set c = c.Offset(, -1): c.Select
Loop Until c Is Nothing
End Sub
This next bit of code goes in the opposite direction and does the same, but does a little copying en route:
Code:
Sub findanend([COLOR=Blue]destnws[/COLOR])
Set c = ActiveCell  'cell in colm F
Cells(c.Row, "B").Resize(, 6).Copy destnws.Cells(Rows.Count, "B").End(xlUp).Offset(1)
Do
  Set c = Range("F:F").Find(what:=c.Offset(, 1).Value, LookIn:=xlValues, lookat:=xlWhole)  '.Offset(, -1)
  If Not c Is Nothing Then
    c.Select
    Cells(c.Row, "B").Resize(, 6).Copy destnws.Cells(Rows.Count, "B").End(xlUp).Offset(1)
  End If
Loop Until c Is Nothing
End Sub
It shouldn't be run on its own, but called with an argument, being the destination worksheet for copying to. This code too depends on the selected cell in column F as a starting point.

So if we run these one after the other, the first will find one end of a sequence, then the other will use that as a starting point to run the other way to the other end:
Code:
Sub findasequence()
Set SrcWS = ActiveSheet
findaroot
Set destnws = Sheets.Add(after:=Sheets(Sheets.Count))
SrcWS.Activate
findanend destnws
End Sub
Again, this needs to be run after selecting a cell in column F.

So to get the sequence you had in AdjustingDataGraphical, I first searched for one of the pipe ASSETIDs, in DrainagePipes column B, selected the cell in column F of the same row and ran findasequence, and got:
Excel Workbook
BCDEFG
1ASSETIDLENGTHUS_INVERTDS_INVERTUS_TAGDS_TAG
22056849.03001856920378
320569867.95050.722037818570
420571312.1650.751.011857018571
520571448.8951.0101857120377
620572190.85050.022037720376
720574011.425050.062037620374
82057185.150.0202037420369
920563722.87002036920368
1020569622.62002036820367
1120570321.7100203670
Sheet


You could use the same logic to sort your smaller sequences in AdjustingDataGraphical.

[By the way, when using the code on DrainagePipes, currently it doesn't handle branching because it always uses the first instance of a given tag that it finds. I'm not even sure I'm searching in the right direction.]

In the results above, you'll have a hard job interpolating anything but one value. On exploration, this happens quite a lot.
You've put a chart in AdjustingDataGraphical, but this takes no account of distance/pipe length. You need to use an XY scatter, and have distance at the bottom (x-axis). Here's another sequence I found at random:
Excel Workbook
BCDEFG
1ASSETIDLENGTHUS_INVERTDS_INVERTUS_TAGDS_TAG
219741122.842.4442.0677157711
319705245.9341.9941.677117710
41969427.4141.5641.4777107709
519696438.5541.4641.277097674
61970021.2341.241.1876747708
719705639.2740.92077087707
81972538.340077077677
919713472.67039.3476777727
101971815.010077277726
1119738168.7237.5237.4377267725
1219728030.8137.3836.8177257724
1319718744.3100772468714
1419749631.8036.576871468713
1519722080.0436.570687137723
1619717488.5436.436.2777237722
1719728737.7136.08077227902
181973164.2400790269813
1919706712.2800698137470
201970773.28036.0274700
Sheet


I then worked out cumulative distance, and got:
Excel Workbook
IJ
1Distinvert
2042.44
322.841.99
422.842.06
568.7341.56
668.7341.6
776.1441.46
876.1441.47
9114.6941.2
10114.6941.2
11115.9240.92
12115.9241.18
13155.190
14155.190
15163.530
16163.530
17236.20
18236.239.34
19241.2137.52
20241.210
21309.9337.38
22309.9337.43
23340.740
24340.7436.81
25385.050
26385.050
27416.8536.57
28416.8536.57
29496.8936.4
30496.890
31585.4336.08
32585.4336.27
33623.140
34623.140
35627.380
36627.380
37639.660
38639.660
39642.940
40642.9436.02
Sheet


which I then charted on xy scatter (the zeroes are plotted off chart):
<embed src="https://www.box.com/embed/27lqpk2quazbh98.swf" wmode="opaque" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="400" width="466">

Sometimes you'll see two red data points almost on top of each other, this is two heights in the same manhole.

In xl2003 and xl2010 (but not in xl2007 unless an Office update has reintroduced it) you can select a single data point on a line in a chart (click it once, pause, click it again) and drag it, either vertically or horizontally, but not both at the same time, and drop it where you want it. The corresponding value in the sheet will adjust.

Only pointers, hopefully you'll be able to use some of them?
 
Upvote 0
Yes, using the linked list method alluded to earlier. Using only the data in DrainagePipes.xls I got the same sequence as in your AdjustingDataGraphical example.
This bit of (1st draft) code, which you should run after selecting a cell in column F, will try and follow the pipe sequence in one direction and select the cell in column F that is the end of the sequence:
Code:
Sub findaroot()
Set c = ActiveCell  'cell in colm F
Do
  Set c = Range("G:G").Find(what:=c.Value, LookIn:=xlValues, lookat:=xlWhole)  '.Offset(, -1)
  If Not c Is Nothing Then Set c = c.Offset(, -1): c.Select
Loop Until c Is Nothing
End Sub
This next bit of code goes in the opposite direction and does the same, but does a little copying en route:
Code:
Sub findanend([COLOR=Blue]destnws[/COLOR])
Set c = ActiveCell  'cell in colm F
Cells(c.Row, "B").Resize(, 6).Copy destnws.Cells(Rows.Count, "B").End(xlUp).Offset(1)
Do
  Set c = Range("F:F").Find(what:=c.Offset(, 1).Value, LookIn:=xlValues, lookat:=xlWhole)  '.Offset(, -1)
  If Not c Is Nothing Then
    c.Select
    Cells(c.Row, "B").Resize(, 6).Copy destnws.Cells(Rows.Count, "B").End(xlUp).Offset(1)
  End If
Loop Until c Is Nothing
End Sub
It shouldn't be run on its own, but called with an argument, being the destination worksheet for copying to. This code too depends on the selected cell in column F as a starting point.

So if we run these one after the other, the first will find one end of a sequence, then the other will use that as a starting point to run the other way to the other end:
Code:
Sub findasequence()
Set SrcWS = ActiveSheet
findaroot
Set destnws = Sheets.Add(after:=Sheets(Sheets.Count))
SrcWS.Activate
findanend destnws
End Sub
Again, this needs to be run after selecting a cell in column F.

So to get the sequence you had in AdjustingDataGraphical, I first searched for one of the pipe ASSETIDs, in DrainagePipes column B, selected the cell in column F of the same row and ran findasequence, and got:
Excel Workbook
BCDEFG
1ASSETIDLENGTHUS_INVERTDS_INVERTUS_TAGDS_TAG
22056849.03001856920378
320569867.95050.722037818570
420571312.1650.751.011857018571
520571448.8951.0101857120377
620572190.85050.022037720376
720574011.425050.062037620374
82057185.150.0202037420369
920563722.87002036920368
1020569622.62002036820367
1120570321.7100203670
Sheet


You could use the same logic to sort your smaller sequences in AdjustingDataGraphical.

[By the way, when using the code on DrainagePipes, currently it doesn't handle branching because it always uses the first instance of a given tag that it finds. I'm not even sure I'm searching in the right direction.]

In the results above, you'll have a hard job interpolating anything but one value. On exploration, this happens quite a lot.
You've put a chart in AdjustingDataGraphical, but this takes no account of distance/pipe length. You need to use an XY scatter, and have distance at the bottom (x-axis). Here's another sequence I found at random:
Excel Workbook
BCDEFG
1ASSETIDLENGTHUS_INVERTDS_INVERTUS_TAGDS_TAG
219741122.842.4442.0677157711
319705245.9341.9941.677117710
41969427.4141.5641.4777107709
519696438.5541.4641.277097674
61970021.2341.241.1876747708
719705639.2740.92077087707
81972538.340077077677
919713472.67039.3476777727
101971815.010077277726
1119738168.7237.5237.4377267725
1219728030.8137.3836.8177257724
1319718744.3100772468714
1419749631.8036.576871468713
1519722080.0436.570687137723
1619717488.5436.436.2777237722
1719728737.7136.08077227902
181973164.2400790269813
1919706712.2800698137470
201970773.28036.0274700
Sheet


I then worked out cumulative distance, and got:
Excel Workbook
IJ
1Distinvert
2042.44
322.841.99
422.842.06
568.7341.56
668.7341.6
776.1441.46
876.1441.47
9114.6941.2
10114.6941.2
11115.9240.92
12115.9241.18
13155.190
14155.190
15163.530
16163.530
17236.20
18236.239.34
19241.2137.52
20241.210
21309.9337.38
22309.9337.43
23340.740
24340.7436.81
25385.050
26385.050
27416.8536.57
28416.8536.57
29496.8936.4
30496.890
31585.4336.08
32585.4336.27
33623.140
34623.140
35627.380
36627.380
37639.660
38639.660
39642.940
40642.9436.02
Sheet


which I then charted on xy scatter (the zeroes are plotted off chart):
<embed src="https://www.box.com/embed/27lqpk2quazbh98.swf" wmode="opaque" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="400" width="466">

Sometimes you'll see two red data points almost on top of each other, this is two heights in the same manhole.

In xl2003 and xl2010 (but not in xl2007 unless an Office update has reintroduced it) you can select a single data point on a line in a chart (click it once, pause, click it again) and drag it, either vertically or horizontally, but not both at the same time, and drop it where you want it. The corresponding value in the sheet will adjust.

Only pointers, hopefully you'll be able to use some of them?
Hi p45cal,

Thank you v much to figure it out

This is exactly what required; this way, erroneous data can also be verified - adjusted.

I tried to run the VB code (Tools - Macro - VB Editor) in MS Excel 2003, but no success, can you please describe how you run it?

Also, in Sheet1 of AdjustingDataGraphical.xls you would notice another data (Tag Key and Surface-Level) which is also to be plotted on same graph - which would allow to check the ground surface level (an extra measure to maintain the proportion)

Thanks you again, waiting for your reply...

Best regards,
 
Upvote 0
I tried to run the VB code (Tools - Macro - VB Editor) in MS Excel 2003, but no success, can you please describe how you run it?
Do points 1 and 2 here, and in step 3 paste the code I supplied. Now back on the sheet, select a cell in column F, then in get te macro list up (Alt+F8 is the shortcut) run findasequence.

Also, in Sheet1 of AdjustingDataGraphical.xls you would notice another data (Tag Key and Surface-Level) which is also to be plotted on same graph - which would allow to check the ground surface level (an extra measure to maintain the proportion)

Thanks you again, waiting for your reply...
You would have to explain in layman's terms the meaning of things - I don't understand us invert ds invert tags, what they're measured from, surface levels, how it might be related to anything else, it's all greek to me.

I can try and give pointers, but that's all.
 
Upvote 0
Oh you are right...

The US_INVERT or DS_INVERT is the elevation (form the sea level) of the pipe's lower inner side.

The drainage pipes are normally buried in ground - we cant see them or measure elevation.

So, we need to open the connecting manhole (in our case TAG).

"Some" of the manholes (TAGs) couldn't be accessed, due to some reasons.

SurfaceLevel is again elevation (above sea level) of the manhole cover.

We use it, to prevent us from going above the surface level of manhole cover (as it is not possible the pipe would be above the manhole)

Hope it answered the question

Thanks for your efforts,

and glad to draw your attention - solving the problem

regards,
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top