Tuesday 20 November 2018

Kingston Branch [4A]: Mararoa - Kingston 1 (Kingston 1)

One of the issues of using Linz Data Service aerial layers is that they don't photograph the whole country every year. They photograph a certain amount every summer, and then there are a variety of different resolutions as well. The consequence of this is that coverage of the Kingston Branch itself, from Invercargill to Kingston, is at three different resolutions. It could have been four, but as I said last time, I chose not to use the 0.05 metre Invercargill coverage as I judged the 0.1 metre coverage was plenty sharp enough for my purposes. But there is still 0.1, 0.4 and 0.75 metre coverage. The latter is unavoidable as the 0.4 metre stuff only goes to just south of Kingston itself, meaning I have to bring in a small area at 0.75 metres because that area hasn't yet been upgraded to 0.4 metres - it's very old footage covering a range of dates from 2004 to 2011 and happens to cover all of Lake Wakatipu, Queenstown and a number of other areas. 

This same 0.75 metre coverage was what I originally used to do the Cromwell Gorge on the OCR. I then adapted all of that area to 0.4 metre coverage by loading the 0.4 metre tiles into the aerial mosaic in Gimp, scaling them up to 0.75 metres, overlapping them onto the existing tiles, and then scaling the entire image back down to 0.4 metres. It was done that way to avoid having to start from scratch and realign all of the aerial photo coverage over a 0.4 metre tile background. I didn't document that at the time so I am just going from memory as to how it got done. There was a mosaic I did where I also had to copy the layer masks from one file to another - I can't quite recall if it was that project or a completely different one. 

This one is slightly different because I haven't done any mosaicing just yet. What is happening is I have to make an overlap tile set of 0.75 metre tiles, which load into Qgis and line up with the existing 0.4 metre tiles. This means the tiles that come out will have some 0.4 metre imagery incorporated into them, so as to get the borders exactly correct. So I have to load in the overlapping 0.4 metre tiles, scale them up to 0.75 metres and then align them by eye. Then I can export my new 0.75 metre tiles out to be loaded into Qgis. Apart from adding Kingston in, one of the reasons for doing these 0.75 metre tiles is to get rid of some nasty black edges on the 0.4 metre tiles. For some reason, LDS like to produce fractional tiles, with a piece of solid black that happens to be an irregular shape filling in the rest of the tile, or else a tile that is not the full height or width. So getting rid of the black edge is another reason to make an overlap mosaic. 

As it happens, we aren't interested in producing 0.75 metre tiles as our output. We want 0.15 metre tiles to be close to the resolution of the NZR retrolens aerial photos of Kingston that are going to be overlaid onto this mosaic and output to produce our historical tiles for drawing the Kingston yard. So this is a more complex project than just overlapping a bit of imagery in to fix the edges of a map. I had to do LDS tile overlaps for several parts of the OCR maps because there were several areas, including part of the Cromwell Gorge and another area was the Manuherikia River valley between Chatto Creek and Galloway. There were two different generations of aerial photography each covering just a part of the area and they had to be overlapped, and inconveniently came complete with these black edges and irregular shaped tiles. It wasn't like I could get the whole area covered in one of the series - I had to use both series and fix these overlap issues. I scaled the 0.75 metre tiles for Kingston to 0.15 metres because it's an exact multiple, and then overlaid the Kingston historical stuff on top.

Here is Kingston in 1974 and sometime between 2004-2011.