Sunday, 24 March 2019

NZ Rail Maps: Two different ways to cover a large area in Gimp [1]

In my last post I compared a couple of large Gimp projects I worked on. Both of these cover a significant distance and they use different ways of doing it. It is illustrative to look at those two different ways and consider if one is better than the other.

The first way of doing in this case Dunedin-Mosgiel with more than 130 layers is for each railway station to overlay the tiles over all the others, so there is in this case a canvas of 7x7 tiles (4800Wx7200H) and the line is divided up into the various sections based around stations and each section has this 7x7 canvas, so they all are layered over each other. This is reasonably efficient in space usage because if you lay out the tiles all along linearly you need a very large canvas with many wasted tiles as the rail corridor is a narrow strip but it twists and turns around. Currently it uses 22.4 GiB on disk and around 36 GiB virtual memory when loaded.

The second way of doing it with one large canvas is best illustrated by a Gimp project I drew of Lake Dunstan from Cromwell up to Queensberry at the head of the lake, this is logical for a continuous canvas because the lake is more or less in a straight line so there is not much excess width needed. The distance covered is 17 km which is practically the same as the Dunedin-Mosgiel project. This project has 75 layers and the canvas is 8x9. The project currently occupies 11.5 GiB disk space and when loaded uses 26.7 GiB virtual memory. All of the canvas is covered.

There are a number of factors which affect the project resource usage so I won't go into much detail but I expect the multi layered type of project to be more efficient the longer the corridor section gets but somewhat to my surprise there is no clear advantage between one or the other at this point. It would be interesting to do a long corridor section and I am planning to  redo some of the Lyttelton-Rolleston route as a continuous section project just to see how that would work.

The multi layer approach has as its key disadvantage the issue that overlaps between sections are harder to handle simply because the aerial photos do not follow the same boundaries as the map tiles and so the overlap has to be staggered between two sections by duplicating the border layers. I had the same issue when I used to do a single station per file, as I started off the Christchurch suburban mosaics. It is actually quite straightforward to duplicate border sections in Gimp and therefore make the sections overla properly.