Tuesday, 23 April 2019

MSL Rolleston-Timaru [0A]: Intro 1

With this particular article I am making it clear I am working towards Volume 11 as a major effort to get something that is actually going to be completed as a volume as soon as possible. This will not be a continuous effort throughout the year but it will be a major focus for the maps this year. At the same time I am refocusing my ambitious schedule that was planned for the year and suggesting it might have to be put out over two or three years.

Rolleston all the way through to Timaru is covered by a 0.3 metre aerial layer. At the moment I am downloading all of what is available in that layer for MSL right down to Waikouaiti and then from there all the way down to Dunedin and then Invercargill will soon follow. Mosaic projects have been assembled over the past few days to cover Lyttelton through to Templeton (the limit of 0.075 metre coverage of Christchurch), and from there will cover Rolleston and any other townships that are in 0.125 metre coverage for the Selwyn District, and from there at 0.3 metres heading south.

We will be using all available NZR surveys for the stations heading south and to match this resolution the 0.3 metre images will have to be rescaled to 0.1 metre size and segmented mosaic canvas used. Last time I wrote about using linear and segmented mosaic projects and indicated a clear preference for linear. However this is only possible where the base imagery is no more than 0.125 m pixel size as too much detail is lost scaling down the NZR images to match larger pixel sizes. At that point I have to bring in a tile grid to sit in the background of the canvas to provide grid indexes for segments and we don't want to duplicate multiple copies of this grid across a linear canvas because there are too many additional layers. Segmenting is actually OK for this situation because the stations are quite a distance apart, meaning no overlap problems, and therefore there is no benefit to a linear canvas.

So I am just about to create the first segmented canvas mosaic project in Gimp for Weedons / Weedons AFB / Burnham and maybe a few other stations heading south as well.

As one can imagine, completing a volume for a line as long as the MSL is quite an ambitious undertaking and it will be staged out and I will take breaks to do work on other areas as I always do. Volumes 5 and 12 in particular are other areas I want to make significant progress on this year and as previously noted there is the schedule I talked about earlier this year and I will look at the standard of completion for other volumes. But to get any of these volumes together I have to download all the aerial imagery for the base maps and that is always a big effort and that at the minimum is what is needed to bring the maps together regardless of what level is produced.

MSL also incorporates previous work done with Methven and Springburn lines and this will be brought in as well. There are no NZR surveys for either line so no issue with having to match NZR survey resolution.

Sunday, 21 April 2019

MSL Lyttelton-Rolleston [0B]: Christchurch-Hornby Intro

Following on from recent efforts to speed up mosaic production, due to having discovered the best way to combine multiple stations or a continuous length of corridor into one Gimp project, I have started doing this with the MSL around Christchurch. Yesterday and part of today has been spent combining several smaller projects into a big one covering Christchurch to Templeton Hornby, which is much of the western suburban corridor for Christchurch itself. There will also be one done for Lyttelton to Christchurch and for Addington to Kainga and Kaiapoi to Rangiora, this one might be taken a bit further north as the stations are further apart so we may be able to get more distance into it. If that was the case it would only go to just south of Amberley at the most. 

The focus is really going on ways to speed up the production of the mosaic tiles and this system of combining several areas in a larger project (up to 100 layers) does speed things up and is only really possible since Gimp 2.10 when they implemented support for projects more than 4 GB. At the moment 100 layers is the practical limit of the computer resources I have, but is also a practical file size limit because of the time it takes Gimp to save a file of that size, which can be as much as 30 minutes (for a 30 GB file). Part of the streamlining is also to do away with all the masking off except in very occasional situations, cropping off the boundaries is easier but I also dispensed with composite aerial tiles that blended old and new together as for historical comparisons just old layer vs new layer gives more surrounding detail for interest.

The last time I worked on this corridor was in May of last year and I was then looking at Christchurch Station in particular but had drawn a project that went from there out to Opawa. That was at the very early stages of my learning how to use Gimp and getting stuff done so it was time consuming with a lot of trialling different things. One of the lessons being learned at that time that was not finally solved until later last year was needing to have background imagery that matched the historical stuff in resolution, and as it can be seen earlier this year, that has been for the surveys that NZR had done for their own use, which often have a scale of around 1:4300 on each image and are very detailed indeed, source imagery of pixel size 0.1 metres or less (0.075 is the smallest pixel size currently being produced by LDS and is generally available for the main urban areas) is needed, and if that isn't what is available then it has to be scaled to match. Hence I spent a bit of time earlier in the year coming up with a way to segment scaled up imagery from 0.3 or 0.4 metres to 0.1 metres so that the NZR surveys could be used to their best advantage. In particular, some of the work recently done in Northland has used that process.

But with the recent work being around urban areas and being able to use 0.1 metre or finer pixel size LDS base imagery, I haven't had to muck around with scaling up and segmenting the source imagery and have just been able to use the base stuff as is. So then I did Dunedin-Mosgiel which was a learning curve of doing the largest possible project size, which turns out to be 100 layers, and from there I went on to do Horotiu-Frankton-Claudelands on the NIMT, which was a learning curve of laying out everything in a really large canvas (in this case one with 1000 million pixels) which is a major step up in ease of use from the way I laid out the stations in Dunedin. Christchurch-Templeton is an interesting one (as will be Christchurch-Kainga) where the corridor is closely aligned to a geographic meridian, meaning a long narrow canvas - the Christchurch-Hornby one is currently 192000 by 21600 without all the tiles yet in place, because that doesn't happen very often in NZ rail geography. Originally I was planning to take it out to Templeton but this was going to push the layer count way over 100 so it has had to be cut back to Hornby, about 9-10 km.

Meanwhile I still did get a reasonable amount of drawing of Dunedin done yesterday and this work continues so I am not slowing down that part too much, because it is important to get that through as soon as possible.

It is imperative to get as much of the base imagery for each project in place as quickly as possible as well, because all of the downloads on one of my computers are taking up a lot of disk space and that space is needed to save the mosaics which are using hundreds of GB so getting these corridors finished for base imagery and then also pushing ahead with the historical maps as well on the corridors is much more of an imperative now.

I think after Dunedin-Mosgiel then possibly Dunedin-Port Chalmers really quickly and then Volume 5 for PNGL is going to be the order of things, but I also do hope to get back to the OCR reasonably soon.

Friday, 19 April 2019

North Island Main Trunk [0C]: Intro 3: Hamilton Urban Area 2

I have now completed a mosaic project to cover the area of NIMT and ECMT that is within the bounds of Horotiu, Hamilton (Frankton) and Claudelands. These are the main areas of interest that I will be mapping at some future time (unscheduled at present) with NZ Rail Maps. 

Whilst the mosaic is now complete with just over 100 layers on a canvas of 96000x93600 pixels (8,985,600,000 pixels, or 9 gigapixels), as noted in my previous post, much of the canvas is unoccupied because of the L shaped aspect of the rail corridor section covered.

At present for actual mapping I am still working on Dunedin and I do not know if any work will be done on the NIMT for some time as there are a number of areas being worked on. The idea at the moment has simply been to put the mosaics together quickly to see that it can be done a lot more smoothly and rapidly than the Dunedin urban mosaic project which has taken weeks to complete. This has been greately sped up by being able to use a linear corridor project rather than the segmented model used for Dunedin, one of the principal drawbacks of which is the need to duplicate overlapping layers between segments.

However another factor in Dunedin has been the significant number of layer eras sourced and incorporated into the project. This has not been done with the Hamilton project. Most of the historical imagery is from a single generation for most areas. The main exception is the ECMT section from Hamilton to Claudelands which incorporates three generations: 1953, 1961 and 1975. This is because of the major changes when the railway between Hamilton and Claudelands was undergrounded in the early 1960s and the change upon the urban landscape that was produced. There is also a 1966 image of Frankton Junction which shows the locomotive depot that was gone by the 1970s along with some other features in part of the yard.

In the Te Rapa mosaic project we have a corridor of 10 km roughly in length, which because of its shape uses the canvas inefficiently, yet we also have 100 layers and a file size of 18 GB. The clear implication from this is that there is no inherent resource usage efficiency from a segmented model as opposed to a linear model and therefore the linear model with its clear speed advantages is what will be preferred in future. As soon as the Te Rapa project is completed I intend to start on mosaic projects for Christchurch, which is at a higher priority for actual mapping, and integrate several sets of mosaics each for around 10 km of the urban rail corridors, which are currently implemented in small projects covering a km or two each.

The Te Rapa imagery dates from 1972 and I have since discovered there is some more available from the 1980s. However at the moment I am not intending to add any more generations to Te Rapa. Multiple generations are a feature of Christchurch and Dunedin mosaic projects at present because of a greater personal interest in this level of detail, which is not going to be the case across all mosaic projects, so that is essentially the difference in this case, because I simply do not have the time to delve into all of the historical details at every location at present.

The images below are from an album on the NZ Rail Maps page. Visit that page to see more information about them. 

 Hotoriu freezing works.
 Hotoriu station.

 Te Rapa Air Force Base.



 Main Te Rapa yard with hump to the far right.
 Te Rapa loco depot 1972.



 Frankton yard.
 Frankton Junction. Was never a triangle.
 Frankton passenger station.


 Frankton Loco Depot 1966.


 Hamilton Railway Station

 Commencement of lowering works in Hamilton 1961. Bridge under construction at right.
 1953.
 1975.



 Claudelands 1953.
Claudelands 1975.


MSL Dunedin-Mosgiel [1B]: Dunedin Station 2: Depot Sidings 1972

Continuing from the previous maps of the OETT sidings at Dunedin Station in the 1980s, here are some views of a rail depot on the east side of Dunedin Station yard. I am not sure exactly what this depot was used for, probably way and works or signals. The depot area extended from Thomas Burns St to the Wickliffe St road overbridge. It was altered slightly in the mid 1980s when parts of tracks at the northern end were lifted in order to construct a building for an as-yet unknown purpose which had its own siding. The rest has been gone since probably the 1990s when the overall Dunedin Station railway yards were considerably reduced in size, and is largely carparking.

In each view below, the black and white is 1972 and the colour view is 2014.







Tuesday, 16 April 2019

North Island Main Trunk [0B]: Intro 2: Hamilton Urban Area

Whilst I am still drawing maps of Dunedin and this work will probably take me until the end of the month to complete, I am working on a mosaic of Hamilton Urban Area (Hamilton to Horotiu) as well. The initial focus will be the Te Rapa hump shunt yard of the 1970s.

At this stage there is no plan to do any actual maps, just the mosaic for comparitive purposes but I imagine some maps will come together maybe later this year.

Friday, 12 April 2019

MSL Dunedin-Mosgiel [1A]: Dunedin Station 1: OETT Sidings 1988

These interesting images come from a colour Retrolens survey dated 28 February 1988. Although I have georeferenced this imagery it is of insufficient quality to be used for map making purposes. The reasons for this are that it was shot at a very low altitude, only 2000 feet, and therefore must have used a very wide lens on the camera, inducing significant distortion, which can be seen in many of the buildings. The problem is that this doesn't just affect buildings - it can even have an impact on perspective of track down on the ground and that makes it much more difficult to line up accurately. So even though these images cover a small area and have a tantalisingly good scale of 1:4000, about the same as the NZR surveys, the amount of perspective distortion in them is off the scale compared to what I usually work with. It's enough that working across two overlapping images, there is even difficulty in lining up two sets of points motors that are 20 metres apart. That means that even the track can't be assured of being in the right place.

So that little lesson is just to show that not all aerial imagery is good enough even at quite a good scale which this stuff is. I have put it into the map mosaics and tiles will be made but purely to look at some features on the ground at a point in time (1988) and not to render actual maps - only a small area of Dunedin yard is covered by this survey anyhow.

So here are some photos of the area around Dunedin Station from this survey.

The station with a rake of OETT cars at the main platform. This was a Sunday, so there may have been an excursion going out on this day.


Before OETT had the use of the Gully they occupied sidings at the north end of Dunedin station. These three images show the sidings with various items of rolling stock. These include the carriages that were under construction for the Taieri Gorge Limited at the time.

Thursday, 11 April 2019

MSL Dunedin-Mosgiel [0F]: Intro 6

This has been a long and drawn out map mosaic project as reflected in the number of introductory posts for this series that have been produced while pulling it together. I thought here I would talk about some of the challenges relating to this set of maps and some of the others done around the country that gives some idea of why progress can be slow.

The biggest challenge when working with overlapping layers of aerial photography is making everything on a new layer overlap correctly with your existing layers. If one was to look at the current aerial layers from Linz Data Service, they are all seamlessly overlapped at the edges and there are no alignment errors (or there aren't supposed to be!). In the real world this does not happen by chance. Aerial photos are taken by a camera and that camera is subject to distortions of various kinds, not the least of which is due to the lens. Typically with any lens it will start to show distortion out towards the edges of the image and that is one good reason to take a series of aerial images that overlap quite a lot so that you can avoid using the edges if necessary, which makes resolving this issue quite easy.

The other major real world distortion issue you will see due to the camera, and which is much harder to deal with, is perspective distortion. This simply occurs because of differing heights of terrain or features such as buildings. If the ground is flat all the way across the image (and the aircraft taking the aerial photo was flat and level) you won't see much or anything in perspective distortion. However issues arise as soon as there is something like a building, because the perspective of it varies depending on where the camera's lens was relative to the building when the photo was taken. The further away a building is from the centre of the lens, the more likely it is you will see a view of the building that is side-on instead of directly overhead and that distorts the perspective of the building. Quite commonly this is very obvious when looking at a series of images and the bits that overlap. And again, it is more pronounced towards the edges.

The fix for perspective distortion is much more complex and basically involves creating a computer model of the heights of terrain and features and then feeding that along with the original imagery into a computer program called an orthorectifier. To get the heights, these days LiDAR radar modelling is generally used. The orthorectification is what Linz use to generate their apparently error free seamless aerial photos that cover the whole country. It can still be fooled if the height model and the actual terrain imagery aren't in sync. So it works on the assumption that if there is this much difference in height then it needs to move some pixels around to eliminate the perspective errors and this is not really easy to do. I don't know how much Linz pay to get their imagery orthorectified or how much computer resources are needed.

The historical aerial photos aren't orthorectified so there are other tricks to be employed. The mosaic alignments usually get done on railway tracks because they are flat on the ground. But in Dunedin you have the main line embankment at a height of 5 metres or more going through some yards like the Dunedin freight yard, the Dunedin diesel depot yard and the Hillside workshops yard, and that makes it nearly impossible to align all those tracks, high and low level, on the same map. So we can employ another trick, which is to create two copies of the same layer - one for the bank and one for the flat - and overlap them using a graphical editing technique called masking and put the join somewhere inconspicuous.

There is a problem with the original embankment through Caversham in that we don't have anything on the Linz images to show us exactly where it went today so there is going to be some small amount, like a few metres, of placement error due to this perspective distortion but there is enough other things we can line up on to be reasonably confident. I did find a 1986 survey of Hillside Workshops to add coverage of Kensington in that period to the maps, which is combined with the NZR 1985 aerial survey of Dunedin. There is 1988 colour coverage of Dunedin yards as well but I decided not to use it. South of Kensington there is nothing really for the 1980s so most of that will be 1978 or 1979 at the latest (apart from current) but it is possible there might be something later for Green Island, Wingatui or Mosgiel as I haven't checked all the way through.

The third factor making this complex is that it is a continuous section which means overlaps at the edges, so we have to create copies of some layers to get the overlapping to all line up. That is inherent with a suburban line section where it is desirable to document the entire section with all the stations and sidings that go off all over the place. So with all that work I am only just getting the maps into production now. There is still some work being done on the mosaics as necessary but the maps have now started to be drawn starting at Dunedin. After this the next section is from Dunedin to Port Chalmers, but I don't have a schedule for it yet.

This area just north of Dunedin Station has changed greatly in 30 years. Latterly with the construction of Dunedin Stadium and diversion of SH88 down the rail corridor much of the old buildings and sidings have disappeared. The last photo shows a line of written off DG class locomotives being scrapped in 1985.




Wednesday, 10 April 2019

MSL Dunedin-Mosgiel [0E]: Intro 5

Yesterday I started to extract layers from the maps for Dunedin and have 1942, 1972, 1985 and 2013 to play with. Today I found a couple of errors which I have fixed, and also added 1985/1986 layers to Kensington. This includes a 1986 survey of Hillside Workshops which shows the beginning of singling of the MSL from Dunedin yard to Caversham and also the deviation around Caversham being put together. It is interesting that the deviation work began in 1979 but took something like 8 years to complete. The first time I travelled by train through the area was in 1987 and did so again in 1989. On both of those trips, up the Otago Central to Clyde, I was completely unaware of what was happening around Dunedin with the singling and realignment of the railways in the area. 

A 1986 aerial survey of Hillside Workshops yields this view of the post-singled main as it crosses from the right hand side of the Andersons Bay Road bridge to the left hand side of the King Edward Street bridge. At lower right is the Caledonian Grounds, now the site of the Warehouse carpark.

The overbridge at King Edward Road was rebuilt as a single track structure with new abutments and piers, for unknown reasons, as it is practically on the same alignment as the left side of the original double track structure from the 1910s. The siding for Hillside Workshops comes down the side of the embankment to the left of the bridge.
Work underway to deviate the railway line with the new single track bridge at South Road under construction with the original railway bridges above it and the new embankment built. Foundation work is also underway for the first motorway bridge for the original 2 lanes. This only slightly encroached upon the double track rail bridges. The 2nd motorway bridge for 4 lanes now sits more or less completely within the 1910 railway bridge corridor.

Monday, 8 April 2019

MSL Dunedin-Mosgiel [0D]: Intro 4

Dunedin-Mosgiel map mosaics have been completed with the addition of historical maps of the Mosgiel area. After this was done, the entire set of mosaics was reviewed and it was found three more pieces needed to be added in Dunedin. These were near the Water of Leith railway bridge where there were gaps in both 1972 and 1942 coverage, and a 1942 map of the route of the Dunedin Peninsula & Ocean Beach Railway line (not the current OBR line).

Mosgiel includes the first part of the Outram line which was a siding to the woollen mill. In 1966 when the aerial photos were taken this siding was still in use. This seems to have ceased by the early 1970s, by 1975 the siding had been lifted back to the first bridge, which was on the first curve where it turned 90 degrees from the MSL to run up into Mosgiel.

I did consider putting the Outram Branch into this project using the 1942 aerial photos but decided to leave that for a separate project that will cover the whole branch sometime in the future but it will not show much detail of the stations as the 1942 aerial images are not particularly sharp.

I previously had Caversham in 1942 coverage (and have tiles for it that I produced from an earlier version of the project) but decided to remove this because sufficient pre-motorway coverage is available around Caversham from the 1970s. 1942 coverage generally is not sharp enough to be of much use and for the maps has been limited to a few select areas of specific interest. These are Dunedin yard, the routes of the DPOBR Walton Park and Fernhill branch lines, and Wingatui which had industrial sidings that were gone by the 1970s. In most cases these images are too blurry to have much usefulness for mapping. For all other areas, the earliest coverage used (only in some areas) is from the 1960s. The main interest for having coverage of any areas before the 1970s is, as alluded to above, the desire to show what Dunedin looked like before the southern motorway was put through, all along the rail corridor, which in particular around Caversham was diverted and singled.

So far the areas I have extracted tiles for are:
  • Dunedin 1942 (incomplete)
  • Dunedin 1972
  • Kensington 1972
  • Caversham 1979
South of Dunedin most stations have changed little over the years and there is no real need for coverage before 1960. Although it is hard to find coverage at a good resolution pre-motorway between Kensington and Green Island, a combination of 1978 and 1960 surveys that have been located will give a reasonable view of the area. The motorway works started at the south end of Dunedin (Green Island etc) in the early 1970s and at the middle (Kensington) in the late 1970s and finding aerial coverage that is of good enough quality is hard as 1942 is not very sharp. It's only been included of Dunedin station for historical interest of a major yard in the middle of the city.

Most of the surveys used are from the following collections:
  • 1942 general aerial imagery of Dunedin. As much of NZ is covered by these series they were probably intended for military purposes. Survey numbers are in the 200 range.
  • 1960 Dunedin Milton Motorway. Series A is relevant to Dunedin - survey no. 1299
  • 1966 State Highway 87 District 17 - Mosgiel. This is survey no. 1915 which happens to cover some stations up the Otago Central Railway (as SH 87 runs from Mosgiel to Kyeburn where it joins the Pigroot - SH 85, and thus close to the OCR from Sutton to Kokonga).
  • Most of the other surveys were done specifically for NZR, for the various stations in Dunedin (Caversham and Abbotsford did not have these surveys done). There is a large survey done for NZR in 1978, no. 5248, which covers the entire MSL from Palmerston to Mosgiel. I am downloading every image in it for future reference because it means I can map every station in that section and that might be the next big set of map mosaics done. But that will depend on how long it takes to assemble such mosaics. 
Tomorrow therefore I will have the ability to start extracting the tiles from the mosaics to be mapping all across the area. The mosaics out of interest were all in one file, which reached a peak size of 53 GiB before it got too difficult for my computer to handle (running out of SSD swap space which slows Gimp down a lot swapping to the hard disk and seems to make it more unstable). At that point it was split into two files.

Tuesday, 2 April 2019

MSL Dunedin-Mosgiel [0C]: Intro 3

This is a quick update to show where we are up to with the Dunedin to Mosgiel mapping project I am undertaking at the moment. This is getting to be fairly comprehensive, bringing together maps that incorporate quite detailed coverage of practically all of the stations along the routes, as well as older historical views of the Fernhill and Walton Park lines.

I am through to Abbotsford with the aerial photography at the moment, and as there is no NZR coverage of this station specifically, I am going through other aerial collections to see what I can find that will give me some reasonable detail of Abbotsford. 

As you can see in the below there is great coverage of a lot of the railway siding served sites around Burnside and Green Island for example, here is the freezing works at Cattleyards and the cement works at Burnside.





Thursday, 28 March 2019

Main North Line [14]: Rangiora

Rangiora is the major intermediate station in the former tablet section from Addington (Christchurch) to Waipara (junction of the Waiau Branch). It is also one of the largest towns in rural North Canterbury. It is 30 km from Addington, almost exactly halfway between there and Waipara. 

The Great Northern Railway from Christchurch reached Southbrook, 3 km to the south, in 1872, and was then in the broad gauge of 5 feet 3 inches (c. 1600 mm). It was opened to Ashley (c. 3 km north of Rangiora on the north side of the Ashley River) in 1875, then to Balcairn in the same year, and to Amberley in 1876. This was the maximum northern extent of broad gauge in Canterbury, and it was converted to the NZ standard gauge of 3 feet 6 inches (1067 mm) in 1878.

Rangiora was from 1874 to 1959 the junction for the branch line to Oxford, which from 1884 to 1930 had an extension to Sheffield (a station on the Midland Line) via the Waimakariri Gorge bridge, which is still in use today as a road structure. The Oxford branch line also joined at Bennetts Junction with a line from Eyreton (Kaiapoi) that was first opened in 1878 and progressively closed between 1931 and 1965. The working of these branch lines required a locomotive depot at Rangiora and the turntable used to turn the steam engines remained long after the end of branch services into the 1970s at the north end of the station yard, while an engine shed was closed some time earlier.

Rangiora's passenger station has been at its present site for decades. A branch train platform behind it was still in place in the mid 1980s, but seems to have been demolished about 30 years ago. The importance of freight traffic at Rangiora can be seen in the extent of the sidings, nearly all removed including several private spurs on the west side. Rangiora's main importance today is as a passenger halt for the Coastal Pacific service, and for crossing freights.

The aerial photos are in sequence from 1942, 1975 and 2014.