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.