Railroad Forums 

  • Geospatial Analysis Thread

  • Guilford Rail System changed its name to Pan Am Railways in 2006. Discussion relating to the current operations of the Boston & Maine, the Maine Central, and the Springfield Terminal railroads (as well as the Delaware & Hudson while it was under Guilford control until 1988). Official site can be found here: PANAMRAILWAYS.COM.
Guilford Rail System changed its name to Pan Am Railways in 2006. Discussion relating to the current operations of the Boston & Maine, the Maine Central, and the Springfield Terminal railroads (as well as the Delaware & Hudson while it was under Guilford control until 1988). Official site can be found here: PANAMRAILWAYS.COM.

Moderator: MEC407

 #1626888  by petahgriff8316
 
Analytics is my day job, so I've been doing some geospatial analysis at work lately. All that working with lats/longs got me curious to see if I could learn more about the elevation of the Back Road. I know I am just a regular non-railroader, but building a sim version of said line based on real-world elevation taught me that the line is certainly not "flat", even if rail grades are significantly less than their road counterparts generally are (largely due to ballast and other adjustments). I knew about the climbs through Deering (mainly after being held up by a stalled POWA at 195), up into Danville, and from Maranacook through Readfield, but wanted to see if I could get an idea for the line in its entirety.

Having manually plotted 1600 points of elevation on the line between Rigby and Waterville, I generated the GPX file and exported to Python to calculate a "rolling 10-point average" elevation for the entirety of the line, which you can see here (click to see full size). The highest point is around MP 154 (slightly north of College Rd. in Greene).

Image

I plan on reworking this quite a bit and annotating more mileposts and points of interest. Stay tuned! And yes, I know that I used "CSX Waterville Subdivision" in the title and then the PAR mileposts in the subtitle. :P
 #1626890  by TurningOfTheWheel
 
Great stuff!

It might be interesting to see what kind of point or line data already exists for routes like this... not that I have the bandwidth to be giving myself more projects right now. :wink:
 #1626891  by petahgriff8316
 
Right there with you! The Maine DOT actually has lat/long data available, but I'm pretty sure it doesn't have elevation...will have to check again. I have also considered just using those and making a bunch of API calls to get elevations for the lat/long points, but used https://onthegomap.com for the GPX with elevation and it worked out well enough; most Google Maps spot-checks of various points were right on the line. Either way, definitely want to use the official lat/long points and then augment them with elevation data; it's doable, I just have to plan it out.
 #1626894  by TurningOfTheWheel
 
Should be a fun project! Excited to see what higher-resolution data would open up (marking particularly steep grades or tight curves for example). I'm an R evangelist myself but I have some Python experience from my day job; let me know if you need any help at any point!
 #1626974  by markhb
 
This is awesome!

I have two questions: first, is Rigby on the right or the left (I'm assuming the left due to the lower elevation).

Second, assuming Rigby is on the left, I'd really be interested in knowing the MP of that first real peak coming out, before the first real downhill starts. I've known since I was a kid that there was essentially a long continuous uphill coming out of the yard, and I'm wondering where it ends.
 #1626999  by S1f3432
 
The first climb leaving Rigby starts at Congress St. as the railroad climbs up through Deering Center
over the hump that divides the waterfront from the Presumpscot River in Falmouth. After crossing
the Presumpscot the next climb is up through Cumberland and down to the Royal River in Yarmouth.
This second hump was eased somewhat by a track relocation that moved the junction of the Back Road
and Lower Road main lines eastward to it's present location at Royal Jct. The original alignment of the
Back Road was skirting the southern edge of Cumberland Center village.
 #1627011  by petahgriff8316
 
markhb wrote: Mon Aug 07, 2023 8:54 am This is awesome!

I have two questions: first, is Rigby on the right or the left (I'm assuming the left due to the lower elevation).
Thanks! You are correct, Rigby is on the left - the next iteration will have at least the basic mileposts.

markhb wrote: Mon Aug 07, 2023 8:54 am Second, assuming Rigby is on the left, I'd really be interested in knowing the MP of that first real peak coming out, before the first real downhill starts. I've known since I was a kid that there was essentially a long continuous uphill coming out of the yard, and I'm wondering where it ends.
I didn't get too granular with that end of the route yet, but that sounds correct
S1f3432 wrote:The original alignment of the
Back Road was skirting the southern edge of Cumberland Center village.
I just learned about this in the last year or so. If you look at the Google satellite imagery you can vaguely see another grade breaking off at around 187 (Route 9 xing).

I generally gathered that the first "real" incline of any note heading north was through Deering. At first glance, it doesn't seem huge, but you can definitely tell it gains elevation between crossings and even more so once you hit 195 (Forest).

In the same direction, there also seems that there is a pretty solid climb from Blake up into Danville, and then another coming out of Lewiston into Greene to the high point at 154. East of Leeds, a notable descent from Monmouth into Winthrop yields to a climb from the base of Maranacook through Readfield and all the way to the summit east of Leeds at ~133.8, just east of the hotbox detector at 134. From there it's mostly downhill to Waterville, where the elevation is roughly 100 feet above sea level.
 #1627087  by petahgriff8316
 
An updated swing at the elevation - this time from the perspective of Waterville -> Portland. As before, you can click to see the full-size image!

Quick caveats:
  • Some of the distance between points do not appear to scale; this is known and will be remedied in a future run. These points were manually plotted, and curves necessitate a higher number of "points" than straightaways, which is why the distance from Maranacook to Leeds (~12 miles with a long straightaway between the Annabessacook crossings) looks shorter than Androscoggin to Danville (~7 miles with a massive curve coming off the bridge heading west). I hope to get an elevation API up and running for the next iteration so that all the points can be automatic. As noted before, this is doable, I just have to get my act together.
  • I had previously highlighted a number of sidings, as well, but they got a bit busy with all the points of interest. In hindsight, I am annoyed that I got rid of Blake because the big climb between Gray and Danville actually starts at Blake in earnest, whereas I thought it was Cobbs Bridge (170.7).
Image
 #1627097  by petahgriff8316
 
CN9634 wrote:Well done. Not sure if it’s helpful but there is an existing Google map made that plots out the entire railroad, not sure if you can source feed this into your model.
https://www.google.com/maps/d/u/0/viewe ... DyxZSPo04Q
This is great - I had seen it before at a high level but never dove into it. Cool that you can turn on old stations/etc.

Currently running queries for elevation based on the MaineDOT lat/long data...I found a free API that has worked so far.

For those interested, here is an excellent shot by Thomas Coulombe that illustrates the scale of topography (climbing north at 139). Looking at the lead locomotive alone, it's obvious that it's a grind, but then you see the elevation of the cars that it's hauling and the appreciation for the grade is multiplied.
 #1627283  by petahgriff8316
 
Image

Tried posting last night, but the image was corrupted — reposting after fixing the hosting issue.

Found the USGS Elevation Point Query Service (EPQS) API that returns elevation given a lat/long pair. I fed it all the lat/longs from the MaineDOT route file for CSX/PAR between Portland and Waterville, and got (what I think is) a solid elevation return.

Unlike the first two runs, all of these points were generated automatically, thus (in my view) more likely to be accurate. Added points of reference for the duration of the line to provide context of the elevation, which was done by taking the lat/long associated with a given point and verifying its location with GoogleMaps. Interestingly enough, the mileage generated by the distance between the points is accurate to the mileposts within 0.2 miles, which (I think) is pretty good for an 86 mile segment.

With that, a few notes:
  • The elevations listed are based on rolling windows of 3 points, with the general premise being that it smooths out noise in the data. For example, if the three elevation values for three points are 107, 110, and 107, the "rolling window" average for the given middle value (110) would instead be 108. For the first three points in the dataset, the average of the first three is used, and the inverse with the last three.
  • I compared the values returned by the rolling window against the raw values and found that they were largely aligned, with the only difference that the rolling window is far less noisy. If this was an exercise in obtaining the precise height of a given lat/long, I wouldn't do so, but the spirit is more around the elevation profile and less about particular topography.
  • In the last iteration, a concern I had was that the index points (X axis) were purely based on the number of points and were not equidistant, which resulted in certain segments looking longer or shorter than actuality. The MDOT data points were not equidistant, but they were pretty standard at about 0.05-0.07 per mile, and the distribution was fairly normal (for my fellow data nerds).
  • With a new API comes a "switching" in the order of the two highest points. The new high point is MP 133.8 in Readfield, just east of the hotbox detector at Plains Rd, at 323' MSL. Meanwhile, MP 154 in Greene remains the highest point west of Leeds at 317' MSL.
It should be noted that these are not official measurements, and they are different from the onthegomap service used before. I wouldn't be surprised to know that the "actual" GPS elevation at a given point deviates from these. However, since we can't measure the amount of ballast in a given point in the line and/or topography that is native vs. "graded", it's the best way to compare apples to apples - or mileposts to mileposts!
 #1630859  by jamoldover
 
Interesting data set. By way of comparison (to get an idea of how accurate your source data is), here are the official GRS track chart pages from 1996 for the section between Waterville and Rigby. It's missing the page between MP 140-150 - according to the source I had at the railroad who sent them to me 20 years ago, that page got deleted from the railroad's computers at some point prior to 2000, and they'd never bothered to recreate it...

With regard to the accuracy of the length measurements coming out to within 0.2 miles of the mileposts, one thing you'll notice when you look at the track charts is that the mileposts are not one mile apart. The VS section measurements are in feet (remove the "+" sign to get the actual number, so 3632 + 11 is a measurement of 363,211 feet from the zero point), and you can subtract one from the next to get the actual distances. It does get a bit tricky to follow between MP 113 and MP 114, and again in a couple of places between MP 191 and MP 200 but I can tell you (having measured it), the actual distances are:
MP 113-MP 114: 7657' - the location of MP 113 is based on measuring via the Lower Road, and the difference between that and measuring via the Back Road isn't an even multiple of 5280.
MP 191-MP 192 (AKA PLD 6-PLD 7): ~ 1 mile
MP 197-MP 198 (AKA PLD 12-PLD 13): 6812'
(501.64 KiB) Not downloaded yet
 #1630927  by petahgriff8316
 
Thanks for this! I appreciate the clarification regarding the "measured mile" - I know there are a few like this, but that the majority of mileposts are not 5280' or a multiple thereof - but in evaluating the distance from CPF 113 (Waterville Yard) to 114 (Mayflower) they were not aligning. Still, validating to see that the points generally lined up, even down to the peak being in Readfield being ~133.75 (old MP) and the second-highest (general) peak being ~154. I would be curious to see if I could devise some sort of CV (computer vision) solution to parse the TIF provided.
Last edited by MEC407 on Mon Oct 09, 2023 7:47 am, edited 1 time in total. Reason: unnecessary quoting