Wednesday, 18 January 2017

Project Update: Otago Central Railway [1]

Well over the break work first began on updating the MSL from Palmerston to Dunedin and after getting as far as Oamaru work on that has stopped for the time being to focus on the Otago Central Railway. This has been intensified over the last week looking at all areas of the line but naturally the actual map work has been undertaken starting from Wingatui.

At the same time I have been floating some ideas around for publication and it has fallen on me to look at ways of reducing the size of the published volumes down to something more realistic. To do this I have tested two formats that split an A4 page into something long and narrow. The two formats that have been experimented with have been to split the page horizontally into two pieces approximately 285 mm high and 100 mm wide; and to split the page vertically into three pieces of about 90 mm high and 200 mm wide. 

The latter format is the more appealing of the two as it fits more naturally with the shape of regular desktop computer screens, meaning the same format can be used for both. When the images are put into a Flickr album they can be swiped across very naturally and intuitively on a handheld device such as a phone. I tried the swiping thing before but there were issues where the map layout inconveniently had the track exiting the top or bottom of the image instead of the left or right side. To counter this and also make best use of the available space the second innovation is to rotate the maps. This required a rotating north arrow which is a capability that has recently been added in Qgis, so the map will have an arrow in the lower left corner that always shows where north is.

The third improvement is that again Qgis has been updated so that we can have a scale bar that is marked in metres even though the project coordinate reference system (EPSG:3857) uses degrees, minutes and seconds as its units. Seeing an actual distance marked on a map is better for two reasons: it is easier to work out distances with a scale bar marked in metres than it is by trying to do impossible calculations when you don't have anything that inherently tells you how to convert a ratio like 1:8000 into something meaningful, and if the original map is scaled to a different size for some reason, the scale bar distances will also scale proportionately to the new size.

So things have got a lot better than when I first experimented with producing printed volumes that used two A5 size maps that was not an efficient use of space and resulted in up to 150 pages for a volume. The maps that cover the Taieri Gorge Railway for example can be done in about 12-13 A4 pages if that was the format chosen and this is a lot better than what it first looked like. The entire OCR could be done in about 50 pages. Anyway we will have to see where that goes, at the moment I am just pushing ahead with the maps.

Here is a sample of a map with full footer (as will be put on Flickr). For a publication only the scale bar and north arrow would be included. The footer references the new Flickr site I have set up for the maps where the first full set of maps for the TGR can be seen. The example is Middlemarch station (more in the next post).


Tuesday, 10 January 2017

MSL Waitaki-Palmerston [1]

Well back onto another MSL series. Right now the MSL is not fully detailed between Christchurch and Dunedin. There is about a 60 km gap between Palmerston and Waitaki that is not fully detailed. I have decided to fully detail this section and probably after that, from Dunedin to Invercargill, while waiting for a response to my approach to Railfan Magazine over the Otago Central line project. Detailing this section of line will require adding the sidings and loops between those locations using the Linz aerial photography of the area. Once the photography has been downloaded and added to the map project adding the extra tracks is very straightforward.

So I have just picked out and downloaded the aerial photography for Oamaru to Palmerston, covering Pukeuri, Oamaru, Herbert, Hillgrove, Bushey and Palmerston. I expect it shouldn't take more than today to put in the loops and sidings in these places. Of note is that I have included in the Oamaru download enough coverage to take in the Ngapara and Tokarahi Branches. But I haven't bothered with the Kurow Branch or the Dunback / Makareao Branches.

Palmerston is an area I've already passed in detailing, but I have gone back to put in extra detail. Unfortunately the available coverage isn't detailed enough to see where the siding tracks are. Extra tracks were put in when Oceana Gold began mining at Reefton and railed their ore east and south to Palmerston for processing at the Macraes site inland. This traffic has ceased at the time of writing with the Globe Progress site at Reefton going into care and maintenance wind-down and Palmerston will go back to being sleepy hollow again. The loop at Bushey, the next station north, is where trains have been crossed and when the Taieri Gorge Railway were running locomotive hauled trains to Palmerston a few years ago it was necessary to run on to Bushey in order to run around the train for the return trip. With the extra sidings at Palmerston of late and using a railcar instead of locomotives and carriages it has not been as necessary to use Bushey for this operation. What will get put into Palmerston are the major buildings and the Bushey loop, and I will try to come up with a location for the former turntable (which went to Feilding about ten years ago) as it was still there in 1999 and I have photos of it from that time.

As I noted in my previous post, issues with the current master version of Qgis make for a complex set of steps to add new features to the map. All of the detail work has to be done on my PC, because VMs don't have enough resolution of the mouse clicks to be able to precisely place stuff like on the application running natively on the computer. But, creating new markers, lines or polys in 2.99 runs into problems when saving the new object because of a validation bug to do with certain fields that are present in almost every table of the database. So at that point I have had to install Qgis 2.14 onto my Windows PC and then use that, which is slower because of its low spec CPU and also because it loads the files over the network from the main PC.

This problem was fixed in a later build of the development master but we have a new problem, that there is a limit in the Linux edition on the number of layers which I discovered when I started adding lots of aerial photography images to trace over. So I can only load a certain number of images at a time in 2.99 running on Linux (there is no problem at all with Windows, where I can load 1000 layers easily, but performance is so much slower on that computer) and that has been my workaround to let me keep going with 2.99 on Xubuntu. A further problem has arisen due to issues with the Qt component library that Qgis is authored with and that is that in 2.99 there are rounding issues with the displayed distances on stations (which are stored in the shapefile's database table in kilometres to up to 4 decimal places) - the labelling is showing 42.70 as 42.69999999999999 km which is really annoying. To get around this therefore the actual production of map images has to be done in a VM running an older version of Qgis.

Friday, 30 December 2016

Project update

Well since I wrote in my last post about rearranging my two Flickr accounts, I have been busy - I went away to Dunedin for a few days over Christmas - but I have now completed a monumental task of downloading almost 200 individual albums from the enzedrail Flickr albums and uploading them to the kahukowhai albums. The upload totals show that approximately 12200 photos were uploaded to the new albums. The reason there were so many albums (a great many of them contain only a few photos) is that the rail photos were classified by location and accordingly, there are a lot of locations on the railway network in NZ. They are all grouped at the end of the albums list under the RAIL: prefix, but there are about 180 albums in that classification as notable albums have been moved into the list of general albums. Supposedly there are nearly 50,000 photos now on that site and only 2700 on the NZ Rail Maps flickr site (enzedrail).

The outstanding work that was waiting to be completed when the photos were over on enzedrail will now be pushed ahead and that is to go through all the albums and add the contents to RAIL: albums where the locations are known, this will result in more complete album contents with all of the locations for every photo being better known. In the main part the Transport <year> series of albums are the ones to be gone through to arrive at these locational classifications because a lot of them haven't been classified in this way up until now. But also there are some rail albums that are for different things like locomotive classes and they haven't been pulled out of the other albums yet. This is a lot easier to do with all the photos in one place instead of being spread across two different Flickr accounts as they have been.

Meanwhile work goes on with the maps themselves. As it was known that there were some bugs in 2.17 version of Qgis and as there is a new 2.99 master version I decided to upgrade the MainPC installation to 2.99 which has happened. But although one issue with the rule based styles is gone from this edition, there is a new problem when adding records to a table which contains a value map in one of its fields because the values in these fields keep getting trashed and reset to Null when you save the new records. I updated at the same time my VM to 2.18 from 2.16 and found the rule based style editing problem still happening. So I cloned this VM and removed Qgis completely then installed the LTR version, 2.14.10, as there was really only the choice of 2.14, 2.18 or 2.99 to install.

So at the moment for example I have been doing some detailing of the MSL with adding the km pegs and changing the bridge details to show the bridge numbers. Well this is tricky because to add km posts, I have to use 2.14. To straighten up the routes I have to use 2.99. So I have to run 2.14 in a VM and 2.99 on the computer itself, both with the same project and data files open, although it is a different version of the project file because as usual the later version upgrades the project file to a new format. Kind of messy but it's what I have to do at the moment until the project developers fix the add records problem in 2.99.