Processing old maps

Sources of maps:

Note about copyright: Depending upon your intended usage of any maps you harvest, especially if you intend to publish them on a website, be careful of the copyright. For older maps (e.g. UK OS maps more than 50 years of age), copyright may have expired. However if you have acquired the map via a scan that someone else has performed, they may have a case for claiming some sort of copyright (this depends very much on jurisdiction and has not been fully legally tested in the UK).

Cleaning up:

Scans of older maps often benefit from some post-scan treatment to remove marks and discolouring – especially if you intend to vectorise the scan.

To get rid of yellowing and much of the speckling using the raster/bitmap editing tool, Gimp  (tested with version 2.8):

  • Colours > Auto > WhiteBalance
  • Select > By Colour  (ensure 15 Threshold, although up to 80 might be needed for dirty maps)
  • Click anywhere on the background of the map image
  • Press the Delete key on the keyboard
  • Select > None
  • Layer > Transparency > Remove alpha channel  (some maps might not have an alpha channel to remove)

Vectorising

To extract useful data from a scanned image of a map, vectorising is often used. This can be achieved in 3 ways:

  • Trace over the scanned image and create a vector layer by hand (using Inkscape for example)
  • Semi-automated methods
  • Fully automated – very difficult

Of the semi-automated methods, there are a number of tools available, many commercial, but some free.

AutoCAD is the undisputed market leader, with its map functionality able to convert features to vector polylines or splines. However its current subscription pricing model is hard to justify for the occasional user.

QGIS / GRASS – rather complex, have to GeoReference (put ref coordinates on bitmap image), then Reclassify from 255 -> 2 colours, then polygonize

Inkscape  (tested with version 0.92)

Note: works well for Waggonways maps ( https://sites.google.com/site/waggonways/railways-northumberland )

 

Inkscape – Path > Trace Bitmap> Mode: Multiple Scans > Scans:8 ; Colours ; (disable Smooth and StackScans)

 

 

This will result in a group of paths (one for each colour), whilst retaining the original bitmap image as a separate object (which you can delete).

Then move each coloured path to a layer:

Can be done manually, one path at a time, or by using an extension (paths2layers – put paths2layers.inx and paths2layers.py [must be executable] into your config/inkscape/extensions/ directory).

Ensure the group containing the paths is selected, then:

Extensions > Convert Paths to Layers > Selected Paths to Layers

Finally you can then rename the layers to something more meaningful, such as Roads, Rivers etc.

 

Note: There is another method of tracing, if you just want thin, single lines: https://github.com/Moini/inkscape-centerline-trace