Comparing areas in scanned historical land use maps using QGIS?

Posterizing was a great start: it eliminated most of the compression artifacts and simplified the cartography enough to enable additional cleaning.

Much of the cleaning of a categorical raster involves so-called "morphological" operations. These include expanding one category into its neighbors, shrinking it back again, and region grouping contiguous mono-categorical cells into their own categories.

Usually some experimentation is needed, if only because the artifacts to be removed--lettering, hatch lines, and so on--will vary in their pixel sizes from one scan to another. To get you started, I will illustrate what these procedures can accomplish on the example.

The original, after posterization, looks like this. It's a grid with just three categories shown in three colors. We aim to create a grid in which the dark green areas are made into contiguous pieces, without the overlettering or dots or irrelevant line work, suitable for later analysis using raster algebra.

Figure 1

Expanding the dark green areas just one pixel into all surrounding areas gives this image:

Figure 2

(For more precise control you might want to limit expansion into just the black areas if your GIS allows it.)

To eliminate a lot of the thin lines of green artifacts and little islands, let's shrink the green back inwards by two pixels

Figure 3

and then, to balance all the expanding and shrinking (to reduce the bias) we will expand it back one more pixel:

Figure 4

Region grouping identifies these contiguous patches of green:

Figure 5

Each different patch is shown in a different color.

Use a conditional or SetNull operation to eliminate the tiny patches. How tiny? I inspected the attribute table and found that many patches occupied between 6 and 47 cells; after that there was a jump to 422 cells. I chose a threshold within that jump (100) and erased all cells with counts (not values!) less than that threshold. Here is what remained, overlaid on the original for comparison:

Figure 6

We have achieved a fairly fine-grained representation of the areas of interest, suitable for detecting and quantifying changes relative to similarly processed images. I took some work, but it's far less work than manually digitizing the original scan, and--provided the scans are made at consistent resolutions--can be semi-automated. (Because the original maps use different colors, some intelligent intervention has to occur at the outset to select appropriate colors for expanding and shrinking.) Each one of the steps is a fairly fast calculation, too, so you can probably afford to scan the original maps at extremely high resolutions for greatest precision.


Getting an approximate raster layer in Gimp and converting it to vector in QGIS probably saved me some time, but it looks like there is no way to avoid hours of cleaning up the resulting shapefiles, vertex by vertex.

Tags:

Image

Raster

Qgis