Saturday, September 30, 2006

Measuring Up

Some of you may have noticed my appeal in uk.rec.waterways for information on the lengths of a few tunnels, and wondered what I was up to.

Well here's what I'm doing. I created my data originally using, mainly, the route tables on Jim Shead's web site - which seem accurate and match whenever I cross-check anything.

When I interpolated a place, I guessed how to split the distance.

Over time this had lead to the distances being a bit arbitrary - the overall distances tend to be right, but some of the intermediate ones are really rather silly. And sometimes people complain about this.

Also, of course, people have been moving places around to get the coordinates spot on - yet this has no affect on the distances, when it ought to do.

So what I'm doing is to only keep the overall distances and to calculate the intermediate places during the data build. I'll compute the pythagorean distance between the places, total those, and then distribute the actual distance in proportion to the coordinate spacing (producing an error whenever there is a significant discrepency between the two totals).

The nice thing about this is that it keeps the totals right, and keeps all the intermediate places at the correct relative spacing, and always adjusts itself whenever new places are added or places haev their locations tweaked.

But I want known exact distances to remain exact: so tunnels in particular are flagged as having a fixed distance, which isn't affected by the adjustment.

I've built this, and tested it for one stretch of waterway - I'll add a couple more and then it can become a bit of background work.

Why am I doing this particular thing now? - well because it's part of a general attempt to strengthen the data and make it into a firmer foundation to build more sophisticated calculations etc on top of.


Post a Comment

<< Home